Merge branch 'master' into features-1.1.0

This commit is contained in:
Rangi committed 2026-09-27 20:49:36 -04:00
commit ad4e399018
26 files changed
+241 -203

No files matched your search

+45 -20
View File
@@ -14,9 +14,10 @@ gbtemp2="$(mktemp)"
outtemp="$(mktemp)"
outtemp2="$(mktemp)"
outtemp3="$(mktemp)"
errtemp="$(mktemp)"
# shellcheck disable=SC2064 # (Immediate expansion is the desired behavior.)
trap "rm -f ${otemp@Q} ${gbtemp@Q} ${gbtemp2@Q} ${outtemp@Q} ${outtemp2@Q} ${outtemp3@Q}" EXIT
trap "rm -f ${otemp@Q} ${gbtemp@Q} ${gbtemp2@Q} ${outtemp@Q} ${outtemp2@Q} ${outtemp3@Q} ${errtemp@Q}" EXIT
tests=0
failed=0
@@ -92,31 +93,39 @@ for i in *.asm; do
continue
fi
RGBLINKFLAGS=()
if [ -f "${test}.flags" ]; then
RGBLINKFLAGS+=("@${test}.flags")
fi
ran_test=false
# Some tests have variants depending on flags
ran_flag=false
for flag in '-d' '-t' '-w'; do
if [ -f "${test}-no${flag}.out" ]; then
continueTest "-no${flag}"
rgblinkQuiet "${RGBLINKFLAGS[@]}" -o "$gbtemp" "$otemp" 2>"$outtemp"
tryDiff "${test}-no${flag}.out" "$outtemp"
bin=${test}-no${flag}.out.bin
if [ -f "$bin" ]; then
tryCmpRom "$bin"
fi
evaluateTest
ran_flag=true
ran_test=true
fi
if [ -f "${test}${flag}.out" ]; then
continueTest "$flag"
rgblinkQuiet "${RGBLINKFLAGS[@]}" ${flag} -o "$gbtemp" "$otemp" 2>"$outtemp"
tryDiff "${test}${flag}.out" "$outtemp"
bin=${test}${flag}.out.bin
if [ -f "$bin" ]; then
tryCmpRom "$bin"
fi
evaluateTest
ran_flag=true
ran_test=true
fi
done
if "$ran_flag"; then
if "$ran_test"; then
continue
fi
@@ -127,10 +136,14 @@ for i in *.asm; do
continueTest "${script#${test}}"
rgblinkQuiet "${RGBLINKFLAGS[@]}" -l "$script" -o "$gbtemp" "$otemp" 2>"$outtemp"
tryDiff "${script%.link}.out" "$outtemp"
bin=${script%.link}.out.bin
if [ -f "$bin" ]; then
tryCmpRom "$bin"
fi
evaluateTest
ran_flag=true
ran_test=true
done
if "$ran_flag"; then
if "$ran_test"; then
continue
fi
@@ -195,7 +208,8 @@ test="fragment-literals"
startTest
"$RGBASM" -o "$otemp" "$test"/a.asm
continueTest
rgblinkQuiet -o "$gbtemp" -m "$outtemp" -n "$outtemp2" "$otemp"
rgblinkQuiet -o "$gbtemp" -m "$outtemp" -n "$outtemp2" "$otemp" 2>"$errtemp"
tryDiff /dev/null "$errtemp"
tryCmpRom "$test"/ref.out.bin
tryDiff "$test"/ref.out.map "$outtemp"
tryDiff "$test"/ref.out.sym "$outtemp2"
@@ -206,7 +220,8 @@ startTest
"$RGBASM" -o "$otemp" "$test"/a.asm
"$RGBASM" -o "$outtemp" "$test"/b.asm
continueTest
rgblinkQuiet -o "$gbtemp" -n "$outtemp2" "$otemp" "$outtemp"
rgblinkQuiet -o "$gbtemp" -n "$outtemp2" "$otemp" "$outtemp" 2>"$errtemp"
tryDiff /dev/null "$errtemp"
tryCmpRom "$test"/ref.out.bin
tryDiff "$test"/ref.out.sym "$outtemp2"
evaluateTest
@@ -227,8 +242,10 @@ startTest
"$RGBASM" -o "$otemp" "$test"/a.asm
"$RGBASM" -o "$outtemp" "$test"/b.asm
continueTest
rgblinkQuiet -o "$gbtemp" "$otemp"
rgblinkQuiet -o "$gbtemp2" "$outtemp"
rgblinkQuiet -o "$gbtemp" "$otemp" 2>"$errtemp"
tryDiff /dev/null "$errtemp"
rgblinkQuiet -o "$gbtemp2" "$outtemp" 2>"$errtemp"
tryDiff /dev/null "$errtemp"
tryCmp "$gbtemp" "$gbtemp2"
evaluateTest
@@ -236,7 +253,8 @@ test="load-fragment/base"
startTest
"$RGBASM" -o "$otemp" "$test"/a.asm
continueTest
rgblinkQuiet -o "$gbtemp" -n "$outtemp" "$otemp"
rgblinkQuiet -o "$gbtemp" -n "$outtemp" "$otemp" 2>"$errtemp"
tryDiff /dev/null "$errtemp"
tryCmpRom "$test"/ref.out.bin
tryDiff "$test"/ref.out.sym "$outtemp"
evaluateTest
@@ -246,7 +264,8 @@ startTest
"$RGBASM" -o "$otemp" "$test"/a.asm
"$RGBASM" -o "$gbtemp2" "$test"/b.asm
continueTest
rgblinkQuiet -o "$gbtemp" "$otemp" "$gbtemp2"
rgblinkQuiet -o "$gbtemp" "$otemp" "$gbtemp2" 2>"$errtemp"
tryDiff /dev/null "$errtemp"
tryCmpRom "$test"/ref.out.bin
evaluateTest
@@ -256,7 +275,8 @@ startTest
"$RGBASM" -o "$outtemp" "$test"/b.asm
"$RGBASM" -o "$outtemp2" "$test"/c.asm
continueTest
rgblinkQuiet -o "$gbtemp" -m "$outtemp3" -n "$gbtemp2" "$otemp" "$outtemp" "$outtemp2"
rgblinkQuiet -o "$gbtemp" -m "$outtemp3" -n "$gbtemp2" "$otemp" "$outtemp" "$outtemp2" 2>"$errtemp"
tryDiff /dev/null "$errtemp"
tryCmpRom "$test"/ref.out.bin
tryDiff "$test"/ref.out.map "$outtemp3"
tryDiff "$test"/ref.out.sym "$gbtemp2"
@@ -387,7 +407,8 @@ startTest
"$RGBASM" -o "$otemp" "$test"/a.asm
"$RGBASM" -o "$gbtemp2" "$test"/b.asm
continueTest
rgblinkQuiet -o "$gbtemp" "$otemp" "$gbtemp2"
rgblinkQuiet -o "$gbtemp" "$otemp" "$gbtemp2" 2>"$errtemp"
tryDiff /dev/null "$errtemp"
tryCmpRom "$test"/ref.out.bin
evaluateTest
@@ -404,7 +425,8 @@ startTest
"$RGBASM" -o "$otemp" "$test"/a.asm
"$RGBASM" -o "$gbtemp2" "$test"/b.asm
continueTest
rgblinkQuiet -o "$gbtemp" "$otemp" "$gbtemp2"
rgblinkQuiet -o "$gbtemp" "$otemp" "$gbtemp2" 2>"$errtemp"
tryDiff /dev/null "$errtemp"
tryCmpRom "$test"/ref.out.bin
evaluateTest
@@ -413,7 +435,8 @@ startTest
"$RGBASM" -o "$otemp" "$test"/a.asm
"$RGBASM" -o "$gbtemp2" "$test"/b.asm
continueTest
rgblinkQuiet -o "$gbtemp" "$otemp" "$gbtemp2"
rgblinkQuiet -o "$gbtemp" "$otemp" "$gbtemp2" 2>"$errtemp"
tryDiff /dev/null "$errtemp"
tryCmpRom "$test"/ref.out.bin
evaluateTest
@@ -440,7 +463,8 @@ startTest
"$RGBASM" -o "$otemp" "$test"/a.asm
"$RGBASM" -o "$gbtemp2" "$test"/b.asm
continueTest
rgblinkQuiet -o "$gbtemp" -l "$test"/script.link "$otemp" "$gbtemp2"
rgblinkQuiet -o "$gbtemp" -l "$test"/script.link "$otemp" "$gbtemp2" 2>"$errtemp"
tryDiff /dev/null "$errtemp"
tryCmpRom "$test"/ref.out.bin
evaluateTest
@@ -449,7 +473,8 @@ startTest
"$RGBASM" -o "$otemp" "$test"/a.asm
"$RGBASM" -o "$gbtemp2" "$test"/b.asm
continueTest
rgblinkQuiet -o "$gbtemp" -l "$test"/script.link "$otemp" "$gbtemp2"
rgblinkQuiet -o "$gbtemp" -l "$test"/script.link "$otemp" "$gbtemp2" 2>"$errtemp"
tryDiff /dev/null "$errtemp"
tryCmpRom "$test"/ref.out.bin
evaluateTest