From 8f4a9bceb8fe14c91203577ccc632e4dde9a6199 Mon Sep 17 00:00:00 2001 From: Jorge Costa Date: Sun, 10 Jan 2016 15:48:49 +0200 Subject: [PATCH] fix test --- .../features/steps/test_execution_statistics.py | 13 ++++++++++++- .../features/test_execution_statistics.feature | 1 + 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/integration-tests/features/steps/test_execution_statistics.py b/integration-tests/features/steps/test_execution_statistics.py index fa72b9286d..e5ec7d0f7a 100644 --- a/integration-tests/features/steps/test_execution_statistics.py +++ b/integration-tests/features/steps/test_execution_statistics.py @@ -23,6 +23,7 @@ import re import json import requests +import platform from requests.auth import HTTPBasicAuth import subprocess import shutil @@ -63,7 +64,17 @@ def step_impl(context, project): for key, name in data.iteritems(): if name == "Sonar way - c++": context.profile_key = key - + +@given(u'platform is not "{plat}"') +def step_impl(context, plat): + if platform.system() == plat: + context.scenario.skip(reason='scenario meant to run only in specified platform') + +@given(u'platform is "{plat}"') +def step_impl(context, plat): + if platform.system() != plat: + context.scenario.skip(reason='scenario meant to run only in specified platform') + @given(u'rule "{rule}" is enabled') def step_impl(context, rule): assert context.profile_key != "", "PROFILE KEY NOT FOUND: %s" % str(context.profile_key) diff --git a/integration-tests/features/test_execution_statistics.feature b/integration-tests/features/test_execution_statistics.feature index 6aef21cd10..dcf85b519a 100644 --- a/integration-tests/features/test_execution_statistics.feature +++ b/integration-tests/features/test_execution_statistics.feature @@ -369,6 +369,7 @@ Feature: Providing test execution numbers Test if plugin is able to handle this. GIVEN the project "boosttest_project" + and platform is not "Windows" WHEN I run "sonar-runner -X -Dsonar.cxx.xunit.reportPath=btest_test_nested-test_suite.xml -Dsonar.cxx.xunit.provideDetails=true -Dsonar.cxx.includeDirectories=/usr/include" THEN the analysis finishes successfully