Skip to content

Commit

Permalink
cmake test
Browse files Browse the repository at this point in the history
  • Loading branch information
keengo99 committed Dec 9, 2024
1 parent c9333ce commit 3036bd1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ endif()
add_subdirectory(module/webdav)
add_subdirectory(test/test_child)
add_dependencies(kangle khttpd)
include(CTest)
add_test(NAME "test_kangle" COMMAND test/test.sh)
set(CPACK_SOURCE_IGNORE_FILES "${PROJECT_BINARY_DIR};/.git/;.gitignore;/.vscode;/var;/test/bin;/test/cache;/test/var;/test/tmp;/test/ext;/test/webadmin")
install(TARGETS kangle
RUNTIME DESTINATION bin
Expand Down
13 changes: 6 additions & 7 deletions test/test.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#!/bin/sh
if [ ! -d ext ] ; then
mkdir ext
fi
cp -a ../webadmin .
if [ ! -f ./bin/main.exe ] ; then
echo "please call ./build.sh first"
BIN_FILE=$(readlink -f $0)
PROJECT_PATH=$(dirname $BIN_FILE)
cp -a $PROJECT_PATH/../webadmin $PROJECT_PATH
if [ ! -f $PROJECT_PATH/bin/main.exe ] ; then
echo "please call $PROJECT_PATH/build.sh first"
exit 1
fi
./bin/main.exe -e ../build -m=true
$PROJECT_PATH/bin/main.exe -e $PROJECT_PATH/../build -m=true

0 comments on commit 3036bd1

Please sign in to comment.