mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 17:07:47 +00:00
Shell: Make tests use PASS/FAIL instead of exit codes
There's no guarantee that the last executed command will have a zero exit code, and so the shell exit code may or may not be zero, even if all the tests pass. Also changes the `test || echo fail && exit` to `if not test { echo fail && exit }`, since that's nicer-looking.
This commit is contained in:
parent
5ec139e728
commit
86f50aa74e
14 changed files with 177 additions and 128 deletions
|
@ -145,10 +145,13 @@ if (BUILD_LAGOM)
|
|||
get_filename_component(TEST_NAME ${TEST_PATH} NAME_WE)
|
||||
add_test(
|
||||
NAME "Shell-${TEST_NAME}"
|
||||
COMMAND shell_lagom "${TEST_PATH}"
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMAND shell_lagom --skip-shellrc "${TEST_PATH}"
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../Userland/Shell/Tests
|
||||
)
|
||||
set_tests_properties("Shell-${TEST_NAME}" PROPERTIES TIMEOUT 10)
|
||||
set_tests_properties("Shell-${TEST_NAME}" PROPERTIES
|
||||
TIMEOUT 10
|
||||
FAIL_REGULAR_EXPRESSION "FAIL"
|
||||
PASS_REGULAR_EXPRESSION "PASS")
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue