mirror of
https://github.com/yasm/yasm
synced 2026-08-26 22:26:05 -04:00
Run test input files through standard input instead of as input files to avoid
pathname changing issues when builddir != srcdir (previous workaround worked for text files, but for more complex objfmts such as coff that embed the source filename in the binary output file, we need to find a different way). svn path=/trunk/yasm/; revision=771
This commit is contained in:
parent
3adada2a00
commit
9b744cb938
19 changed files with 74 additions and 71 deletions
|
|
@ -1 +1 @@
|
|||
./src/arch/x86/tests/addrop-err.asm:2: invalid effective address (displacement size)
|
||||
-:2: invalid effective address (displacement size)
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
./src/arch/x86/tests/cpubasic-err.asm:2: invalid combination of opcode and operands
|
||||
-:2: invalid combination of opcode and operands
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
./src/arch/x86/tests/div-err.asm:1: cannot override register size
|
||||
./src/arch/x86/tests/div-err.asm:3: cannot override register size
|
||||
./src/arch/x86/tests/div-err.asm:4: cannot override register size
|
||||
./src/arch/x86/tests/div-err.asm:5: cannot override register size
|
||||
-:1: cannot override register size
|
||||
-:3: cannot override register size
|
||||
-:4: cannot override register size
|
||||
-:5: cannot override register size
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
./src/arch/x86/tests/lds-err.asm:2: invalid combination of opcode and operands
|
||||
./src/arch/x86/tests/lds-err.asm:3: invalid combination of opcode and operands
|
||||
./src/arch/x86/tests/lds-err.asm:5: invalid combination of opcode and operands
|
||||
./src/arch/x86/tests/lds-err.asm:6: invalid combination of opcode and operands
|
||||
-:2: invalid combination of opcode and operands
|
||||
-:3: invalid combination of opcode and operands
|
||||
-:5: invalid combination of opcode and operands
|
||||
-:6: invalid combination of opcode and operands
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
./src/arch/x86/tests/opsize-err.asm:3: invalid combination of opcode and operands
|
||||
-:3: invalid combination of opcode and operands
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
./src/objfmts/bin/tests/float-err.asm:2: invalid floating point constant size
|
||||
./src/objfmts/bin/tests/float-err.asm:3: invalid floating point constant size
|
||||
./src/objfmts/bin/tests/float-err.asm:4: overflow in floating point expression
|
||||
./src/objfmts/bin/tests/float-err.asm:5: underflow in floating point expression
|
||||
./src/objfmts/bin/tests/float-err.asm:8: invalid floating point constant size
|
||||
./src/objfmts/bin/tests/float-err.asm:9: invalid floating point constant size
|
||||
./src/objfmts/bin/tests/float-err.asm:11: overflow in floating point expression
|
||||
./src/objfmts/bin/tests/float-err.asm:12: underflow in floating point expression
|
||||
-:2: invalid floating point constant size
|
||||
-:3: invalid floating point constant size
|
||||
-:4: overflow in floating point expression
|
||||
-:5: underflow in floating point expression
|
||||
-:8: invalid floating point constant size
|
||||
-:9: invalid floating point constant size
|
||||
-:11: overflow in floating point expression
|
||||
-:12: underflow in floating point expression
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
./src/objfmts/bin/tests/integer-warn.asm:5: warning: Numeric constant too large for internal format
|
||||
./src/objfmts/bin/tests/integer-warn.asm:6: warning: Numeric constant too large for internal format
|
||||
-:5: warning: Numeric constant too large for internal format
|
||||
-:6: warning: Numeric constant too large for internal format
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
./src/objfmts/bin/tests/reserve-err.asm:4: expression must not contain floating point value
|
||||
./src/objfmts/bin/tests/reserve-err.asm:5: expression must not contain floating point value
|
||||
./src/objfmts/bin/tests/reserve-err.asm:7: attempt to reserve non-constant quantity of space
|
||||
./src/objfmts/bin/tests/reserve-err.asm:11: expression must not contain floating point value
|
||||
./src/objfmts/bin/tests/reserve-err.asm:12: expression must not contain floating point value
|
||||
./src/objfmts/bin/tests/reserve-err.asm:14: attempt to reserve non-constant quantity of space
|
||||
-:4: expression must not contain floating point value
|
||||
-:5: expression must not contain floating point value
|
||||
-:7: attempt to reserve non-constant quantity of space
|
||||
-:11: expression must not contain floating point value
|
||||
-:12: expression must not contain floating point value
|
||||
-:14: attempt to reserve non-constant quantity of space
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
./src/objfmts/bin/tests/reserve.asm:2: warning: uninitialized space declared in code/data section: zeroing
|
||||
./src/objfmts/bin/tests/reserve.asm:3: warning: uninitialized space declared in code/data section: zeroing
|
||||
./src/objfmts/bin/tests/reserve.asm:4: warning: uninitialized space declared in code/data section: zeroing
|
||||
./src/objfmts/bin/tests/reserve.asm:5: warning: uninitialized space declared in code/data section: zeroing
|
||||
-:2: warning: uninitialized space declared in code/data section: zeroing
|
||||
-:3: warning: uninitialized space declared in code/data section: zeroing
|
||||
-:4: warning: uninitialized space declared in code/data section: zeroing
|
||||
-:5: warning: uninitialized space declared in code/data section: zeroing
|
||||
|
|
|
|||
21
out_test.sh
21
out_test.sh
|
|
@ -20,14 +20,14 @@ for asm in ${srcdir}/$2/*.asm
|
|||
do
|
||||
a=`echo ${asm} | sed 's,^.*/,,;s,.asm$,,'`
|
||||
o=${a}$5
|
||||
oh=${o}.hx
|
||||
oh=${a}.hx
|
||||
og=`echo ${asm} | sed 's,.asm$,.hex,'`
|
||||
e=${a}.ew
|
||||
eg=`echo ${asm} | sed 's,.asm$,.errwarn,'`
|
||||
|
||||
echo $ECHO_N "$1: Testing $3 for ${a} return value ... $ECHO_C"
|
||||
# Run within a subshell to prevent signal messages from displaying.
|
||||
sh -c "./yasm $4 ${asm} -o ${o} 2>${e}" 2>/dev/null
|
||||
sh -c "cat ${asm} | ./yasm $4 -o ${o} 2>${e}" 2>/dev/null
|
||||
status=$?
|
||||
if test $status -gt 128; then
|
||||
# We should never get a coredump!
|
||||
|
|
@ -44,9 +44,10 @@ do
|
|||
passedct=`expr $passedct + 1`
|
||||
echo $ECHO_N "$1: Testing $3 for ${a} error/warnings ... $ECHO_C"
|
||||
# We got errors, check to see if they match:
|
||||
cat ${e} | sed "s,${srcdir}/,./," >${e}.2
|
||||
mv ${e}.2 ${e}
|
||||
if diff -w ${eg} ${e} > /dev/null; then
|
||||
#cat ${e} | sed "s,${srcdir}/,./," >${e}.2
|
||||
#mv ${e}.2 ${e}
|
||||
diff -w ${eg} ${e} > /dev/null
|
||||
if test $? -eq 0; then
|
||||
# Error/warnings match, it passes!
|
||||
echo "PASS."
|
||||
passedct=`expr $passedct + 1`
|
||||
|
|
@ -67,13 +68,15 @@ do
|
|||
passedct=`expr $passedct + 1`
|
||||
echo $ECHO_N "$1: Testing $3 for ${a} output file ... $ECHO_C"
|
||||
${PERL} ${srcdir}/test_hd.pl ${o} > ${oh}
|
||||
if diff ${og} ${oh} > /dev/null; then
|
||||
diff ${og} ${oh} > /dev/null
|
||||
if test $? -eq 0; then
|
||||
echo "PASS."
|
||||
passedct=`expr $passedct + 1`
|
||||
echo $ECHO_N "$1: Testing $3 for ${a} error/warnings ... $ECHO_C"
|
||||
cat ${e} | sed "s,${srcdir}/,./," >${e}.2
|
||||
mv ${e}.2 ${e}
|
||||
if diff -w ${eg} ${e} > /dev/null; then
|
||||
#cat ${e} | sed "s,${srcdir}/,./," >${e}.2
|
||||
#mv ${e}.2 ${e}
|
||||
diff -w ${eg} ${e} > /dev/null
|
||||
if test $? -eq 0; then
|
||||
# Both object file and error/warnings match, it passes!
|
||||
echo "PASS."
|
||||
passedct=`expr $passedct + 1`
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
./src/arch/x86/tests/addrop-err.asm:2: invalid effective address (displacement size)
|
||||
-:2: invalid effective address (displacement size)
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
./src/arch/x86/tests/cpubasic-err.asm:2: invalid combination of opcode and operands
|
||||
-:2: invalid combination of opcode and operands
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
./src/arch/x86/tests/div-err.asm:1: cannot override register size
|
||||
./src/arch/x86/tests/div-err.asm:3: cannot override register size
|
||||
./src/arch/x86/tests/div-err.asm:4: cannot override register size
|
||||
./src/arch/x86/tests/div-err.asm:5: cannot override register size
|
||||
-:1: cannot override register size
|
||||
-:3: cannot override register size
|
||||
-:4: cannot override register size
|
||||
-:5: cannot override register size
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
./src/arch/x86/tests/lds-err.asm:2: invalid combination of opcode and operands
|
||||
./src/arch/x86/tests/lds-err.asm:3: invalid combination of opcode and operands
|
||||
./src/arch/x86/tests/lds-err.asm:5: invalid combination of opcode and operands
|
||||
./src/arch/x86/tests/lds-err.asm:6: invalid combination of opcode and operands
|
||||
-:2: invalid combination of opcode and operands
|
||||
-:3: invalid combination of opcode and operands
|
||||
-:5: invalid combination of opcode and operands
|
||||
-:6: invalid combination of opcode and operands
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
./src/arch/x86/tests/opsize-err.asm:3: invalid combination of opcode and operands
|
||||
-:3: invalid combination of opcode and operands
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
./src/objfmts/bin/tests/float-err.asm:2: invalid floating point constant size
|
||||
./src/objfmts/bin/tests/float-err.asm:3: invalid floating point constant size
|
||||
./src/objfmts/bin/tests/float-err.asm:4: overflow in floating point expression
|
||||
./src/objfmts/bin/tests/float-err.asm:5: underflow in floating point expression
|
||||
./src/objfmts/bin/tests/float-err.asm:8: invalid floating point constant size
|
||||
./src/objfmts/bin/tests/float-err.asm:9: invalid floating point constant size
|
||||
./src/objfmts/bin/tests/float-err.asm:11: overflow in floating point expression
|
||||
./src/objfmts/bin/tests/float-err.asm:12: underflow in floating point expression
|
||||
-:2: invalid floating point constant size
|
||||
-:3: invalid floating point constant size
|
||||
-:4: overflow in floating point expression
|
||||
-:5: underflow in floating point expression
|
||||
-:8: invalid floating point constant size
|
||||
-:9: invalid floating point constant size
|
||||
-:11: overflow in floating point expression
|
||||
-:12: underflow in floating point expression
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
./src/objfmts/bin/tests/integer-warn.asm:5: warning: Numeric constant too large for internal format
|
||||
./src/objfmts/bin/tests/integer-warn.asm:6: warning: Numeric constant too large for internal format
|
||||
-:5: warning: Numeric constant too large for internal format
|
||||
-:6: warning: Numeric constant too large for internal format
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
./src/objfmts/bin/tests/reserve-err.asm:4: expression must not contain floating point value
|
||||
./src/objfmts/bin/tests/reserve-err.asm:5: expression must not contain floating point value
|
||||
./src/objfmts/bin/tests/reserve-err.asm:7: attempt to reserve non-constant quantity of space
|
||||
./src/objfmts/bin/tests/reserve-err.asm:11: expression must not contain floating point value
|
||||
./src/objfmts/bin/tests/reserve-err.asm:12: expression must not contain floating point value
|
||||
./src/objfmts/bin/tests/reserve-err.asm:14: attempt to reserve non-constant quantity of space
|
||||
-:4: expression must not contain floating point value
|
||||
-:5: expression must not contain floating point value
|
||||
-:7: attempt to reserve non-constant quantity of space
|
||||
-:11: expression must not contain floating point value
|
||||
-:12: expression must not contain floating point value
|
||||
-:14: attempt to reserve non-constant quantity of space
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
./src/objfmts/bin/tests/reserve.asm:2: warning: uninitialized space declared in code/data section: zeroing
|
||||
./src/objfmts/bin/tests/reserve.asm:3: warning: uninitialized space declared in code/data section: zeroing
|
||||
./src/objfmts/bin/tests/reserve.asm:4: warning: uninitialized space declared in code/data section: zeroing
|
||||
./src/objfmts/bin/tests/reserve.asm:5: warning: uninitialized space declared in code/data section: zeroing
|
||||
-:2: warning: uninitialized space declared in code/data section: zeroing
|
||||
-:3: warning: uninitialized space declared in code/data section: zeroing
|
||||
-:4: warning: uninitialized space declared in code/data section: zeroing
|
||||
-:5: warning: uninitialized space declared in code/data section: zeroing
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue