mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2024-09-05 17:11:15 +02:00
81ebacc0cf
This patch forwards whatever parameter passed into run-tests to ctest or google test. I'm using this to pass `--gtest_filter=TheInterestingTest` to run-tests
20 lines
574 B
Bash
Executable file
20 lines
574 B
Bash
Executable file
#!/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
|
|
|
|
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 --output-on-failure "$@"
|
|
fi
|