Skip to content

Commit e156452

Browse files
authored
Run test262 tests in parallel (#564)
This commit introduces a couple of changes in order to make run-test262 go brr and execute tests in parallel: - Remove CONFIG_AGENT build option. The disabled version of the build was already broken and no one noticed, Remove the define altogether. - Remove the -C switch. Hard to support in multi-threaded mode. I may bring it back some day because it _is_ useful. - Remove the -r switch. Also hard to support and I never look at test262_report.txt anyway so on the chopping block it goes. - Judicious use of thread-local storage so I don't have to thread through state everywhere and embiggen the diff even more. This is what Real Programmers(TM) do: stay up coding way past midnight just so the test suite finishes in one minute instead of four. Fixes: #547
1 parent 72d4587 commit e156452

File tree

3 files changed

+201
-191
lines changed

3 files changed

+201
-191
lines changed

CMakeLists.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,15 @@ endif()
269269
# Test262 runner
270270
#
271271

272-
# run-test262 uses pthreads.
273-
if(NOT WIN32 AND NOT EMSCRIPTEN)
272+
if(WIN32
273+
OR EMSCRIPTEN
274+
OR CMAKE_C_COMPILER_ID STREQUAL "TinyCC"
275+
OR CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_LESS 5)
276+
# Empty. run-test262 uses pthreads, sorry Windows users.
277+
# tcc and gcc 4.8 don't understand _Thread_local, whereas I
278+
# don't understand why people still use 4.8 in this day and age
279+
# but hey, here we are.
280+
else()
274281
add_executable(run-test262
275282
run-test262.c
276283
)

0 commit comments

Comments
 (0)