Skip to content

Commit

Permalink
Pass the build profile as parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
oSoMoN committed Feb 10, 2024
1 parent 37ae1c8 commit 95b8e5d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion run-upstream-testsuite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

scriptpath=$(dirname "$(readlink -f "$0")")

profile="release"
[[ -n $1 ]] && profile="$1"
binary="$scriptpath/target/$profile/diffutils"
if [[ ! -x "$binary" ]]
then
echo "Missing build for profile $profile"
exit 1
fi

# Work in a temporary directory
tempdir=$(mktemp -d)
cd "$tempdir"
Expand All @@ -18,7 +27,7 @@ git checkout &> /dev/null
# the upstream binary that is most likely installed on the system
mkdir src
cd src
ln -s "$scriptpath/target/release/diffutils" diff # XXX: this assumes a release build
ln -s "$binary" diff
cd ../tests

# Get a list of all upstream tests and run only those that invoke `diff`
Expand Down

0 comments on commit 95b8e5d

Please sign in to comment.