Skip to content

Commit 1e8e824

Browse files
authored
Run fewer math tests (#20860)
Move some to other when they are really just testing a libc method. Mark others as wasm2js-only when they seem like they test bit operations or other things that wasm2js needs coverage for (in multiple opt levels). Remove test_getgep as it was just testing trivial struct operations that have lots of other coverage (and it doesn't even test LLVM getelementptr directly).
1 parent 196aa2d commit 1e8e824

14 files changed

+18
-41
lines changed

test/core/test_getgep.c

Lines changed: 0 additions & 21 deletions
This file was deleted.

test/core/test_getgep.out

Lines changed: 0 additions & 1 deletion
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

test/test_core.py

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -760,42 +760,26 @@ def test_zero_multiplication(self):
760760
def test_isnan(self):
761761
self.do_core_test('test_isnan.c')
762762

763+
@only_wasm2js('tests globals in static data')
763764
def test_globaldoubles(self):
764765
self.do_core_test('test_globaldoubles.c')
765766

766767
def test_math(self):
767768
self.do_core_test('test_math.c')
768769

769-
def test_erf(self):
770-
self.do_core_test('test_erf.c')
771-
772-
def test_math_hyperbolic(self):
773-
self.do_core_test('test_math_hyperbolic.c')
774-
770+
@only_wasm2js('tests lgamma and signbit')
775771
def test_math_lgamma(self):
776772
self.do_run_in_out_file_test('math/lgamma.c', assert_returncode=NON_ZERO)
777773

774+
@only_wasm2js('tests fmodf (which may use JS math)')
778775
def test_math_fmodf(self):
779776
self.do_run_in_out_file_test('math/fmodf.c')
780777

781-
def test_frexp(self):
782-
self.do_core_test('test_frexp.c')
783-
784778
def test_rounding(self):
785779
# needs to flush stdio streams
786780
self.set_setting('EXIT_RUNTIME')
787781
self.do_core_test('test_rounding.c')
788782

789-
def test_fcvt(self):
790-
self.do_core_test('test_fcvt.cpp')
791-
792-
def test_llrint(self):
793-
self.do_core_test('test_llrint.c')
794-
795-
def test_getgep(self):
796-
# Generated code includes getelementptr (getelementptr, 0, 1), i.e., GEP as the first param to GEP
797-
self.do_core_test('test_getgep.c')
798-
799783
def test_multiply_defined_symbols(self):
800784
create_file('a1.c', 'int f() { return 1; }')
801785
create_file('a2.c', 'void x() {}')

test/test_other.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14242,3 +14242,18 @@ def test_force_filesystem_error(self):
1424214242
def test_aligned_alloc(self):
1424314243
self.do_runf('test_aligned_alloc.c', '',
1424414244
emcc_args=['-Wno-non-power-of-two-alignment'])
14245+
14246+
def test_erf(self):
14247+
self.do_other_test('test_erf.c')
14248+
14249+
def test_math_hyperbolic(self):
14250+
self.do_other_test('test_math_hyperbolic.c')
14251+
14252+
def test_frexp(self):
14253+
self.do_other_test('test_frexp.c')
14254+
14255+
def test_fcvt(self):
14256+
self.do_other_test('test_fcvt.cpp')
14257+
14258+
def test_llrint(self):
14259+
self.do_other_test('test_llrint.c')

0 commit comments

Comments
 (0)