skip test files

This commit is contained in:
benbierens 2024-05-09 11:42:52 +02:00
parent e755ff4cbf
commit f438417e72
No known key found for this signature in database
GPG Key ID: 877D2C2E09A22F3A
1 changed files with 11 additions and 2 deletions

View File

@ -10,13 +10,18 @@ cmake -S "${root}/sources" -B "${root}/build"
# prelude: not needed? # prelude: not needed?
rm "${root}/leveldb.nim"
echo >> "${root}/leveldb.nim" echo >> "${root}/leveldb.nim"
# assemble files to be compiled: # assemble files to be compiled:
extensions="c cc cpp" extensions="c cc cpp"
for ext in ${extensions}; do for ext in ${extensions}; do
for file in `find "${root}/sources" -type f -name "*.${ext}"`; do for file in `find "${root}/sources" -type f -name "*.${ext}"`; do
compile="${compile} --compile=${file}" if [[ $file == *"_test"* ]]; then
echo "Skip test file: ${file}"
else
compile="${compile} --compile=${file}"
fi
done done
done done
@ -26,6 +31,10 @@ toast \
--pnim \ --pnim \
--preprocess \ --preprocess \
--noHeader \ --noHeader \
--includeDirs="${root}/sources/include/leveldb" \ --includeDirs="${root}/sources" \
--includeDirs="${root}/sources/helpers" \
--includeDirs="${root}/sources/helpers/memenv" \
--includeDirs="${root}/sources/port" \
--includeDirs="${root}/sources/include" \
--includeDirs="${root}/build/include" \ --includeDirs="${root}/build/include" \
"${root}/sources/include/leveldb/c.h" >> "${root}/leveldb.nim" "${root}/sources/include/leveldb/c.h" >> "${root}/leveldb.nim"