Skip to content

Commit a433012

Browse files
committed
Remove deprecated built-in spectests
1 parent b186fe8 commit a433012

23 files changed

+29
-931
lines changed

.github/workflows/test.yml

Lines changed: 27 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,32 @@
1-
name: WASM Spectests
2-
on: [push, pull_request]
1+
name: Tests
2+
on: [ push, pull_request ]
33

44
concurrency:
5-
group: ${{ github.workflow }}-${{ github.ref }}
6-
cancel-in-progress: true # Cancel in-flight jobs for the same branch or PR
5+
group: ${{ github.workflow }}-${{ github.ref }}
6+
cancel-in-progress: true # Cancel in-flight jobs for the same branch or PR
77

88
jobs:
9-
test:
10-
name: Run official testsuite
11-
runs-on: ubuntu-latest
12-
if: github.event.pull_request.draft == false
13-
steps:
14-
- uses: actions/checkout@v3
15-
with:
16-
submodules: recursive
17-
18-
- uses: actions/setup-python@v4
19-
with:
20-
python-version: "3.x"
21-
22-
- name: Build warduino cli
23-
run: cmake . -D BUILD_EMULATOR=ON ; cmake --build .
24-
25-
- name: Build WABT # Build latest version
26-
run: |
27-
git clone --recursive https://github.com/WebAssembly/wabt
28-
cd wabt
29-
git submodule update --init
30-
mkdir build; cd build
31-
cmake ..
32-
cmake --build .
33-
34-
- name: Verify wat2wasm
35-
run: ./wabt/build/wat2wasm --version
36-
37-
- name: Install Python dependencies
38-
run: pip install -r requirements.txt
39-
40-
- name: Clone and run tests
41-
run: ./tests/integration/run_spec_tests.py --compiler "./wabt/build/wat2wasm" --interpreter "./wdcli" --ignore "./tests/integration/ignore.txt"
9+
unit:
10+
name: Run VM unit tests
11+
runs-on: ${{matrix.os}}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [ ubuntu-latest, macos-latest ]
16+
if: github.event.pull_request.draft == false
17+
steps:
18+
- uses: actions/checkout@v3
19+
with:
20+
submodules: recursive
21+
22+
- name: Create build folder
23+
run: mkdir build-unit-tests
24+
25+
- name: Build unit tests
26+
run: cmake .. -D BUILD_UNITTEST=ON ; cmake --build .
27+
working-directory: build-unit-tests
28+
29+
- name: Run unit tests
30+
run: ctest -VV
31+
working-directory: build-unit-tests
4232

.github/workflows/unittest.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

CMakeLists.txt

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,6 @@ if (BUILD_EMULATOR)
5252
src/Edward/proxy_supervisor.cpp
5353
src/Edward/RFC.cpp)
5454

55-
set(TEST_FRAMEWORK
56-
tests/integration/wasm_tests.cpp
57-
tests/integration/assertion.cpp
58-
tests/integration/sexpr-parser/src/sexpr.c)
59-
6055
add_definitions(-DINFO=0)
6156
add_definitions(-DDEBUG=0)
6257
add_definitions(-DTRACE=0)
@@ -71,7 +66,7 @@ if (BUILD_EMULATOR)
7166
endif (CMAKE_COMPILER_IS_GNUCXX)
7267

7368
# WARDuino CLI
74-
add_executable(wdcli platforms/CLI-Emulator/main.cpp ${SOURCE_FILES} ${TEST_FRAMEWORK})
69+
add_executable(wdcli platforms/CLI-Emulator/main.cpp ${SOURCE_FILES})
7570
target_link_libraries(wdcli PRIVATE Threads::Threads)
7671
target_include_directories(wdcli PRIVATE ${EXTERNAL_LIB_HEADERS} "${PROJECT_BINARY_DIR}/include")
7772
endif (BUILD_EMULATOR)
@@ -119,7 +114,7 @@ if(BUILD_UNITTEST)
119114
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
120115
FetchContent_MakeAvailable(googletest)
121116

122-
set(PATH_TO_UNIT_TEST ${PROJECT_SOURCE_DIR}/tests/vm_unit_tests)
117+
set(PATH_TO_UNIT_TEST ${PROJECT_SOURCE_DIR}/tests/unit)
123118

124119
file(GLOB TEST_SRC_FILES ${PATH_TO_UNIT_TEST}/*.cpp)
125120

platforms/CLI-Emulator/main.cpp

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
#include "../../src/Debug/debugger.h"
1515
#include "../../src/Utils/macros.h"
16-
#include "../../tests/integration/wasm_tests.h"
1716
#include "warduino/config.h"
1817

1918
// Constants
@@ -40,15 +39,6 @@ void print_help() {
4039
fprintf(stdout,
4140
" --loop Let the runtime loop infinitely on exceptions "
4241
"(default: false)\n");
43-
fprintf(stdout,
44-
" --test Run in test mode with .wast file with module "
45-
"as argument\n");
46-
fprintf(stdout,
47-
" --asserts Name of file containing asserts to run against "
48-
"loaded module\n");
49-
fprintf(stdout,
50-
" --watcompiler Command to compile Wat files to Wasm "
51-
"binaries (default: wat2wasm)\n");
5242
fprintf(stdout,
5343
" --no-debug Run without debug thread"
5444
"(default: false)\n");
@@ -264,7 +254,6 @@ int main(int argc, const char *argv[]) {
264254
ARGV_SHIFT(); // Skip command name
265255

266256
bool return_exception = true;
267-
bool run_tests = false;
268257
bool no_debug = false;
269258
bool no_socket = false;
270259
const char *socket = "8192";
@@ -277,9 +266,6 @@ int main(int argc, const char *argv[]) {
277266
const char *fname = nullptr;
278267
std::vector<StackValue> arguments = std::vector<StackValue>();
279268

280-
const char *asserts_file = nullptr;
281-
const char *watcompiler = "wat2wasm";
282-
283269
if (argc > 0 && argv[0][0] != '-') {
284270
ARGV_GET(file_name);
285271

@@ -304,13 +290,6 @@ int main(int argc, const char *argv[]) {
304290
return 0;
305291
} else if (!strcmp("--loop", arg)) {
306292
return_exception = false;
307-
} else if (!strcmp("--test", arg)) {
308-
run_tests = true;
309-
ARGV_GET(file_name);
310-
} else if (!strcmp("--asserts", arg)) {
311-
ARGV_GET(asserts_file);
312-
} else if (!strcmp("--watcompiler", arg)) {
313-
ARGV_GET(watcompiler);
314293
} else if (!strcmp("--no-debug", arg)) {
315294
no_debug = true;
316295
} else if (!strcmp("--no-socket", arg)) {
@@ -358,11 +337,6 @@ int main(int argc, const char *argv[]) {
358337
return 1;
359338
}
360339

361-
if (run_tests) {
362-
dbg_info("=== STARTING SPEC TESTS ===\n");
363-
return run_wasm_test(*wac, file_name, asserts_file, watcompiler);
364-
}
365-
366340
if (initiallyPaused) {
367341
wac->program_state = WARDUINOpause;
368342
}

tests/integration/assertion.cpp

Lines changed: 0 additions & 80 deletions
This file was deleted.

0 commit comments

Comments
 (0)