diff --git a/CMakeLists.txt b/CMakeLists.txt index e110db4..a4daf05 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,13 +77,7 @@ option(ENABLE_XATTR "Should we build Mars Nwe with extended attribute support?" option(MARS_NWE_INSTALL_DOSUTILS "Install DOS client utilities" ON) option(MARS_NWE_INSTALL_NEW_DOSUTILS "Install the new/experimental DOS client utilities instead of legacy netold.exe" OFF) option(MARS_NWE_BUILD_DOSUTILS "Build DOS client utilities with Open Watcom" OFF) -option(MARS_NWE_BUILD_AFP_TESTS "Build optional AFP integration tests using ncpfs/libncp" OFF) -if(DEFINED MARS_NWE_BUILD_LINUX_TESTS) - if(MARS_NWE_BUILD_LINUX_TESTS) - set(MARS_NWE_BUILD_AFP_TESTS ON CACHE BOOL "Build optional AFP integration tests using ncpfs/libncp" FORCE) - endif() - message(WARNING "MARS_NWE_BUILD_LINUX_TESTS is deprecated; use MARS_NWE_BUILD_AFP_TESTS instead.") -endif() +option(MARS_NWE_BUILD_TESTS "Build optional mars_nwe integration tests" OFF) set(MARS_NWE_SMART_ADMIN_GROUP "root" CACHE STRING "Unix group allowed to log in to the SMArT/nwwebui admin interface") @@ -240,8 +234,8 @@ add_subdirectory(src) add_subdirectory(opt) add_subdirectory(sys) -if(MARS_NWE_BUILD_AFP_TESTS) - add_subdirectory(tests/afp) +if(MARS_NWE_BUILD_TESTS) + add_subdirectory(tests) endif() add_subdirectory(dosutils) add_subdirectory(mail) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 0000000..c79b9ed --- /dev/null +++ b/tests/CMakeLists.txt @@ -0,0 +1,7 @@ +# Optional mars_nwe integration test groups. +# +# The top-level MARS_NWE_BUILD_TESTS option gates all integration tests. +# Keep per-protocol/per-feature test wiring below this directory so the main +# project CMakeLists.txt does not grow with each test group. + +add_subdirectory(afp) diff --git a/tests/afp/CMakeLists.txt b/tests/afp/CMakeLists.txt index 6c63b58..00be83d 100644 --- a/tests/afp/CMakeLists.txt +++ b/tests/afp/CMakeLists.txt @@ -13,8 +13,8 @@ find_library(NCPFS_LIBRARY if(NOT NCPFS_INCLUDE_DIR OR NOT NCPFS_LIBRARY) message(FATAL_ERROR - "MARS_NWE_BUILD_AFP_TESTS requires ncpfs/libncp headers and libncp for AFP smoke tests. " - "Install the ncpfs development package or disable MARS_NWE_BUILD_AFP_TESTS." + "MARS_NWE_BUILD_TESTS requires ncpfs/libncp headers and libncp for AFP smoke tests. " + "Install the ncpfs development package or disable MARS_NWE_BUILD_TESTS." ) endif() diff --git a/tests/afp/README.md b/tests/afp/README.md index adc4c90..183f018 100644 --- a/tests/afp/README.md +++ b/tests/afp/README.md @@ -1,4 +1,4 @@ -# Linux NCP smoke tests +# AFP integration smoke tests This directory contains optional AFP integration smoke tests for endpoints that are easier to exercise from a Unix host than from the DOS test utilities. @@ -22,7 +22,7 @@ source-level `org.mars-nwe.*` names through the portable `user.` namespace. Build with: ```sh -cmake -DMARS_NWE_BUILD_AFP_TESTS=ON ... +cmake -DMARS_NWE_BUILD_TESTS=ON ... cmake --build . --target afp_entry_id_smoke cmake --build . --target afp_file_info_smoke cmake --build . --target afp_scan_info_smoke @@ -41,7 +41,7 @@ new AFP lines appended to the mars_nwe server log while the suite runs, and adds `getfattr -e hex` checks for the mars_nwe AFP xattrs on the tested Unix file. -When `MARS_NWE_BUILD_AFP_TESTS=ON` is enabled, CMake copies the helper into +When `MARS_NWE_BUILD_TESTS=ON` is enabled, CMake copies the helper into the build `tests/afp` directory through the `afp_smoke_suite` build target. This keeps the runtime copy in sync with source changes, and `cmake --build --target clean` removes the copied script so stale suite helpers do