Skip to content

Commit

Permalink
sanitycheck: nf52_bsim testcases to run with other native
Browse files Browse the repository at this point in the history
To be able to collect all coverage reports from the "native"
applications in the first CI instance, let's also place the
nrf52_bsim testcases first. The order now is:
 unit_testing
 native_posix
 *_bsim
 anything else

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
  • Loading branch information
aescolar authored and nashif committed Oct 15, 2018
1 parent 1c6674a commit 3777b44
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions scripts/sanitycheck
Original file line number Diff line number Diff line change
Expand Up @@ -2829,15 +2829,24 @@ def main():
reason))


def native_posix_and_unit_first(a, b):
if a[0].startswith('native_posix') or a[0].startswith('unit_testing'):
def native_and_unit_first(a, b):
if a[0].startswith('unit_testing'):
return -1
if b[0].startswith('native_posix') or b[0].startswith('unit_testing'):
if b[0].startswith('unit_testing'):
return 1
if a[0].startswith('native_posix'):
return -1
if b[0].startswith('native_posix'):
return 1
if a[0].split("/",1)[0].endswith("_bsim"):
return -1
if b[0].split("/",1)[0].endswith("_bsim"):
return 1

return (a > b) - (a < b)

ts.instances = OrderedDict(sorted(ts.instances.items(),
key=cmp_to_key(native_posix_and_unit_first)))
key=cmp_to_key(native_and_unit_first)))

if options.save_tests:
ts.run_report(options.save_tests)
Expand Down

0 comments on commit 3777b44

Please sign in to comment.