mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-22 10:21:57 -05:00
24 lines
776 B
Bash
Executable file
24 lines
776 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
# Ensure we are in root directory
|
|
if [[ $(uname) == "Darwin" ]]; then
|
|
basedir="$(perl -MCwd=abs_path -le 'print abs_path readlink(shift);' `dirname $0`/..)"
|
|
else
|
|
basedir="$(readlink -f `dirname $0`/..)"
|
|
fi
|
|
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-cli scan-objects
|
|
|
|
if [[ "$OSTYPE" == "cygwin" || "$OSTYPE" == "msys" ]]; then
|
|
# Now run all the tests
|
|
echo -e "\033[0;36mRunning OpenRCT2 tests...\033[0m"
|
|
./tests --gtest_output=xml:../artifacts/test-results.xml "$@"
|
|
else
|
|
echo -e "\033[0;36mRunning OpenRCT2 tests...\033[0m"
|
|
ctest -j 2 --output-on-failure --output-junit ../artifacts/test-results.xml "$@"
|
|
fi
|