allow extra args to the-big-benchmark
[xonotic/xonotic.git] / the-big-benchmark.sh
1 #!/bin/sh
2
3 set -e
4
5 echo "The Big Benchmark"
6 echo " ================="
7 echo
8 echo "WARNING: running this script will destroy ANY local changes you"
9 echo "might have on the repository."
10 echo
11 echo "Are you absolutely sure you want to run this?"
12 echo
13 while :; do
14         echo -n "y/n: "
15         read -r yesno
16         case "$yesno" in
17                 y)
18                         break
19                         ;;
20                 n)
21                         echo "Aborted."
22                         exit 1
23                         ;;
24         esac
25 done
26
27 set -x
28 rm -f data/benchmark.log
29 ./all clean --reclone
30 ./all compile -r
31 ./all run "$@" -nohome -benchmarkruns 3 -benchmark demos/the-big-keybench.dem +//div0-stable
32 ./all clean -r -f
33 (
34         cd darkplaces
35         git checkout master || git checkout -t origin/master || exit 1
36 )
37 ./all compile -r
38 ./all run "$@" -nohome -benchmarkruns 3 -benchmark demos/the-big-keybench.dem +//master
39 ./all clean -r -f -u
40 set +x
41
42 echo
43 echo "Please provide the the following info to the Xonotic developers:"
44 echo " - CPU speed"
45 echo " - memory size"
46 echo " - graphics card (which vendor, which model)"
47 echo " - operating system (including whether it is 32bit or 64bit)"
48 echo " - graphics driver version"
49 echo " - the following info:"
50 cat data/benchmark.log
51 echo
52 echo "Thank you"