@@ -165,6 +165,11 @@ Most everyday users will run with no arguments.
165165"""
166166
167167import os
168+ if os .name == 'nt' :
169+ print ("Running sanitycheck on Windows is not supported yet." )
170+ print ("https://github.com/zephyrproject-rtos/zephyr/issues/2664" )
171+ exit (1 )
172+
168173import contextlib
169174import string
170175import mmap
@@ -1446,7 +1451,7 @@ class MakeGenerator:
14461451 goal .fail ("unknown_error" )
14471452
14481453 else :
1449- goal = self .goals [name . strip () ]
1454+ goal = self .goals [name ]
14501455 goal .make_state = state
14511456
14521457 if state == "finished" :
@@ -1824,14 +1829,11 @@ class TestCase:
18241829 achtung_regex = re .compile (
18251830 br"(#ifdef|#endif)" ,
18261831 re .MULTILINE )
1832+ warnings = None
18271833
1828- warnings = ""
18291834 with open (inf_name ) as inf :
1830- if os .name == 'nt' :
1831- mmap_args = {'fileno' :inf .fileno (), 'length' :0 , 'access' :mmap .ACCESS_READ }
1832- else :
1833- mmap_args = {'fileno' :inf .fileno (), 'length' :0 , 'flags' :mmap .MAP_PRIVATE , 'prot' :mmap .PROT_READ , 'offset' :0 }
1834- with contextlib .closing (mmap .mmap (** mmap_args )) as main_c :
1835+ with contextlib .closing (mmap .mmap (inf .fileno (), 0 , mmap .MAP_PRIVATE ,
1836+ mmap .PROT_READ , 0 )) as main_c :
18351837 suite_regex_match = suite_regex .search (main_c )
18361838 if not suite_regex_match :
18371839 # can't find ztest_test_suite, maybe a client, because
@@ -2257,7 +2259,6 @@ class TestSuite:
22572259 for k , out_config in defconfig_list .items ():
22582260 test , plat , name = k
22592261 defconfig = {}
2260- os .makedirs (os .path .dirname (out_config ), exist_ok = True )
22612262 with open (out_config , "r" ) as fp :
22622263 for line in fp .readlines ():
22632264 m = TestSuite .config_re .match (line )
@@ -3323,17 +3324,6 @@ def main():
33233324 error ("west-flash requires device-testing to be enabled" )
33243325 sys .exit (1 )
33253326
3326- if os .name == 'nt' and \
3327- (not options .build_only or not options .disable_size_report ):
3328- print ("Testing with sanitycheck on Windows is not fully supported yet." )
3329- print ("Only build without size report works for now:" )
3330- print ("\t - '--build-only --disable-size-report'" )
3331- print ("\t - Requires make: 'choco install make'" )
3332- print ("\t - May require long-path support in Windows OS." )
3333- print ("\t - https://github.com/zephyrproject-rtos/zephyr/issues/2664" )
3334- sys .exit (- 1 )
3335-
3336-
33373327 if options .coverage :
33383328 options .enable_coverage = True
33393329 options .enable_slow = True
0 commit comments