ref: fb22d12b0ff0efba78f8a65362d35cef9726e6c2
parent: add07259f4bf01b370380de5158c18a0a14950e9
parent: 83249ed69ffd3aadda3a502ef8bd162a64ca8f74
author: Eldred Habert <[email protected]>
date: Wed Jan 8 20:15:47 EST 2020
Merge pull request #463 from ISSOtm/windows_test_suite Run tests on MinGW versions
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@
rgblink
rgbfix
rgbgfx
+rgbshim.sh
*.o
*.exe
.checkpatch-camelcase.*
--- a/Makefile
+++ b/Makefile
@@ -132,6 +132,7 @@
$Q${RM} rgbfix rgbfix.exe
$Q${RM} rgbgfx rgbgfx.exe
$Qfind src/ -name "*.o" -exec rm {} \;
+ $Q${RM} rgbshim.sh
$Q${RM} src/asm/asmy.c src/asm/asmy.h
$Q${RM} src/link/lexer.c src/link/parser.c src/link/parser.h
@@ -227,17 +228,21 @@
# install instructions instead.
mingw32:
- $Qenv PKG_CONFIG_PATH=/usr/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig/ \
- make CC=i686-w64-mingw32-gcc YACC=bison -j
- $Qmv rgbasm rgbasm.exe
- $Qmv rgblink rgblink.exe
- $Qmv rgbfix rgbfix.exe
- $Qmv rgbgfx rgbgfx.exe
+ $Qmake CC=i686-w64-mingw32-gcc YACC=bison \
+ PKG_CONFIG=i686-w64-mingw32-pkg-config -j
+ $Qecho -e '#!/bin/sh\nWINEDEBUG=-all wine $$0.exe "$${@:1}"' > rgbshim.sh
+ $Qchmod +x rgbshim.sh
+ $Qln -s rgbshim.sh rgbasm
+ $Qln -s rgbshim.sh rgblink
+ $Qln -s rgbshim.sh rgbfix
+ $Qln -s rgbshim.sh rgbgfx
mingw64:
- $Qenv PKG_CONFIG_PATH=/usr/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig/ \
- make CC=x86_64-w64-mingw32-gcc YACC=bison -j
- $Qmv rgbasm rgbasm.exe
- $Qmv rgblink rgblink.exe
- $Qmv rgbfix rgbfix.exe
- $Qmv rgbgfx rgbgfx.exe
+ $Qmake CC=x86_64-w64-mingw32-gcc YACC=bison \
+ PKG_CONFIG=x86_64-w64-mingw32-pkg-config -j
+ $Qecho -e '#!/bin/sh\nWINEDEBUG=-all wine $$0.exe "$${@:1}"' > rgbshim.sh
+ $Qchmod +x rgbshim.sh
+ $Qln -s rgbshim.sh rgbasm
+ $Qln -s rgbshim.sh rgblink
+ $Qln -s rgbshim.sh rgbfix
+ $Qln -s rgbshim.sh rgbgfx
--- /dev/null
+++ b/test/asm/bracketed-symbols.err
@@ -1,0 +1,4 @@
+ERROR: bracketed-symbols.asm(16):
+ Print types are only allowed for numbers
+ERROR: bracketed-symbols.asm(20):
+ Expression must have a constant value
--- a/test/asm/bracketed-symbols.out
+++ b/test/asm/bracketed-symbols.out
@@ -1,7 +1,3 @@
-ERROR: bracketed-symbols.asm(16):
- Print types are only allowed for numbers
-ERROR: bracketed-symbols.asm(20):
- Expression must have a constant value
$2A
2a
2A
--- /dev/null
+++ b/test/asm/correct-line-number.err
@@ -1,0 +1,4 @@
+warning: correct-line-number.asm(5): [-Wuser]
+ Am I geting ahead of myself?
+warning: correct-line-number.asm(11): [-Wuser]
+ Hopefully not.
--- a/test/asm/correct-line-number.out
+++ b/test/asm/correct-line-number.out
@@ -1,4 +1,0 @@
-warning: correct-line-number.asm(5): [-Wuser]
- Am I geting ahead of myself?
-warning: correct-line-number.asm(11): [-Wuser]
- Hopefully not.
--- /dev/null
+++ b/test/asm/divzero-instr.err
@@ -1,0 +1,2 @@
+ERROR: divzero-instr.asm(2):
+ Division by zero
--- a/test/asm/divzero-instr.out
+++ b/test/asm/divzero-instr.out
@@ -1,2 +1,0 @@
-ERROR: divzero-instr.asm(2):
- Division by zero
--- /dev/null
+++ b/test/asm/divzero-section-bank.err
@@ -1,0 +1,4 @@
+ERROR: divzero-section-bank.asm(1):
+ Invalid integer constant
+ERROR: divzero-section-bank.asm(1):
+ Division by zero
--- a/test/asm/divzero-section-bank.out
+++ b/test/asm/divzero-section-bank.out
@@ -1,4 +1,0 @@
-ERROR: divzero-section-bank.asm(1):
- Invalid integer constant
-ERROR: divzero-section-bank.asm(1):
- Division by zero
--- /dev/null
+++ b/test/asm/equs-recursion.err
@@ -1,0 +1,66 @@
+ERROR: equs-recursion.asm(2):
+ Recursion limit (64) exceeded
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
+while expanding symbol "recurse"
--- a/test/asm/equs-recursion.out
+++ b/test/asm/equs-recursion.out
@@ -1,66 +1,0 @@
-ERROR: equs-recursion.asm(2):
- Recursion limit (64) exceeded
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
-while expanding symbol "recurse"
--- /dev/null
+++ b/test/asm/garbage_char.err
@@ -1,0 +1,2 @@
+ERROR: garbage_char.asm(1):
+ Found garbage character: 0xFF
--- a/test/asm/garbage_char.out
+++ b/test/asm/garbage_char.out
@@ -1,2 +1,0 @@
-ERROR: garbage_char.asm(1):
- Found garbage character: 0xFF
--- /dev/null
+++ b/test/asm/include-recursion.err
@@ -1,0 +1,2 @@
+ERROR: include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1):
+ Recursion limit (64) exceeded
--- a/test/asm/include-recursion.out
+++ b/test/asm/include-recursion.out
@@ -1,2 +1,0 @@
-ERROR: include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1) -> include-recursion.asm(1):
- Recursion limit (64) exceeded
--- /dev/null
+++ b/test/asm/label-macro-arg.err
@@ -1,0 +1,5 @@
+ERROR: label-macro-arg.asm(45) -> label-macro-arg.asm::test_char(31):
+ Label "sizeof_" created outside of a SECTION
+while expanding symbol "VAR_DEF"
+ERROR: label-macro-arg.asm(45) -> label-macro-arg.asm::test_char(31):
+ Macro 'something' not defined
--- a/test/asm/label-macro-arg.out
+++ b/test/asm/label-macro-arg.out
@@ -1,8 +1,3 @@
-ERROR: label-macro-arg.asm(45) -> label-macro-arg.asm::test_char(31):
- Label "sizeof_" created outside of a SECTION
-while expanding symbol "VAR_DEF"
-ERROR: label-macro-arg.asm(45) -> label-macro-arg.asm::test_char(31):
- Macro 'something' not defined
$5
$6
$7
--- /dev/null
+++ b/test/asm/label-outside-section.err
@@ -1,0 +1,3 @@
+ERROR: label-outside-section.asm(1):
+ Label "bad" created outside of a SECTION
+error: Assembly aborted (1 errors)!
--- a/test/asm/label-outside-section.out
+++ b/test/asm/label-outside-section.out
@@ -1,4 +1,1 @@
-ERROR: label-outside-section.asm(1):
- Label "bad" created outside of a SECTION
-error: Assembly aborted (1 errors)!
OK!
--- /dev/null
+++ b/test/asm/label-redefinition.err
@@ -1,0 +1,3 @@
+ERROR: label-redefinition.asm(7):
+ 'Sym' already defined in label-redefinition.asm::m(6)
+error: Assembly aborted (1 errors)!
--- a/test/asm/label-redefinition.out
+++ b/test/asm/label-redefinition.out
@@ -1,3 +1,0 @@
-ERROR: label-redefinition.asm(7):
- 'Sym' already defined in label-redefinition.asm::m(6)
-error: Assembly aborted (1 errors)!
--- /dev/null
+++ b/test/asm/line-continuation-whitespace.err
@@ -1,0 +1,3 @@
+ERROR: line-continuation-whitespace.asm(7):
+ Label "foo" created outside of a SECTION
+error: Assembly aborted (1 errors)!
--- a/test/asm/line-continuation-whitespace.out
+++ b/test/asm/line-continuation-whitespace.out
@@ -1,3 +1,0 @@
-ERROR: line-continuation-whitespace.asm(7):
- Label "foo" created outside of a SECTION
-error: Assembly aborted (1 errors)!
--- /dev/null
+++ b/test/asm/line-continuation.err
@@ -1,0 +1,3 @@
+ERROR: line-continuation.asm(7):
+ Label "foo" created outside of a SECTION
+error: Assembly aborted (1 errors)!
--- a/test/asm/line-continuation.out
+++ b/test/asm/line-continuation.out
@@ -1,3 +1,0 @@
-ERROR: line-continuation.asm(7):
- Label "foo" created outside of a SECTION
-error: Assembly aborted (1 errors)!
--- /dev/null
+++ b/test/asm/local-ref-without-parent.err
@@ -1,0 +1,2 @@
+ERROR: local-ref-without-parent.asm(3):
+ Local label reference '.test' in main scope
--- a/test/asm/local-ref-without-parent.out
+++ b/test/asm/local-ref-without-parent.out
@@ -1,2 +1,0 @@
-ERROR: local-ref-without-parent.asm(3):
- Local label reference '.test' in main scope
--- /dev/null
+++ b/test/asm/local-without-parent.err
@@ -1,0 +1,2 @@
+ERROR: local-without-parent.asm(2):
+ Local label in main scope
--- a/test/asm/local-without-parent.out
+++ b/test/asm/local-without-parent.out
@@ -1,2 +1,0 @@
-ERROR: local-without-parent.asm(2):
- Local label in main scope
--- /dev/null
+++ b/test/asm/local-wrong-parent.err
@@ -1,0 +1,3 @@
+ERROR: local-wrong-parent.asm(5):
+ Not currently in the scope of 'WrongParent'
+error: Assembly aborted (1 errors)!
--- a/test/asm/local-wrong-parent.out
+++ b/test/asm/local-wrong-parent.out
@@ -1,3 +1,0 @@
-ERROR: local-wrong-parent.asm(5):
- Not currently in the scope of 'WrongParent'
-error: Assembly aborted (1 errors)!
--- /dev/null
+++ b/test/asm/[email protected]
@@ -1,0 +1,4 @@
+ERROR: [email protected](1):
+ Label "foo" created outside of a SECTION
+ERROR: [email protected](1):
+ Macro '@' not defined
--- a/test/asm/[email protected]
+++ b/test/asm/[email protected]
@@ -1,4 +1,0 @@
-ERROR: [email protected](1):
- Label "foo" created outside of a SECTION
-ERROR: [email protected](1):
- Macro '@' not defined
--- /dev/null
+++ b/test/asm/macro-recursion.err
@@ -1,0 +1,2 @@
+ERROR: macro-recursion.asm(4) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2):
+ Recursion limit (64) exceeded
--- a/test/asm/macro-recursion.out
+++ b/test/asm/macro-recursion.out
@@ -1,2 +1,0 @@
-ERROR: macro-recursion.asm(4) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2) -> macro-recursion.asm::recurse(2):
- Recursion limit (64) exceeded
--- /dev/null
+++ b/test/asm/multiple-charmaps.err
@@ -1,0 +1,6 @@
+ERROR: multiple-charmaps.asm(100) -> multiple-charmaps.asm::new_(7):
+ Charmap 'map1' already exists
+ERROR: multiple-charmaps.asm(102) -> multiple-charmaps.asm::set_(13):
+ Charmap 'map5' doesn't exist
+ERROR: multiple-charmaps.asm(104) -> multiple-charmaps.asm::pop_(23):
+ No entries in the charmap stack
--- a/test/asm/multiple-charmaps.out
+++ b/test/asm/multiple-charmaps.out
@@ -1,9 +1,3 @@
-ERROR: multiple-charmaps.asm(100) -> multiple-charmaps.asm::new_(7):
- Charmap 'map1' already exists
-ERROR: multiple-charmaps.asm(102) -> multiple-charmaps.asm::set_(13):
- Charmap 'map5' doesn't exist
-ERROR: multiple-charmaps.asm(104) -> multiple-charmaps.asm::pop_(23):
- No entries in the charmap stack
main charmap
$0
newcharmap map1
--- /dev/null
+++ b/test/asm/nested-brackets.err
@@ -1,0 +1,2 @@
+ERROR: nested-brackets.asm(5):
+ Missing }
--- a/test/asm/nested-brackets.out
+++ b/test/asm/nested-brackets.out
@@ -1,3 +1,1 @@
-ERROR: nested-brackets.asm(5):
- Missing }
OK
--- /dev/null
+++ b/test/asm/null-in-macro.err
@@ -1,0 +1,2 @@
+ERROR: null-in-macro.asm(2):
+ Found null character
--- a/test/asm/null-in-macro.out
+++ b/test/asm/null-in-macro.out
@@ -1,2 +1,0 @@
-ERROR: null-in-macro.asm(2):
- Found null character
--- /dev/null
+++ b/test/asm/overflow.err
@@ -1,0 +1,12 @@
+warning: overflow.asm(24): [-Wdiv]
+ Division of min value by -1
+warning: overflow.asm(25): [-Wdiv]
+ Division of min value by -1
+warning: overflow.asm(34): [-Wshift]
+ Left shift of negative value: -1
+warning: overflow.asm(35): [-Wshift]
+ Left shift of negative value: -1
+warning: overflow.asm(39): [-Wlarge-constant]
+ Integer constant '4294967296' is too large
+warning: overflow.asm(42): [-Wlarge-constant]
+ Graphics constant '`333333333' is too long
--- a/test/asm/overflow.out
+++ b/test/asm/overflow.out
@@ -1,15 +1,3 @@
-warning: overflow.asm(24): [-Wdiv]
- Division of min value by -1
-warning: overflow.asm(25): [-Wdiv]
- Division of min value by -1
-warning: overflow.asm(34): [-Wshift]
- Left shift of negative value: -1
-warning: overflow.asm(35): [-Wshift]
- Left shift of negative value: -1
-warning: overflow.asm(39): [-Wlarge-constant]
- Integer constant '4294967296' is too large
-warning: overflow.asm(42): [-Wlarge-constant]
- Graphics constant '`333333333' is too long
$80000000
$7FFFFFFF
$80000000
--- /dev/null
+++ b/test/asm/pc-bank.err
@@ -1,0 +1,6 @@
+ERROR: pc-bank.asm(2):
+ Source address $2a00 not in $FF00 to $FFFF
+ERROR: pc-bank.asm(11):
+ @'s bank is not known yet
+ERROR: pc-bank.asm(11):
+ Non-constant expression
--- a/test/asm/pc-bank.out
+++ b/test/asm/pc-bank.out
@@ -1,8 +1,2 @@
-ERROR: pc-bank.asm(2):
- Source address $2a00 not in $FF00 to $FFFF
-ERROR: pc-bank.asm(11):
- @'s bank is not known yet
-ERROR: pc-bank.asm(11):
- Non-constant expression
@: $2A
Str: $2A
--- /dev/null
+++ b/test/asm/pops-no-pushed-sections.err
@@ -1,0 +1,2 @@
+ERROR: pops-no-pushed-sections.asm(1):
+ No entries in the section stack
--- a/test/asm/pops-no-pushed-sections.out
+++ b/test/asm/pops-no-pushed-sections.out
@@ -1,2 +1,0 @@
-ERROR: pops-no-pushed-sections.asm(1):
- No entries in the section stack
--- /dev/null
+++ b/test/asm/pops-restore-no-section.err
@@ -1,0 +1,4 @@
+ERROR: pops-restore-no-section.asm(9):
+ Label "DisallowedContent" created outside of a SECTION
+ERROR: pops-restore-no-section.asm(10):
+ Code generation before SECTION directive
--- a/test/asm/pops-restore-no-section.out
+++ b/test/asm/pops-restore-no-section.out
@@ -1,4 +1,0 @@
-ERROR: pops-restore-no-section.asm(9):
- Label "DisallowedContent" created outside of a SECTION
-ERROR: pops-restore-no-section.asm(10):
- Code generation before SECTION directive
--- /dev/null
+++ b/test/asm/reference-undefined-sym.err
@@ -1,0 +1,3 @@
+ERROR: reference-undefined-sym.asm(4):
+ 'X' already referenced at reference-undefined-sym.asm(2)
+error: Assembly aborted (1 errors)!
--- a/test/asm/reference-undefined-sym.out
+++ b/test/asm/reference-undefined-sym.out
@@ -1,3 +1,0 @@
-ERROR: reference-undefined-sym.asm(4):
- 'X' already referenced at reference-undefined-sym.asm(2)
-error: Assembly aborted (1 errors)!
--- /dev/null
+++ b/test/asm/remote-local-noexist.err
@@ -1,0 +1,2 @@
+ERROR: remote-local-noexist.asm(7):
+ 'Parent.child.fail' is a nonsensical reference to a nested local symbol
--- a/test/asm/remote-local-noexist.out
+++ b/test/asm/remote-local-noexist.out
@@ -1,2 +1,0 @@
-ERROR: remote-local-noexist.asm(7):
- 'Parent.child.fail' is a nonsensical reference to a nested local symbol
--- /dev/null
+++ b/test/asm/rept-line-no.err
@@ -1,0 +1,10 @@
+warning: rept-line-no.asm(2): [-Wuser]
+ Line 2
+warning: rept-line-no.asm(3) -> rept-line-no.asm::REPT~1(5): [-Wuser]
+ Line 5
+warning: rept-line-no.asm(3) -> rept-line-no.asm::REPT~2(5): [-Wuser]
+ Line 5
+warning: rept-line-no.asm(3) -> rept-line-no.asm::REPT~3(5): [-Wuser]
+ Line 5
+warning: rept-line-no.asm(8): [-Wuser]
+ Line 8
--- a/test/asm/rept-line-no.out
+++ b/test/asm/rept-line-no.out
@@ -1,10 +1,0 @@
-warning: rept-line-no.asm(2): [-Wuser]
- Line 2
-warning: rept-line-no.asm(3) -> rept-line-no.asm::REPT~1(5): [-Wuser]
- Line 5
-warning: rept-line-no.asm(3) -> rept-line-no.asm::REPT~2(5): [-Wuser]
- Line 5
-warning: rept-line-no.asm(3) -> rept-line-no.asm::REPT~3(5): [-Wuser]
- Line 5
-warning: rept-line-no.asm(8): [-Wuser]
- Line 8
--- /dev/null
+++ b/test/asm/strsub.err
@@ -1,0 +1,16 @@
+warning: strsub.asm(13) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
+ STRSUB: Length too big: 32
+warning: strsub.asm(14) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
+ STRSUB: Length too big: 300
+warning: strsub.asm(15) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
+ STRSUB: Position starts at 1
+warning: strsub.asm(15) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
+ STRSUB: Length too big: 300
+warning: strsub.asm(16) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
+ STRSUB: Position 4 is past the end of the string
+warning: strsub.asm(17) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
+ STRSUB: Position 4 is past the end of the string
+warning: strsub.asm(17) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
+ STRSUB: Length too big: 1
+warning: strsub.asm(20) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
+ STRSUB: Length too big: 10
--- a/test/asm/strsub.out
+++ b/test/asm/strsub.out
@@ -1,19 +1,3 @@
-warning: strsub.asm(13) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
- STRSUB: Length too big: 32
-warning: strsub.asm(14) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
- STRSUB: Length too big: 300
-warning: strsub.asm(15) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
- STRSUB: Position starts at 1
-warning: strsub.asm(15) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
- STRSUB: Length too big: 300
-warning: strsub.asm(16) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
- STRSUB: Position 4 is past the end of the string
-warning: strsub.asm(17) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
- STRSUB: Position 4 is past the end of the string
-warning: strsub.asm(17) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
- STRSUB: Length too big: 1
-warning: strsub.asm(20) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
- STRSUB: Length too big: 10
A
B
C
--- /dev/null
+++ b/test/asm/symbol-invalid-macro-arg.err
@@ -1,0 +1,2 @@
+ERROR: symbol-invalid-macro-arg.asm(1):
+ Invalid macro argument '\0' in symbol
--- a/test/asm/symbol-invalid-macro-arg.out
+++ b/test/asm/symbol-invalid-macro-arg.out
@@ -1,2 +1,0 @@
-ERROR: symbol-invalid-macro-arg.asm(1):
- Invalid macro argument '\0' in symbol
--- /dev/null
+++ b/test/asm/symbol-override.err
@@ -1,0 +1,7 @@
+ERROR: symbol-override.asm(6):
+ 'W' already defined as constant at symbol-override.asm(5)
+ERROR: symbol-override.asm(10):
+ 'X' already defined as constant at symbol-override.asm(9)
+ERROR: symbol-override.asm(14):
+ 'Y' already defined as non-constant at symbol-override.asm(13)
+error: Assembly aborted (3 errors)!
--- a/test/asm/symbol-override.out
+++ b/test/asm/symbol-override.out
@@ -1,8 +1,1 @@
-ERROR: symbol-override.asm(6):
- 'W' already defined as constant at symbol-override.asm(5)
-ERROR: symbol-override.asm(10):
- 'X' already defined as constant at symbol-override.asm(9)
-ERROR: symbol-override.asm(14):
- 'Y' already defined as non-constant at symbol-override.asm(13)
-error: Assembly aborted (3 errors)!
V=$1
--- a/test/asm/test.sh
+++ b/test/asm/test.sh
@@ -3,15 +3,17 @@
o=$(mktemp)
gb=$(mktemp)
-before=$(mktemp)
-after=$(mktemp)
+input=$(mktemp)
+output=$(mktemp)
+errput=$(mktemp)
rc=0
for i in *.asm; do
for variant in '' '.pipe'; do
if [ -z "$variant" ]; then
- ../../rgbasm -Weverything -o $o $i > $after 2>&1
+ ../../rgbasm -Weverything -o $o $i > $output 2> $errput
desired_output=${i%.asm}.out
+ desired_errput=${i%.asm}.err
else
# `include-recursion.asm` refers to its own name inside the test code.
# Skip testing with stdin input for that file.
@@ -23,27 +25,34 @@
# stdin redirection makes the input an unseekable pipe - a scenario
# that's harder to deal with and was broken when the feature was
# first implemented.
- cat $i | ../../rgbasm -Weverything -o $o - > $after 2>&1
+ cat $i | ../../rgbasm -Weverything -o $o - > $output 2> $errput
+ # Use two otherwise unused files for temp storage
+ desired_output=$input
+ desired_errput=$gb
# Escape regex metacharacters
- desired_output=$before
subst="$(printf '%s\n' "$i" | sed 's:[][\/.^$*]:\\&:g')"
+ # Replace the file name with a dash to match changed output
sed "s/$subst/-/g" ${i%.asm}.out > $desired_output
+ sed "s/$subst/-/g" ${i%.asm}.err > $desired_errput
fi
- diff -u $desired_output $after
+ diff -u --strip-trailing-cr $desired_output $output
rc=$(($? || $rc))
+ diff -u --strip-trailing-cr $desired_errput $errput
+ rc=$(($? || $rc))
+
bin=${i%.asm}.out.bin
if [ -f $bin ]; then
- ../../rgblink -o $gb $o > $after 2>&1
- dd if=$gb count=1 bs=$(printf %s $(wc -c < $bin)) > $after 2>/dev/null
- hexdump -C $after > $before && mv $before $after
- hexdump -C $bin > $before
- diff -u $before $after
+ ../../rgblink -o $gb $o > $output 2>&1
+ dd if=$gb count=1 bs=$(printf %s $(wc -c < $bin)) > $output 2>/dev/null
+ hexdump -C $output > $input && mv $input $output
+ hexdump -C $bin > $input
+ diff -u --strip-trailing-cr $input $output
rc=$(($? || $rc))
fi
done
done
-rm -f $o $gb $before $after
+rm -f $o $gb $input $output
exit $rc
--- /dev/null
+++ b/test/asm/undefined-dot.err
@@ -1,0 +1,1 @@
+error: undefined-dot.asm(3) : '.' not defined
--- a/test/asm/undefined-dot.out
+++ b/test/asm/undefined-dot.out
@@ -1,1 +1,0 @@
-error: undefined-dot.asm(3) : '.' not defined
--- a/test/link/test.sh
+++ b/test/link/test.sh
@@ -12,50 +12,50 @@
$RGBASM -o $otemp bank-numbers.asm
$RGBLINK -o $gbtemp $otemp > $outtemp 2>&1
-diff bank-numbers.out $outtemp
+diff --strip-trailing-cr bank-numbers.out $outtemp
rc=$(($? || $rc))
dd if=$gbtemp count=1 bs=20 > $otemp 2>/dev/null
-diff bank-numbers.out.bin $otemp
+diff --strip-trailing-cr bank-numbers.out.bin $otemp
rc=$(($? || $rc))
$RGBASM -o $otemp section-attributes.asm
$RGBLINK -l section-attributes.link -o $gbtemp $otemp > $outtemp 2>&1
-diff section-attributes.out $outtemp
+diff --strip-trailing-cr section-attributes.out $outtemp
rc=$(($? || $rc))
$RGBLINK -l section-attributes-mismatch.link -o $gbtemp $otemp > $outtemp 2>&1
-diff section-attributes-mismatch.out $outtemp
+diff --strip-trailing-cr section-attributes-mismatch.out $outtemp
rc=$(($? || $rc))
$RGBASM -o $otemp wramx-dmg-mode.asm
$RGBLINK -o $gbtemp $otemp > $outtemp 2>&1
-diff wramx-dmg-mode-no-d.out $outtemp
+diff --strip-trailing-cr wramx-dmg-mode-no-d.out $outtemp
rc=$(($? || $rc))
$RGBLINK -d -o $gbtemp $otemp > $outtemp 2>&1
-diff wramx-dmg-mode-d.out $outtemp
+diff --strip-trailing-cr wramx-dmg-mode-d.out $outtemp
rc=$(($? || $rc))
$RGBASM -o $otemp vram-fixed-dmg-mode.asm
$RGBLINK -o $gbtemp $otemp > $outtemp 2>&1
-diff vram-fixed-dmg-mode-no-d.out $outtemp
+diff --strip-trailing-cr vram-fixed-dmg-mode-no-d.out $outtemp
rc=$(($? || $rc))
$RGBLINK -d -o $gbtemp $otemp > $outtemp 2>&1
-diff vram-fixed-dmg-mode-d.out $outtemp
+diff --strip-trailing-cr vram-fixed-dmg-mode-d.out $outtemp
rc=$(($? || $rc))
$RGBASM -o $otemp vram-floating-dmg-mode.asm
$RGBLINK -o $gbtemp $otemp > $outtemp 2>&1
-diff vram-floating-dmg-mode-no-d.out $outtemp
+diff --strip-trailing-cr vram-floating-dmg-mode-no-d.out $outtemp
rc=$(($? || $rc))
$RGBLINK -d -o $gbtemp $otemp > $outtemp 2>&1
-diff vram-floating-dmg-mode-d.out $outtemp
+diff --strip-trailing-cr vram-floating-dmg-mode-d.out $outtemp
rc=$(($? || $rc))
$RGBASM -o $otemp romx-tiny.asm
$RGBLINK -o $gbtemp $otemp > $outtemp 2>&1
-diff romx-tiny-no-t.out $outtemp
+diff --strip-trailing-cr romx-tiny-no-t.out $outtemp
rc=$(($? || $rc))
$RGBLINK -t -o $gbtemp $otemp > $outtemp 2>&1
-diff romx-tiny-t.out $outtemp
+diff --strip-trailing-cr romx-tiny-t.out $outtemp
rc=$(($? || $rc))
$RGBASM -o $otemp high-low-a.asm
@@ -62,12 +62,12 @@
$RGBLINK -o $gbtemp $otemp
$RGBASM -o $otemp high-low-b.asm
$RGBLINK -o $gbtemp2 $otemp
-diff $gbtemp $gbtemp2
+diff --strip-trailing-cr $gbtemp $gbtemp2
rc=$(($? || $rc))
$RGBASM -o $otemp all-instructions.asm
$RGBLINK -o $gbtemp $otemp
-diff all-instructions.out.bin $gbtemp
+diff --strip-trailing-cr all-instructions.out.bin $gbtemp
rc=$(($? || $rc))
rm -f $otemp $gbtemp $gbtemp2 $outtemp
--- a/test/run-tests.sh
+++ b/test/run-tests.sh
@@ -28,8 +28,7 @@
git fetch
git checkout fa7261a8eea2676746c130a517479e2a82a7d352
make clean
-make -j
-make compare
+make -j4 compare
popd
if [ ! -d pokered ]; then
@@ -39,8 +38,7 @@
git fetch
git checkout ab696295b3d029663062238e8033882bb8cd9cff
make clean
-make -j
-make compare
+make -j4 compare
popd
if [ ! -d ucity ]; then
@@ -50,5 +48,5 @@
git fetch
git checkout b0635f12553c2fae947fd91aa54d4caa602d8266
make clean
-make -j
+make -j4
popd