trackgen: change regression tests to use installed sd2-trackgen if none is specified

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9433 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: fb2748529ef9731e4860eb8b62318d0eabd769ad
Former-commit-id: 118607da1ec8adff41a7c201826088de8d4e6eaa
This commit is contained in:
iobyte 2024-06-10 15:20:26 +00:00
parent 194873d23e
commit b2874934ce
2 changed files with 15 additions and 5 deletions

View file

@ -1,8 +1,10 @@
#!/bin/bash
# the first argument is the path of sd2-trackgen
trackgen=$1
#trackgen=~/speed-dreams-code/release/bin/sd2-trackgen
trackgen="sd2-trackgen"
if [ $# -eq 1 ]; then
trackgen=$1
fi
temp_dir=$(mktemp -d -t trackgen.XXXXXXXX)
pwd=`pwd`
@ -11,9 +13,12 @@ check () {
$trackgen -c $1 -n $2 $3 -i $pwd/../../../data/tracks/$1/$2 -o $temp_dir -a >& $temp_dir/$2.txt
status=$?
if [ $status -eq 0 ]; then
if test -f "$pwd/../../../data/tracks/$1/$2/$2.ac"; then
if test -f "$pwd/../../../data/tracks/$1/$2/$2.ac"; then
diff $pwd/../../../data/tracks/$1/$2/$2.ac $temp_dir/$2.ac > $temp_dir/$2.ac.diff
[ $? -eq 0 ] && echo "$1/$2 GOOD" || echo "$1/$2 BAD"
elif test -f "$pwd/../../../data/tracks/$1/$2/$2-src.ac"; then
diff $pwd/../../../data/tracks/$1/$2/$2-src.ac $temp_dir/$2.ac > $temp_dir/$2.ac.diff
[ $? -eq 0 ] && echo "$1/$2 GOOD" || echo "$1/$2 BAD"
else
echo "$1 $2 no $2.ac file"
fi
@ -45,6 +50,9 @@ check () {
}
# add tracks here as they are updated
#check circuit braga
#check circuit dijon
#check circuit jarama
check circuit tuna
check development barrier-testtrack
check development border-testtrack

View file

@ -1,8 +1,10 @@
#!/bin/bash
# the first argument is the path of sd2-trackgen
trackgen=$1
#trackgen=~/speed-dreams-code/release/bin/sd2-trackgen
trackgen="sd2-trackgen"
if [ $# -eq 1 ]; then
trackgen=$1
fi
temp_dir=$(mktemp -d -t trackgen.XXXXXXXX)