Skip to content

Commit

Permalink
Run test262 tests in parallel (#564)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bnoordhuis authored Sep 30, 2024
1 parent 72d4587 commit e156452
Show file tree
Hide file tree
Showing 3 changed files with 201 additions and 191 deletions.
11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,15 @@ endif()
# Test262 runner
#

# run-test262 uses pthreads.
if(NOT WIN32 AND NOT EMSCRIPTEN)
if(WIN32
OR EMSCRIPTEN
OR CMAKE_C_COMPILER_ID STREQUAL "TinyCC"
OR CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_LESS 5)
# Empty. run-test262 uses pthreads, sorry Windows users.
# tcc and gcc 4.8 don't understand _Thread_local, whereas I
# don't understand why people still use 4.8 in this day and age
# but hey, here we are.
else()
add_executable(run-test262
run-test262.c
)
Expand Down
Loading

0 comments on commit e156452

Please sign in to comment.