Skip to content

Commit 915ca21

Browse files
authored
Move and rename test_custom_js_settings. NFC (#22463)
- Move test to `other` suite - Group with other `js_lib` tests - Name test file to match test name
1 parent 21296e9 commit 915ca21

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

test/test_core.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9493,15 +9493,6 @@ def test_export_start(self):
94939493
def test_emscripten_math(self):
94949494
self.do_core_test('test_emscripten_math.c')
94959495

9496-
# Tests that users can pass custom JS options from command line using
9497-
# the -jsDfoo=val syntax:
9498-
# See https://github.com/emscripten-core/emscripten/issues/10580.
9499-
def test_custom_js_options(self):
9500-
self.emcc_args += ['--js-library', test_file('core/test_custom_js_settings.js'), '-jsDCUSTOM_JS_OPTION=1']
9501-
self.do_core_test('test_custom_js_settings.c')
9502-
9503-
self.assertContained('cannot change built-in settings values with a -jsD directive', self.expect_fail([EMCC, '-jsDWASM=0']))
9504-
95059496
# Tests <emscripten/stack.h> API
95069497
@no_asan('stack allocation sizes are no longer predictable')
95079498
def test_emscripten_stack(self):

test/test_other.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4695,6 +4695,15 @@ def test_js_lib_legacy(self):
46954695
''')
46964696
self.do_runf('src.c', 'main: 42\n', emcc_args=['--js-library', 'lib.js'])
46974697

4698+
# Tests that users can pass custom JS options from command line using
4699+
# the -jsDfoo=val syntax:
4700+
# See https://github.com/emscripten-core/emscripten/issues/10580.
4701+
def test_js_lib_custom_settings(self):
4702+
self.emcc_args += ['--js-library', test_file('core/test_custom_js_settings.js'), '-jsDCUSTOM_JS_OPTION=1']
4703+
self.do_other_test('test_js_lib_custom_settings.c')
4704+
4705+
self.assertContained('cannot change built-in settings values with a -jsD directive', self.expect_fail([EMCC, '-jsDWASM=0']))
4706+
46984707
def test_EMCC_BUILD_DIR(self):
46994708
# EMCC_BUILD_DIR env var contains the dir we were building in, when running the js compiler (e.g. when
47004709
# running a js library). We force the cwd to be src/ for technical reasons, so this lets you find out

0 commit comments

Comments
 (0)