From b2874934cee412b21ddf3c11cf6e259402112f18 Mon Sep 17 00:00:00 2001 From: iobyte Date: Mon, 10 Jun 2024 15:20:26 +0000 Subject: [PATCH] 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 --- src/tools/trackgen/testtrackgen.sh | 14 +++++++++++--- src/tools/trackgen/testtrackgenall.sh | 6 ++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/tools/trackgen/testtrackgen.sh b/src/tools/trackgen/testtrackgen.sh index ab965c005..cbe81f00f 100644 --- a/src/tools/trackgen/testtrackgen.sh +++ b/src/tools/trackgen/testtrackgen.sh @@ -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 diff --git a/src/tools/trackgen/testtrackgenall.sh b/src/tools/trackgen/testtrackgenall.sh index d9d84f0db..977fa2eb3 100644 --- a/src/tools/trackgen/testtrackgenall.sh +++ b/src/tools/trackgen/testtrackgenall.sh @@ -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)