From 78514a7e5425d76787dec834f5a6d577f32181b9 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Mon, 28 Oct 2024 09:39:57 -0700 Subject: [PATCH] Move time API tests from core to other --- test/{core => other}/test_gmtime.c | 0 test/{core => other}/test_gmtime.out | 0 test/{core => other}/test_strftime.c | 0 test/{core => other}/test_strftime.out | 0 test/{core => other}/test_strptime_days.c | 0 test/{core => other}/test_strptime_days.out | 0 .../{core => other}/test_strptime_reentrant.c | 0 .../test_strptime_reentrant.out | 0 test/{core => other}/test_strptime_tm.c | 0 test/{core => other}/test_strptime_tm.out | 0 test/{core => other}/test_time.c | 0 test/{core => other}/test_time.out | 0 test/{core => other}/test_time_c.c | 0 test/{core => other}/test_time_c.out | 0 test/{core => other}/test_timeb.c | 0 test/{core => other}/test_timeb.out | 0 test/test_core.py | 47 ------------------- test/test_other.py | 47 +++++++++++++++++++ 18 files changed, 47 insertions(+), 47 deletions(-) rename test/{core => other}/test_gmtime.c (100%) rename test/{core => other}/test_gmtime.out (100%) rename test/{core => other}/test_strftime.c (100%) rename test/{core => other}/test_strftime.out (100%) rename test/{core => other}/test_strptime_days.c (100%) rename test/{core => other}/test_strptime_days.out (100%) rename test/{core => other}/test_strptime_reentrant.c (100%) rename test/{core => other}/test_strptime_reentrant.out (100%) rename test/{core => other}/test_strptime_tm.c (100%) rename test/{core => other}/test_strptime_tm.out (100%) rename test/{core => other}/test_time.c (100%) rename test/{core => other}/test_time.out (100%) rename test/{core => other}/test_time_c.c (100%) rename test/{core => other}/test_time_c.out (100%) rename test/{core => other}/test_timeb.c (100%) rename test/{core => other}/test_timeb.out (100%) diff --git a/test/core/test_gmtime.c b/test/other/test_gmtime.c similarity index 100% rename from test/core/test_gmtime.c rename to test/other/test_gmtime.c diff --git a/test/core/test_gmtime.out b/test/other/test_gmtime.out similarity index 100% rename from test/core/test_gmtime.out rename to test/other/test_gmtime.out diff --git a/test/core/test_strftime.c b/test/other/test_strftime.c similarity index 100% rename from test/core/test_strftime.c rename to test/other/test_strftime.c diff --git a/test/core/test_strftime.out b/test/other/test_strftime.out similarity index 100% rename from test/core/test_strftime.out rename to test/other/test_strftime.out diff --git a/test/core/test_strptime_days.c b/test/other/test_strptime_days.c similarity index 100% rename from test/core/test_strptime_days.c rename to test/other/test_strptime_days.c diff --git a/test/core/test_strptime_days.out b/test/other/test_strptime_days.out similarity index 100% rename from test/core/test_strptime_days.out rename to test/other/test_strptime_days.out diff --git a/test/core/test_strptime_reentrant.c b/test/other/test_strptime_reentrant.c similarity index 100% rename from test/core/test_strptime_reentrant.c rename to test/other/test_strptime_reentrant.c diff --git a/test/core/test_strptime_reentrant.out b/test/other/test_strptime_reentrant.out similarity index 100% rename from test/core/test_strptime_reentrant.out rename to test/other/test_strptime_reentrant.out diff --git a/test/core/test_strptime_tm.c b/test/other/test_strptime_tm.c similarity index 100% rename from test/core/test_strptime_tm.c rename to test/other/test_strptime_tm.c diff --git a/test/core/test_strptime_tm.out b/test/other/test_strptime_tm.out similarity index 100% rename from test/core/test_strptime_tm.out rename to test/other/test_strptime_tm.out diff --git a/test/core/test_time.c b/test/other/test_time.c similarity index 100% rename from test/core/test_time.c rename to test/other/test_time.c diff --git a/test/core/test_time.out b/test/other/test_time.out similarity index 100% rename from test/core/test_time.out rename to test/other/test_time.out diff --git a/test/core/test_time_c.c b/test/other/test_time_c.c similarity index 100% rename from test/core/test_time_c.c rename to test/other/test_time_c.c diff --git a/test/core/test_time_c.out b/test/other/test_time_c.out similarity index 100% rename from test/core/test_time_c.out rename to test/other/test_time_c.out diff --git a/test/core/test_timeb.c b/test/other/test_timeb.c similarity index 100% rename from test/core/test_timeb.c rename to test/other/test_timeb.c diff --git a/test/core/test_timeb.out b/test/other/test_timeb.out similarity index 100% rename from test/core/test_timeb.out rename to test/other/test_timeb.out diff --git a/test/test_core.py b/test/test_core.py index f73e08a9f6490..c9320b88862f0 100644 --- a/test/test_core.py +++ b/test/test_core.py @@ -2627,53 +2627,6 @@ def test_pthread_run_on_main_thread(self): def test_tcgetattr(self): self.do_runf('termios/test_tcgetattr.c', 'success') - @also_with_standalone_wasm() - def test_time(self): - self.do_core_test('test_time.c') - - @parameterized({ - '1': ('EST+05EDT',), - '2': ('UTC+0',), - '3': ('CET',), - }) - def test_time_tz(self, tz): - print('testing with TZ=%s' % tz) - with env_modify({'TZ': tz}): - # Run the test with different time zone settings if - # possible. It seems that the TZ environment variable does not - # work all the time (at least it's not well respected by - # Node.js on Windows), but it does no harm either. - self.do_core_test('test_time.c') - - def test_timeb(self): - # Confirms they are called in reverse order - self.do_core_test('test_timeb.c') - - def test_time_c(self): - self.do_core_test('test_time_c.c') - - def test_gmtime(self): - self.do_core_test('test_gmtime.c') - - @also_with_standalone_wasm() - def test_strptime_tm(self): - if self.get_setting('STANDALONE_WASM'): - self.emcc_args += ['-DSTANDALONE'] - self.do_core_test('test_strptime_tm.c') - - def test_strptime_days(self): - self.do_core_test('test_strptime_days.c') - - @also_with_standalone_wasm() - def test_strptime_reentrant(self): - if self.get_setting('STANDALONE_WASM'): - self.emcc_args += ['-DSTANDALONE'] - self.do_core_test('test_strptime_reentrant.c') - - @crossplatform - def test_strftime(self): - self.do_core_test('test_strftime.c') - def test_trickystring(self): self.do_core_test('test_trickystring.c') diff --git a/test/test_other.py b/test/test_other.py index 9de3bf79e6392..c6798a18e23c6 100644 --- a/test/test_other.py +++ b/test/test_other.py @@ -6044,6 +6044,53 @@ def test_force_stdlibs(self): # See https://github.com/emscripten-core/emscripten/issues/22161 self.do_runf('hello_world.c', emcc_args=['-sWASM_BIGINT']) + @also_with_standalone_wasm() + def test_time(self): + self.do_other_test('test_time.c') + + @parameterized({ + '1': ('EST+05EDT',), + '2': ('UTC+0',), + '3': ('CET',), + }) + def test_time_tz(self, tz): + print('testing with TZ=%s' % tz) + with env_modify({'TZ': tz}): + # Run the test with different time zone settings if + # possible. It seems that the TZ environment variable does not + # work all the time (at least it's not well respected by + # Node.js on Windows), but it does no harm either. + self.do_other_test('test_time.c') + + def test_timeb(self): + # Confirms they are called in reverse order + self.do_other_test('test_timeb.c') + + def test_time_c(self): + self.do_other_test('test_time_c.c') + + def test_gmtime(self): + self.do_other_test('test_gmtime.c') + + @also_with_standalone_wasm() + def test_strptime_tm(self): + if self.get_setting('STANDALONE_WASM'): + self.emcc_args += ['-DSTANDALONE'] + self.do_other_test('test_strptime_tm.c') + + def test_strptime_days(self): + self.do_other_test('test_strptime_days.c') + + @also_with_standalone_wasm() + def test_strptime_reentrant(self): + if self.get_setting('STANDALONE_WASM'): + self.emcc_args += ['-DSTANDALONE'] + self.do_other_test('test_strptime_reentrant.c') + + @crossplatform + def test_strftime(self): + self.do_other_test('test_strftime.c') + @crossplatform def test_strftime_zZ(self): if MACOS: