mirror of
https://github.com/gbdev/rgbds.git
synced 2026-05-08 10:59:36 +00:00
Avoid copying RGBFIX binary when testing it (#1933)
This is just cleaner in general, and also avoids separating it from any DLLs it may be needing.
This commit is contained in:
+5
-7
@@ -3,15 +3,13 @@
|
|||||||
export LC_ALL=C
|
export LC_ALL=C
|
||||||
|
|
||||||
tmpdir="$(mktemp -d)"
|
tmpdir="$(mktemp -d)"
|
||||||
|
|
||||||
cp ../../{rgbfix,contrib/gbdiff.bash} "$tmpdir"
|
|
||||||
src="$PWD"
|
|
||||||
cd "$tmpdir" || exit
|
|
||||||
|
|
||||||
# Immediate expansion is the desired behavior.
|
# Immediate expansion is the desired behavior.
|
||||||
# shellcheck disable=SC2064
|
# shellcheck disable=SC2064
|
||||||
trap "cd; rm -rf ${tmpdir@Q}" EXIT
|
trap "cd; rm -rf ${tmpdir@Q}" EXIT
|
||||||
|
|
||||||
|
src="$PWD"
|
||||||
|
cd "$tmpdir" || exit
|
||||||
|
|
||||||
if which cygpath &>/dev/null; then
|
if which cygpath &>/dev/null; then
|
||||||
# MinGW needs the Windows path substituted but with forward slash separators;
|
# MinGW needs the Windows path substituted but with forward slash separators;
|
||||||
# Cygwin has `cygpath` but just needs the original path substituted.
|
# Cygwin has `cygpath` but just needs the original path substituted.
|
||||||
@@ -32,7 +30,7 @@ red="$(tput setaf 1)"
|
|||||||
green="$(tput setaf 2)"
|
green="$(tput setaf 2)"
|
||||||
rescolors="$(tput op)"
|
rescolors="$(tput op)"
|
||||||
|
|
||||||
RGBFIX=./rgbfix
|
RGBFIX="$src/../../rgbfix"
|
||||||
|
|
||||||
tryDiff () {
|
tryDiff () {
|
||||||
if ! diff -au --strip-trailing-cr "$1" "$2"; then
|
if ! diff -au --strip-trailing-cr "$1" "$2"; then
|
||||||
@@ -43,7 +41,7 @@ tryDiff () {
|
|||||||
|
|
||||||
tryCmp () {
|
tryCmp () {
|
||||||
if ! cmp "$1" "$2"; then
|
if ! cmp "$1" "$2"; then
|
||||||
./gbdiff.bash "$1" "$2"
|
"$src/../../gbdiff.bash" "$1" "$2"
|
||||||
echo "${bold}${red}${3:-$1} mismatch!${rescolors}${resbold}"
|
echo "${bold}${red}${3:-$1} mismatch!${rescolors}${resbold}"
|
||||||
false
|
false
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user