All checks were successful
Source release / source-package (push) Successful in 48s
Replace the configure-time file(COPY) of tests/linux/afp_smoke_suite.sh with an explicit build target and generated output in the build tests/linux directory. The AFP smoke suite is normally run from the build tree alongside the compiled ncpfs/libncp helpers. A configure-time copy could leave an older script in place after source updates, and clean builds did not reliably remove the copied runtime helper. That made newly added AFP coverage, such as legacy 0x09 Set File Information probes, easy to miss during runtime validation. Add an afp_smoke_suite custom target that copies the script with copy_if_different whenever the source script changes, marks it executable, and registers the build-tree copy as an additional clean file. This keeps the runtime report helper aligned with the current source tree without changing any AFP protocol behavior. Document that MARS_NWE_BUILD_LINUX_TESTS now installs the helper into the build tests/linux directory through the build target, and that clean removes the copied script so stale helpers do not survive rebuilds. Tests: git diff --check
68 lines
2.4 KiB
CMake
68 lines
2.4 KiB
CMake
# Optional Linux-side integration tests.
|
|
#
|
|
# These helpers are not built by default because they depend on the host
|
|
# ncpfs/libncp development files and on a running NetWare-compatible server.
|
|
|
|
find_path(NCPFS_INCLUDE_DIR
|
|
NAMES ncp/nwcalls.h ncp/ncplib.h
|
|
)
|
|
|
|
find_library(NCPFS_LIBRARY
|
|
NAMES ncp
|
|
)
|
|
|
|
if(NOT NCPFS_INCLUDE_DIR OR NOT NCPFS_LIBRARY)
|
|
message(FATAL_ERROR
|
|
"MARS_NWE_BUILD_LINUX_TESTS requires ncpfs/libncp headers and libncp. "
|
|
"Install the ncpfs development package or disable MARS_NWE_BUILD_LINUX_TESTS."
|
|
)
|
|
endif()
|
|
|
|
set(AFP_SMOKE_SUITE_SCRIPT
|
|
${CMAKE_CURRENT_BINARY_DIR}/afp_smoke_suite.sh
|
|
)
|
|
|
|
add_custom_command(
|
|
OUTPUT ${AFP_SMOKE_SUITE_SCRIPT}
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
${CMAKE_CURRENT_SOURCE_DIR}/afp_smoke_suite.sh
|
|
${AFP_SMOKE_SUITE_SCRIPT}
|
|
COMMAND ${CMAKE_COMMAND} -E env chmod +x ${AFP_SMOKE_SUITE_SCRIPT}
|
|
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/afp_smoke_suite.sh
|
|
COMMENT "Copying AFP smoke-suite helper"
|
|
VERBATIM
|
|
)
|
|
|
|
add_custom_target(afp_smoke_suite ALL
|
|
DEPENDS ${AFP_SMOKE_SUITE_SCRIPT}
|
|
)
|
|
|
|
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_CLEAN_FILES
|
|
${AFP_SMOKE_SUITE_SCRIPT}
|
|
)
|
|
|
|
add_executable(afp_entry_id_smoke afp_entry_id_smoke.c)
|
|
target_include_directories(afp_entry_id_smoke PRIVATE ${NCPFS_INCLUDE_DIR})
|
|
target_link_libraries(afp_entry_id_smoke ${NCPFS_LIBRARY})
|
|
|
|
add_executable(afp_file_info_smoke afp_file_info_smoke.c)
|
|
target_include_directories(afp_file_info_smoke PRIVATE ${NCPFS_INCLUDE_DIR})
|
|
target_link_libraries(afp_file_info_smoke ${NCPFS_LIBRARY})
|
|
|
|
add_executable(afp_scan_info_smoke afp_scan_info_smoke.c)
|
|
target_include_directories(afp_scan_info_smoke PRIVATE ${NCPFS_INCLUDE_DIR})
|
|
target_link_libraries(afp_scan_info_smoke ${NCPFS_LIBRARY})
|
|
|
|
|
|
add_executable(afp_open_file_fork_smoke afp_open_file_fork_smoke.c)
|
|
target_include_directories(afp_open_file_fork_smoke PRIVATE ${NCPFS_INCLUDE_DIR})
|
|
target_link_libraries(afp_open_file_fork_smoke ${NCPFS_LIBRARY})
|
|
|
|
add_executable(afp_temp_dir_handle_smoke afp_temp_dir_handle_smoke.c)
|
|
target_include_directories(afp_temp_dir_handle_smoke PRIVATE ${NCPFS_INCLUDE_DIR})
|
|
target_link_libraries(afp_temp_dir_handle_smoke ${NCPFS_LIBRARY})
|
|
|
|
add_executable(afp_set_file_info_smoke afp_set_file_info_smoke.c)
|
|
target_include_directories(afp_set_file_info_smoke PRIVATE ${NCPFS_INCLUDE_DIR})
|
|
target_link_libraries(afp_set_file_info_smoke ${NCPFS_LIBRARY})
|