Skip to content

Commit 58428b1

Browse files
CopilotJohnAmadis
andcommitted
Make tests cross-platform compatible and remove unused variable
Co-authored-by: JohnAmadis <17320783+JohnAmadis@users.noreply.github.com>
1 parent 2222e25 commit 58428b1

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

tests/CMakeLists.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,17 @@ add_test(NAME dmdevfs_module_built
1717
COMMAND ${CMAKE_COMMAND} -E echo "Verifying dmdevfs module was built..."
1818
)
1919

20-
# Test 2: Check if dmf directory exists
20+
# Test 2: Check if dmf directory exists (cross-platform)
2121
add_test(NAME dmdevfs_dmf_directory
22-
COMMAND test -d ${CMAKE_BINARY_DIR}/dmf
22+
COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/dmf ${CMAKE_COMMAND} -E echo "DMF directory exists"
2323
)
2424

25-
# Test 3: Verify module files exist (runtime check)
25+
# Test 3: Verify module files exist (cross-platform)
2626
add_test(NAME dmdevfs_dmf_file
27-
COMMAND test -f ${CMAKE_BINARY_DIR}/dmf/dmdevfs.dmf
27+
COMMAND ${CMAKE_COMMAND} -E cat ${CMAKE_BINARY_DIR}/dmf/dmdevfs.dmf
28+
)
29+
set_tests_properties(dmdevfs_dmf_file PROPERTIES
30+
PASS_REGULAR_EXPRESSION "."
2831
)
2932

3033
# Test 4: Check source file compilation

tests/run_integration_tests.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
set -e
55

66
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
7-
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
87

98
# Colors for output
109
RED='\033[0;31m'

0 commit comments

Comments
 (0)