Skip to content

Commit

Permalink
Run fewer math tests (#20860)
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
kripken authored Dec 7, 2023
1 parent 196aa2d commit 1e8e824
Show file tree
Hide file tree
Showing 14 changed files with 18 additions and 41 deletions.
21 changes: 0 additions & 21 deletions test/core/test_getgep.c

This file was deleted.

1 change: 0 additions & 1 deletion test/core/test_getgep.out

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.
File renamed without changes.
22 changes: 3 additions & 19 deletions test/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -760,42 +760,26 @@ def test_zero_multiplication(self):
def test_isnan(self):
self.do_core_test('test_isnan.c')

@only_wasm2js('tests globals in static data')
def test_globaldoubles(self):
self.do_core_test('test_globaldoubles.c')

def test_math(self):
self.do_core_test('test_math.c')

def test_erf(self):
self.do_core_test('test_erf.c')

def test_math_hyperbolic(self):
self.do_core_test('test_math_hyperbolic.c')

@only_wasm2js('tests lgamma and signbit')
def test_math_lgamma(self):
self.do_run_in_out_file_test('math/lgamma.c', assert_returncode=NON_ZERO)

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

def test_frexp(self):
self.do_core_test('test_frexp.c')

def test_rounding(self):
# needs to flush stdio streams
self.set_setting('EXIT_RUNTIME')
self.do_core_test('test_rounding.c')

def test_fcvt(self):
self.do_core_test('test_fcvt.cpp')

def test_llrint(self):
self.do_core_test('test_llrint.c')

def test_getgep(self):
# Generated code includes getelementptr (getelementptr, 0, 1), i.e., GEP as the first param to GEP
self.do_core_test('test_getgep.c')

def test_multiply_defined_symbols(self):
create_file('a1.c', 'int f() { return 1; }')
create_file('a2.c', 'void x() {}')
Expand Down
15 changes: 15 additions & 0 deletions test/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -14242,3 +14242,18 @@ def test_force_filesystem_error(self):
def test_aligned_alloc(self):
self.do_runf('test_aligned_alloc.c', '',
emcc_args=['-Wno-non-power-of-two-alignment'])

def test_erf(self):
self.do_other_test('test_erf.c')

def test_math_hyperbolic(self):
self.do_other_test('test_math_hyperbolic.c')

def test_frexp(self):
self.do_other_test('test_frexp.c')

def test_fcvt(self):
self.do_other_test('test_fcvt.cpp')

def test_llrint(self):
self.do_other_test('test_llrint.c')

0 comments on commit 1e8e824

Please sign in to comment.