2020-01-19 15:04:59 +01:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# Ensure we are in root directory
|
|
|
|
basedir="$(readlink -f `dirname $0`/..)"
|
|
|
|
cd $basedir/bin
|
|
|
|
|
|
|
|
# Scan objects first so that does not happen within a test
|
|
|
|
echo -e "\033[0;36mBuilding OpenRCT2 repository indexes...\033[0m"
|
|
|
|
./openrct2 scan-objects
|
|
|
|
|
2020-01-24 12:46:12 +01:00
|
|
|
if [[ "$OSTYPE" == "cygwin" || "$OSTYPE" == "msys" ]]; then
|
|
|
|
# Now run all the tests
|
|
|
|
echo -e "\033[0;36mRunning OpenRCT2 tests...\033[0m"
|
2020-04-18 06:18:47 +02:00
|
|
|
./tests --gtest_output=xml:../artifacts/test-results.xml "$@"
|
2020-01-24 12:46:12 +01:00
|
|
|
else
|
|
|
|
echo -e "\033[0;36mRunning OpenRCT2 tests...\033[0m"
|
2020-04-18 06:18:47 +02:00
|
|
|
ctest --output-on-failure "$@"
|
2020-01-24 12:46:12 +01:00
|
|
|
fi
|