From bf789dd7b3d0ed655f5e071f0b67ba5114d4b8e3 Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Thu, 10 Dec 2020 12:22:29 +0100 Subject: [PATCH] Add automated test for version consistency Automatically check that the version number constants (__RGBDS_MAJOR__ etc.) match `rgbasm -V` Should avoid the problem with 0.4.2's release... --- test/asm/.gitignore | 1 + test/asm/test.sh | 3 +++ test/asm/version.asm | 2 +- test/asm/version.out | 1 - 4 files changed, 5 insertions(+), 2 deletions(-) delete mode 100644 test/asm/version.out diff --git a/test/asm/.gitignore b/test/asm/.gitignore index 6a5a4030..ae8c65ea 100644 --- a/test/asm/.gitignore +++ b/test/asm/.gitignore @@ -1 +1,2 @@ quote\"file.* +version.out diff --git a/test/asm/test.sh b/test/asm/test.sh index 678bb0db..12634c95 100755 --- a/test/asm/test.sh +++ b/test/asm/test.sh @@ -22,6 +22,9 @@ tryCmp () { cmp $1 $2 || (../../contrib/gbdiff.bash $1 $2; echo "${bold}${red}${i%.asm}${variant}.out.bin mismatch!${rescolors}${resbold}"; false) } +# Add the version constants test, outputting the closest tag to the HEAD +git describe --tags --abbrev=0 > version.out + # Add the quote test, except on Windows if uname | grep -viq mingw; then cat > quote\"file.asm <