Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run local tests with run-test262 #591

Merged
merged 3 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 4 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ jobs:
make stats

- name: test
if: ${{ matrix.config.configType != 'examples' }}
if: ${{ matrix.config.configType != 'examples' && matrix.config.configType != 'tcc' }}
run: |
make test

Expand Down Expand Up @@ -214,16 +214,7 @@ jobs:
cp build\${{matrix.buildType}}\point.dll examples\
build\${{matrix.buildType}}\qjs.exe examples\test_fib.js
build\${{matrix.buildType}}\qjs.exe examples\test_point.js
build\${{matrix.buildType}}\qjs.exe tests\test_bigint.js
build\${{matrix.buildType}}\qjs.exe tests\test_bjson.js
build\${{matrix.buildType}}\qjs.exe tests\test_closure.js
build\${{matrix.buildType}}\qjs.exe tests\test_language.js
build\${{matrix.buildType}}\qjs.exe tests\test_builtin.js
build\${{matrix.buildType}}\qjs.exe tests\test_loop.js
build\${{matrix.buildType}}\qjs.exe tests\test_std.js
build\${{matrix.buildType}}\qjs.exe tests\test_worker.js
build\${{matrix.buildType}}\qjs.exe tests\test_queue_microtask.js
build\${{matrix.buildType}}\qjs.exe tests\test_module_detect.js
build\${{matrix.buildType}}\run-test262.exe -c tests.conf
build\${{matrix.buildType}}\function_source.exe

windows-clang:
Expand All @@ -247,16 +238,7 @@ jobs:
cp build\${{matrix.buildType}}\point.dll examples\
build\${{matrix.buildType}}\qjs.exe examples\test_fib.js
build\${{matrix.buildType}}\qjs.exe examples\test_point.js
build\${{matrix.buildType}}\qjs.exe tests\test_bigint.js
build\${{matrix.buildType}}\qjs.exe tests\test_bjson.js
build\${{matrix.buildType}}\qjs.exe tests\test_closure.js
build\${{matrix.buildType}}\qjs.exe tests\test_language.js
build\${{matrix.buildType}}\qjs.exe tests\test_builtin.js
build\${{matrix.buildType}}\qjs.exe tests\test_loop.js
build\${{matrix.buildType}}\qjs.exe tests\test_std.js
build\${{matrix.buildType}}\qjs.exe tests\test_worker.js
build\${{matrix.buildType}}\qjs.exe tests\test_queue_microtask.js
build\${{matrix.buildType}}\qjs.exe tests\test_module_detect.js
build\${{matrix.buildType}}\run-test262.exe -c tests.conf
build\${{matrix.buildType}}\function_source.exe

windows-ninja:
Expand Down Expand Up @@ -284,16 +266,7 @@ jobs:
cp build\point.dll examples\
build\qjs.exe examples\test_fib.js
build\qjs.exe examples\test_point.js
build\qjs.exe tests\test_bigint.js
build\qjs.exe tests\test_bjson.js
build\qjs.exe tests\test_closure.js
build\qjs.exe tests\test_language.js
build\qjs.exe tests\test_builtin.js
build\qjs.exe tests\test_loop.js
build\qjs.exe tests\test_std.js
build\qjs.exe tests\test_worker.js
build\qjs.exe tests\test_queue_microtask.js
build\qjs.exe tests\test_module_detect.js
build\run-test262.exe -c tests.conf
build\function_source.exe

windows-mingw:
Expand Down
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,7 @@ endif()
# Test262 runner
#

if(WIN32
OR EMSCRIPTEN
if(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.
Expand Down
10 changes: 1 addition & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,7 @@ stats: $(QJS)
$(QJS) -qd

test: $(QJS)
$(QJS) tests/test_bigint.js
$(QJS) tests/test_closure.js
$(QJS) tests/test_language.js
$(QJS) tests/test_builtin.js
$(QJS) tests/test_loop.js
$(QJS) tests/test_std.js
$(QJS) tests/test_worker.js
$(QJS) tests/test_queue_microtask.js
$(QJS) tests/test_module_detect.js
$(RUN262) -c tests.conf

testconv: $(BUILD_DIR)/test_conv
$(BUILD_DIR)/test_conv
Expand Down
4 changes: 2 additions & 2 deletions cutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -1129,7 +1129,7 @@ void rqsort(void *base, size_t nmemb, size_t size, cmp_f cmp, void *opaque)

/*---- Portable time functions ----*/

#if defined(_MSC_VER)
#ifdef _WIN32
// From: https://stackoverflow.com/a/26085827
static int gettimeofday_msvc(struct timeval *tp, struct timezone *tzp)
{
Expand Down Expand Up @@ -1184,7 +1184,7 @@ uint64_t js__hrtime_ns(void) {

int64_t js__gettimeofday_us(void) {
struct timeval tv;
#if defined(_MSC_VER)
#ifdef _WIN32
gettimeofday_msvc(&tv, NULL);
#else
gettimeofday(&tv, NULL);
Expand Down
Loading
Loading