sanitycheck: nf52_bsim testcases to run with other native

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>
This commit is contained in:
Alberto Escolar Piedras 2018-10-08 08:57:13 +02:00 committed by Anas Nashif
parent 1c6674a96d
commit 3777b4452d
1 changed files with 13 additions and 4 deletions

View File

@ -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)