File: run-tests

package info (click to toggle)
openrct2 0.4.3%2Bds-1
  • links: PTS, VCS
  • area: contrib
  • in suites: bookworm
  • size: 67,880 kB
  • sloc: cpp: 549,527; ansic: 1,322; sh: 441; python: 269; xml: 180; php: 34; makefile: 19
file content (24 lines) | stat: -rwxr-xr-x 726 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/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 --output-on-failure "$@"
fi