summaryrefslogtreecommitdiff
path: root/Meta/Lagom
diff options
context:
space:
mode:
authorAnotherTest <ali.mpfard@gmail.com>2021-01-18 10:08:30 +0330
committerAndreas Kling <kling@serenityos.org>2021-01-19 08:19:43 +0100
commit86f50aa74ecf8917bfe78532ded60c0ffd4de536 (patch)
tree45ac042cb407903c3b54b3c99c084d77ae8b92fe /Meta/Lagom
parent5ec139e7280e6beca4a15d5ab7dc24fa105905ad (diff)
downloadserenity-86f50aa74ecf8917bfe78532ded60c0ffd4de536.zip
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.
Diffstat (limited to 'Meta/Lagom')
-rw-r--r--Meta/Lagom/CMakeLists.txt9
1 files changed, 6 insertions, 3 deletions
diff --git a/Meta/Lagom/CMakeLists.txt b/Meta/Lagom/CMakeLists.txt
index 619e63a100..7a11fbcb30 100644
--- a/Meta/Lagom/CMakeLists.txt
+++ b/Meta/Lagom/CMakeLists.txt
@@ -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()