Skip to content

Commit 1e0f6cf

Browse files
committed
Skip the sscanf-requiring tests in suites that don't link to musl libc.
1 parent a12a34e commit 1e0f6cf

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

tests/test_core.py

+13-1
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ def test_stack(self):
971971
self.do_run_from_file(src, output)
972972

973973
def test_strings(self):
974-
if Settings.USE_TYPED_ARRAYS != 2: return self.skip('musl libc needs ta2')
974+
if self.run_name.startswith('s_'): return self.skip('This test requires linking to musl lib for sscanf.')
975975
test_path = path_from_root('tests', 'core', 'test_strings')
976976
src, output = (test_path + s for s in ('.in', '.out'))
977977

@@ -3856,18 +3856,21 @@ def test_sscanf_2(self):
38563856
Pass: 0.000012 0.000012''')
38573857

38583858
def test_sscanf_n(self):
3859+
if self.run_name.startswith('s_'): return self.skip('This test requires linking to musl lib for sscanf.')
38593860
test_path = path_from_root('tests', 'core', 'test_sscanf_n')
38603861
src, output = (test_path + s for s in ('.in', '.out'))
38613862

38623863
self.do_run_from_file(src, output)
38633864

38643865
def test_sscanf_whitespace(self):
3866+
if self.run_name.startswith('s_'): return self.skip('This test requires linking to musl lib for sscanf.')
38653867
test_path = path_from_root('tests', 'core', 'test_sscanf_whitespace')
38663868
src, output = (test_path + s for s in ('.in', '.out'))
38673869

38683870
self.do_run_from_file(src, output)
38693871

38703872
def test_sscanf_other_whitespace(self):
3873+
if self.run_name.startswith('s_'): return self.skip('This test requires linking to musl lib for sscanf.')
38713874
Settings.SAFE_HEAP = 0 # use i16s in printf
38723875

38733876
test_path = path_from_root('tests', 'core', 'test_sscanf_other_whitespace')
@@ -3876,6 +3879,7 @@ def test_sscanf_other_whitespace(self):
38763879
self.do_run_from_file(src, output)
38773880

38783881
def test_sscanf_3(self):
3882+
if self.run_name.startswith('s_'): return self.skip('This test requires linking to musl lib for sscanf.')
38793883
# i64
38803884
if not Settings.USE_TYPED_ARRAYS == 2: return self.skip('64-bit sscanf only supported in ta2')
38813885

@@ -3885,23 +3889,27 @@ def test_sscanf_3(self):
38853889
self.do_run_from_file(src, output)
38863890

38873891
def test_sscanf_4(self):
3892+
if self.run_name.startswith('s_'): return self.skip('This test requires linking to musl lib for sscanf.')
38883893
test_path = path_from_root('tests', 'core', 'test_sscanf_4')
38893894
src, output = (test_path + s for s in ('.in', '.out'))
38903895

38913896
self.do_run_from_file(src, output)
38923897

38933898
def test_sscanf_5(self):
3899+
if self.run_name.startswith('s_'): return self.skip('This test requires linking to musl lib for sscanf.')
38943900
test_path = path_from_root('tests', 'core', 'test_sscanf_5')
38953901
src, output = (test_path + s for s in ('.in', '.out'))
38963902

38973903
self.do_run_from_file(src, output)
38983904

38993905
def test_sscanf_6(self):
3906+
if self.run_name.startswith('s_'): return self.skip('This test requires linking to musl lib for sscanf.')
39003907
test_path = path_from_root('tests', 'core', 'test_sscanf_6')
39013908
src, output = (test_path + s for s in ('.in', '.out'))
39023909
self.do_run_from_file(src, output)
39033910

39043911
def test_sscanf_skip(self):
3912+
if self.run_name.startswith('s_'): return self.skip('This test requires linking to musl lib for sscanf.')
39053913
if Settings.USE_TYPED_ARRAYS != 2: return self.skip("need ta2 for full i64")
39063914

39073915
test_path = path_from_root('tests', 'core', 'test_sscanf_skip')
@@ -3910,12 +3918,14 @@ def test_sscanf_skip(self):
39103918
self.do_run_from_file(src, output)
39113919

39123920
def test_sscanf_caps(self):
3921+
if self.run_name.startswith('s_'): return self.skip('This test requires linking to musl lib for sscanf.')
39133922
test_path = path_from_root('tests', 'core', 'test_sscanf_caps')
39143923
src, output = (test_path + s for s in ('.in', '.out'))
39153924

39163925
self.do_run_from_file(src, output)
39173926

39183927
def test_sscanf_hex(self):
3928+
if self.run_name.startswith('s_'): return self.skip('This test requires linking to musl lib for sscanf.')
39193929
if Settings.USE_TYPED_ARRAYS != 2: return self.skip('requires ta2')
39203930

39213931
test_path = path_from_root('tests', 'core', 'test_sscanf_hex')
@@ -3924,6 +3934,7 @@ def test_sscanf_hex(self):
39243934
self.do_run_from_file(src, output)
39253935

39263936
def test_sscanf_float(self):
3937+
if self.run_name.startswith('s_'): return self.skip('This test requires linking to musl lib for sscanf.')
39273938
test_path = path_from_root('tests', 'core', 'test_sscanf_float')
39283939
src, output = (test_path + s for s in ('.in', '.out'))
39293940

@@ -3935,6 +3946,7 @@ def test_langinfo(self):
39353946
self.do_run(src, expected, extra_emscripten_args=['-H', 'libc/langinfo.h'])
39363947

39373948
def test_files(self):
3949+
if self.run_name.startswith('s_'): return self.skip('This test requires linking to musl lib for sscanf.')
39383950
self.banned_js_engines = [SPIDERMONKEY_ENGINE] # closure can generate variables called 'gc', which pick up js shell stuff
39393951
if self.emcc_args is not None and '-O2' in self.emcc_args:
39403952
self.emcc_args += ['--closure', '1'] # Use closure here, to test we don't break FS stuff

0 commit comments

Comments
 (0)