mirror of https://github.com/cutefishos/calamares
CMake: allow fine-tuning tests
- The Python configuration tests sometimes need extra setup, so do that through a CMakeTests.txt file in the test directory. - Patch up existing tests: - grubcfg needs /tmp/calamares/etc/default to exist - rawfs won't work on FreeBSD because of differences in /procmain
parent
fe069bdb23
commit
c3d8112187
@ -0,0 +1,12 @@
|
||||
# Special cases for grubcfg configuration tests:
|
||||
# - 2.global specifies /tmp/calamares as the rootMountPath,
|
||||
# so we end up editing files there. Create the directory
|
||||
# beforehand, so the test doesn't blow up.
|
||||
set(_grub_root /tmp/calamares/etc/default)
|
||||
set(_grub_file ${_grub_root}/bogus)
|
||||
|
||||
add_test(
|
||||
NAME make-grubcfg-dirs
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${_grub_root}
|
||||
)
|
||||
set_tests_properties(load-grubcfg-2 PROPERTIES DEPENDS make-grubcfg-dirs)
|
@ -0,0 +1,8 @@
|
||||
# Special cases for rawfs tests
|
||||
#
|
||||
# - On FreeBSD, /proc/mounts doesn't exist (/proc is only about processes,
|
||||
# and is rarely used). Expect the test to fail.
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
||||
set_tests_properties(load-rawfs-1 PROPERTIES WILL_FAIL TRUE)
|
||||
endif()
|
Loading…
Reference in New Issue