Skip to content

Commit

Permalink
Merge pull request #364 from wasmx/smoketests
Browse files Browse the repository at this point in the history
Add smoketests to ctest
  • Loading branch information
chfast authored Jun 2, 2020
2 parents d0482be + 309dfe6 commit a19ef43
Show file tree
Hide file tree
Showing 37 changed files with 51 additions and 16 deletions.
23 changes: 7 additions & 16 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,27 +71,18 @@ commands:
description: "Test"
steps:
- run:
name: "Test"
name: "Run unit tests"
working_directory: ~/build
command: ctest -R ${TESTS_FILTER:-'.*'} -j4 --schedule-random --output-on-failure
command: ctest -R unittests -j4 --schedule-random --output-on-failure
- run:
name: "Run smoketest with fizzy-spectests --skip-validation"
name: "Run smoke tests"
working_directory: ~/build
environment:
LLVM_PROFILE_FILE: spectests-validation.profraw
command: bin/fizzy-spectests ~/project/test/spectests/smoketest --skip-validation
command: ctest -R smoketests -j4 --schedule-random --output-on-failure
- run:
name: "Run smoketest with fizzy-spectests"
name: "Run other tests"
working_directory: ~/build
environment:
LLVM_PROFILE_FILE: spectests-skipvalidation.profraw
command: bin/fizzy-spectests ~/project/test/spectests/smoketest
- run:
name: "Run smoketest failures with fizzy-spectests"
working_directory: ~/build
environment:
LLVM_PROFILE_FILE: spectests-failures.profraw
command: bin/fizzy-spectests ~/project/test/spectests/smoketest-failures || true
command: ctest -E 'unittests|smoketests' -j4 --schedule-random --output-on-failure


benchmark:
description: "Run benchmarks"
Expand Down
1 change: 1 addition & 0 deletions test/smoketests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
# SPDX-License-Identifier: Apache-2.0

add_subdirectory(benchmarks)
add_subdirectory(spectests)
43 changes: 43 additions & 0 deletions test/smoketests/spectests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Fizzy: A fast WebAssembly interpreter
# Copyright 2019-2020 The Fizzy Authors.
# SPDX-License-Identifier: Apache-2.0

add_test(
NAME fizzy/smoketests/spectests/default
COMMAND fizzy-spectests ${CMAKE_CURRENT_LIST_DIR}/default
)
set_tests_properties(
fizzy/smoketests/spectests/default
PROPERTIES
PASS_REGULAR_EXPRESSION "PASSED 23, FAILED 0, SKIPPED 7"
)

add_test(
NAME fizzy/smoketests/spectests/skipvalidation
COMMAND fizzy-spectests ${CMAKE_CURRENT_LIST_DIR}/default --skip-validation
)
set_tests_properties(
fizzy/smoketests/spectests/skipvalidation
PROPERTIES
PASS_REGULAR_EXPRESSION "PASSED 22, FAILED 0, SKIPPED 8"
)

add_test(
NAME fizzy/smoketests/spectests/failures
COMMAND fizzy-spectests ${CMAKE_CURRENT_LIST_DIR}/failures
)
set_tests_properties(
fizzy/smoketests/spectests/failures
PROPERTIES
PASS_REGULAR_EXPRESSION "PASSED 4, FAILED 18, SKIPPED 2"
)


# Dump coverage data to distinct files (otherwise file will be overwritten).
set_tests_properties(
fizzy/smoketests/spectests/default
fizzy/smoketests/spectests/skipvalidation
fizzy/smoketests/spectests/failures
PROPERTIES
ENVIRONMENT LLVM_PROFILE_FILE=${CMAKE_BINARY_DIR}/spectests-%p.profraw
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit a19ef43

Please sign in to comment.