test lib at c level.

This commit is contained in:
Jordan
2024-03-11 18:09:11 -07:00
parent 29483913d6
commit 330c72acbb
12 changed files with 236 additions and 23 deletions

View File

@ -20,7 +20,10 @@ cd ${BUILD_DIR}
cmake \
${SRC_DIR}\
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}\
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DCMAKE_BUILD_TYPE=Debug
make
printf "\033c"
set +e

14
scripts/runtests.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
SOURCE=${BASH_SOURCE[0]}
while [ -L "$SOURCE" ]; do
DIR=$(cd -P "$(dirname "$SOURCE")" >/dev/null 2>&1 && pwd)
SOURCE=$(readlink "$SOURCE")
[[ $SOURCE != /* ]] && SOURCE=$DIR/$SOURCE
done
DIR=$(cd -P "$(dirname "$SOURCE")" >/dev/null 2>&1 && pwd)
BUILD_DIR=$(realpath ${DIR}/../build)
printf '\033c'
${BUILD_DIR}/test_image

View File

@ -10,5 +10,5 @@ DIR=$(cd -P "$(dirname "$SOURCE")" >/dev/null 2>&1 && pwd)
SRC_DIR=$(realpath ${DIR}/../src)
find ${SRC_DIR} -name "*.c" -o -name "*.h" -o -name "CMakeLists.txt" | \
find ${SRC_DIR} -name "*.c*" -o -name "*.h" -o -name "CMakeLists.txt" | \
entr -r ${DIR}/compilelib.sh

13
scripts/watch_tests.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
SOURCE=${BASH_SOURCE[0]}
while [ -L "$SOURCE" ]; do
DIR=$(cd -P "$(dirname "$SOURCE")" >/dev/null 2>&1 && pwd)
SOURCE=$(readlink "$SOURCE")
[[ $SOURCE != /* ]] && SOURCE=$DIR/$SOURCE
done
DIR=$(cd -P "$(dirname "$SOURCE")" >/dev/null 2>&1 && pwd)
BUILD_DIR=$(realpath ${DIR}/../build)
echo ${BUILD_DIR}/test_image | entr -r ${DIR}/runtests.sh