Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorge Costa authored and Jorge Costa committed Jan 10, 2016
1 parent 33d517c commit 8f4a9bc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
13 changes: 12 additions & 1 deletion integration-tests/features/steps/test_execution_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import re
import json
import requests
import platform
from requests.auth import HTTPBasicAuth
import subprocess
import shutil
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8f4a9bc

Please sign in to comment.