FOSS-VG/scripts/test.sh

26 lines
514 B
Bash
Raw Normal View History

2022-06-28 18:28:44 +02:00
#!/usr/bin/env bash
if [ -z "$CXX" ]; then
CXX="c++"
fi
if [ -z "$CXXFLAGS" ]; then
CXXFLAGS="-std=c++20 -Wall"
fi
CXX_WITH_FLAGS="$CXX $CXXFLAGS"
echo -n "Using LD_LIBRARY_PATH "
if [ -z "$LD_LIBRARY_PATH" ]; then
export LD_LIBRARY_PATH=./bin/lib
else
export LD_LIBRARY_PATH=./bin/lib:"$LD_LIBRARY_PATH"
fi
echo "$LD_LIBRARY_PATH"
mkdir -pv bin/test
echo "Building and running tests one by one..."
set -v
"CXX_WITH_FLAGS" -Lbin/lib -l:nbt.so -o bin/test/nbt_helpers src/test/nbt_helpers.cpp