1
0
mirror of https://github.com/fachat/xa65.git synced 2024-12-29 07:29:50 +00:00

Allow .a65 files as test files

This commit is contained in:
A. Fachat 2014-08-19 22:14:47 +02:00
parent 157ebf100a
commit e1ca691f0a
4 changed files with 48 additions and 3 deletions

View File

@ -0,0 +1,5 @@
tests:
./runtest.sh -q -C

View File

@ -0,0 +1,32 @@
#!/bin/bash
# run a test script
#THISDIR=`dirname $0`
THISDIR=`pwd`
echo "0=$0"
echo "THISDIR=$THISDIR"
declare -A opts
#opts=([816.asm]="-w")
#opts[02.asm]="-C"
#ASMFLAGS=-v
ASMFLAGS=
# exclude filter from *.asm if no explicit file is given
EXCLUDE=
# test files used
TESTFILES=""
# files to compare afterwards, against <file>-<script>
COMPAREFILES=a.out
XA=$THISDIR/../../xa
##########################
# actual code
. ../func.sh

View File

@ -2,7 +2,7 @@
function usage() {
echo "Assemble *.asm test files"
echo "Assemble *.asm or *.a65 test files"
echo " $0 [options] [frs_scripts]"
echo "Options:"
echo " -v verbose log"
@ -126,7 +126,8 @@ fi
# scripts to run
if [ "x$*" = "x" ]; then
SCRIPTS=$THISDIR/*${FILTER}*.asm
shopt -s extglob
SCRIPTS=$THISDIR/*${FILTER}*.a[s6][m5]
SCRIPTS=`basename -a $SCRIPTS`;
TESTSCRIPTS=""
@ -149,7 +150,11 @@ else
if test -f "$i".asm ; then
TESTSCRIPTS="$TESTSCRIPTS $i.asm";
else
TESTSCRIPTS="$TESTSCRIPTS $i";
if test -f "$i".a65 ; then
TESTSCRIPTS="$TESTSCRIPTS $i.a65";
else
TESTSCRIPTS="$TESTSCRIPTS $i";
fi
fi
done;
fi;
@ -234,6 +239,9 @@ for script in $TESTSCRIPTS; do
if test "x$COMPAREFILES" != "x"; then
testname=`basename $script .asm`
if [ "$script" = "$testname" ]; then
testname=`basename $script .a65`
fi
for i in $COMPAREFILES; do
NAME="${THISDIR}/${i}-${testname}"
if test -f ${NAME}; then