From c05e3fcec1623deb9c2fa4b023b1e2a6dc289bbb Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 30 Apr 2026 13:07:27 +0200 Subject: tests: adapt to the new 'unused' checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- scripts/test-e2e.sh | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'scripts') diff --git a/scripts/test-e2e.sh b/scripts/test-e2e.sh index b25b50b..af11742 100755 --- a/scripts/test-e2e.sh +++ b/scripts/test-e2e.sh @@ -50,7 +50,7 @@ diff tests/out/defines-two.nes tests/expected/defines-two.nes exit_code=$((exit_code + $?)) echo "test: custom => unused.nes" -./target/debug/nasm -c empty --asan -o tests/out/unused.nes tests/unused.s 2>tests/out/unused-warning.txt +./target/debug/nasm -c empty --asan -o tests/out/unused.nes tests/unused.s 2> >(sort > tests/out/unused-warning.txt) diff tests/out/unused-warning.txt tests/expected/unused-warning.txt exit_code=$((exit_code + $?)) diff tests/out/unused.nes tests/expected/unused.nes @@ -117,7 +117,7 @@ exit_code=$((exit_code + $?)) # doesn't matter that much as they are small programs. echo "test: code.nes => basics/sprite.nes" -$AS65 --no-errors -b ./target/debug/nasm -C tests/code.nes/config/nrom.cfg -o /dev/null tests/code.nes/basics/sprite.s +$AS65 --no-errors --allow-unused -b ./target/debug/nasm -C tests/code.nes/config/nrom.cfg -o /dev/null tests/code.nes/basics/sprite.s exit_code=$((exit_code + $?)) echo "test: code.nes => basics/input.nes" @@ -129,11 +129,11 @@ $AS65 --no-errors -b ./target/debug/nasm -C tests/code.nes/config/mmc1.cfg -o /d exit_code=$((exit_code + $?)) echo "test: code.nes => basics/flicker.nes" -$AS65 --no-errors -b ./target/debug/nasm -C tests/code.nes/config/nrom.cfg -o /dev/null tests/code.nes/basics/flicker.s +$AS65 --no-errors --allow-unused -b ./target/debug/nasm -C tests/code.nes/config/nrom.cfg -o /dev/null tests/code.nes/basics/flicker.s exit_code=$((exit_code + $?)) echo "test: code.nes => basics/unrom.nes" -$AS65 --no-errors -b ./target/debug/nasm -C tests/code.nes/config/unrom.cfg -o /dev/null tests/code.nes/basics/unrom.s +$AS65 --no-errors --allow-unused -b ./target/debug/nasm -C tests/code.nes/config/unrom.cfg -o /dev/null tests/code.nes/basics/unrom.s exit_code=$((exit_code + $?)) echo "test: code.nes => basics/chr-ram.nes" @@ -141,54 +141,54 @@ $AS65 --no-errors -b ./target/debug/nasm -C tests/code.nes/config/unrom.cfg -o / exit_code=$((exit_code + $?)) echo "test: code.nes => fx/blink.nes" -$AS65 --no-errors -b ./target/debug/nasm -C tests/code.nes/config/mmc3.cfg -o /dev/null tests/code.nes/fx/blink.s +$AS65 --no-errors --allow-unused -b ./target/debug/nasm -C tests/code.nes/config/mmc3.cfg -o /dev/null tests/code.nes/fx/blink.s exit_code=$((exit_code + $?)) echo "test: code.nes => scroll/toggle.nes" -$AS65 --no-errors -b ./target/debug/nasm -C tests/code.nes/config/nrom.cfg -o /dev/null tests/code.nes/scroll/toggle.s +$AS65 --no-errors --allow-unused -b ./target/debug/nasm -C tests/code.nes/config/nrom.cfg -o /dev/null tests/code.nes/scroll/toggle.s exit_code=$((exit_code + $?)) echo "test: code.nes => scroll/level.nes" -$AS65 --no-errors -b ./target/debug/nasm -C tests/code.nes/config/nrom.cfg -o /dev/null tests/code.nes/scroll/level.s +$AS65 --no-errors --allow-unused -b ./target/debug/nasm -C tests/code.nes/config/nrom.cfg -o /dev/null tests/code.nes/scroll/level.s exit_code=$((exit_code + $?)) echo "test: code.nes => scroll/sprite0.nes" -$AS65 --no-errors -b ./target/debug/nasm -C tests/code.nes/config/nrom.cfg -o /dev/null tests/code.nes/scroll/sprite0.s +$AS65 --no-errors --allow-unused -b ./target/debug/nasm -C tests/code.nes/config/nrom.cfg -o /dev/null tests/code.nes/scroll/sprite0.s exit_code=$((exit_code + $?)) echo "test: code.nes => scroll/mmc3.nes" -$AS65 --no-errors -b ./target/debug/nasm -C tests/code.nes/config/mmc3.cfg -o /dev/null tests/code.nes/scroll/mmc3.s +$AS65 --no-errors --allow-unused -b ./target/debug/nasm -C tests/code.nes/config/mmc3.cfg -o /dev/null tests/code.nes/scroll/mmc3.s exit_code=$((exit_code + $?)) echo "test: code.nes => rand/rand.nes" -$AS65 --no-errors -b ./target/debug/nasm -C tests/code.nes/config/nrom.cfg -o /dev/null tests/code.nes/rand/rand.s +$AS65 --no-errors --allow-unused -b ./target/debug/nasm -C tests/code.nes/config/nrom.cfg -o /dev/null tests/code.nes/rand/rand.s exit_code=$((exit_code + $?)) echo "test: code.nes => scroll/roulette.nes" -$AS65 --no-errors -b ./target/debug/nasm -C tests/code.nes/config/mmc3.cfg -o /dev/null tests/code.nes/scroll/roulette.s +$AS65 --no-errors --allow-unused -b ./target/debug/nasm -C tests/code.nes/config/mmc3.cfg -o /dev/null tests/code.nes/scroll/roulette.s exit_code=$((exit_code + $?)) echo "test: code.nes => space/space.nes" -$AS65 --no-errors -b ./target/debug/nasm -C tests/code.nes/config/nrom.cfg -o /dev/null tests/code.nes/space/src/space.s +$AS65 --no-errors --allow-unused -b ./target/debug/nasm -C tests/code.nes/config/nrom.cfg -o /dev/null tests/code.nes/space/src/space.s exit_code=$((exit_code + $?)) ## # aoc2023.nes echo "test: aoc2023.nes => 1.nes" -$AS65 --no-errors -b ./target/debug/nasm -C tests/cfg/nrom65.cfg -o /dev/null tests/aoc2023.nes/src/1.s +$AS65 --no-errors --allow-unused -b ./target/debug/nasm -C tests/cfg/nrom65.cfg -o /dev/null tests/aoc2023.nes/src/1.s exit_code=$((exit_code + $?)) echo "test: aoc2023.nes => 2.nes" -$AS65 --no-errors -b ./target/debug/nasm -C tests/cfg/nrom65.cfg -o /dev/null tests/aoc2023.nes/src/2.s +$AS65 --no-errors --allow-unused -b ./target/debug/nasm -C tests/cfg/nrom65.cfg -o /dev/null tests/aoc2023.nes/src/2.s exit_code=$((exit_code + $?)) echo "test: aoc2023.nes => 3.nes" -$AS65 --no-errors -b ./target/debug/nasm -C tests/cfg/nrom65.cfg -o /dev/null tests/aoc2023.nes/src/3.s +$AS65 --no-errors --allow-unused -b ./target/debug/nasm -C tests/cfg/nrom65.cfg -o /dev/null tests/aoc2023.nes/src/3.s exit_code=$((exit_code + $?)) echo "test: aoc2023.nes => 4.nes" -$AS65 --no-errors -b ./target/debug/nasm -C tests/cfg/nrom65.cfg -o /dev/null tests/aoc2023.nes/src/4.s +$AS65 --no-errors --allow-unused -b ./target/debug/nasm -C tests/cfg/nrom65.cfg -o /dev/null tests/aoc2023.nes/src/4.s exit_code=$((exit_code + $?)) ## @@ -205,7 +205,7 @@ echo "LEVEL = 0" >> tests/jetpac.nes/config/generated.s # NOTE: we use '--stats' as otherwise the 'segments.txt' file would be removed # from the jetpac.nes repository, and the submodule would then be marked with # "-dirty". -$AS65 --no-errors --strict --stats -b ./target/debug/nasm -C tests/jetpac.nes/config/nrom.cfg -o /dev/null tests/jetpac.nes/src/jetpac.s 1>/dev/null +$AS65 --no-errors --allow-unused --strict --stats -b ./target/debug/nasm -C tests/jetpac.nes/config/nrom.cfg -o /dev/null tests/jetpac.nes/src/jetpac.s 1>/dev/null # Remove the generated.s file to avoid git from thinking we have modified the # project in any meaningful way. -- cgit v1.2.3