diff --git a/src/test/confidence/arrayassignment/old.s b/src/test/confidence/arrayassignment/old.cygwin.ILP32.gcc.s similarity index 100% rename from src/test/confidence/arrayassignment/old.s rename to src/test/confidence/arrayassignment/old.cygwin.ILP32.gcc.s diff --git a/src/test/confidence/hello/old.s b/src/test/confidence/hello/old.cygwin.ILP32.gcc.s similarity index 100% rename from src/test/confidence/hello/old.s rename to src/test/confidence/hello/old.cygwin.ILP32.gcc.s diff --git a/src/test/confidence/language/old.s b/src/test/confidence/language/old.cygwin.ILP32.gcc.s similarity index 100% rename from src/test/confidence/language/old.s rename to src/test/confidence/language/old.cygwin.ILP32.gcc.s diff --git a/src/test/confidence/lola/old.s b/src/test/confidence/lola/old.cygwin.ILP32.gcc.s similarity index 100% rename from src/test/confidence/lola/old.s rename to src/test/confidence/lola/old.cygwin.ILP32.gcc.s diff --git a/src/test/confidence/signal/old.s b/src/test/confidence/signal/old.cygwin.ILP32.gcc.s similarity index 100% rename from src/test/confidence/signal/old.s rename to src/test/confidence/signal/old.cygwin.ILP32.gcc.s diff --git a/src/test/confidence/testenv.sh b/src/test/confidence/testenv.sh index cf5a5ac9..5d331aa1 100755 --- a/src/test/confidence/testenv.sh +++ b/src/test/confidence/testenv.sh @@ -4,7 +4,7 @@ echo --- Confidence test $(basename $PWD) --- -if which cygpath >/dev/null +if which cygpath >/dev/null 2>/dev/null then export PATH="$(cygpath "$1")/bin":$PATH else export PATH="$1/bin":$PATH fi @@ -19,6 +19,8 @@ rm -f *.o *.obj *.exe *.sym *.c *.h result # corresponding assembly file will overwrite the previous. I # cannot see any way to overcome this short of using -S # on the voc command and calling 'as' explicitly. -if [ $COMPILER=gcc ] +# NOTE 2: The cygwin 64 bit build has relocation errors with +# these assembly generation options. +if [ $COMPILER=gcc -a $FLAVOUR!=cygwin.LP64.gcc ] then export CFLAGS="-gstabs -g1 -Wa,-acdhln=new.asm" fi diff --git a/src/test/confidence/testresult.sh b/src/test/confidence/testresult.sh index d873e263..d7e7d13e 100755 --- a/src/test/confidence/testresult.sh +++ b/src/test/confidence/testresult.sh @@ -6,10 +6,16 @@ else printf "FAILED: $PWD\n\n"; exit 1 fi # Compare generated code -if [ -f old.s -a -f new.asm ] -then - egrep '^[0-9 ]{4} ([0-9a-f]{4}| ) [0-9A-F]{2}[0-9A-F ]{6}' new.asm|cut -c 11- >new.s - if ! diff -b old.s new.s - then echo "--- Generated code changed ---" +if [ -f new.asm ] +then egrep '^[0-9 ]{4} ([0-9a-f]{4}| ) [0-9A-F]{2}[0-9A-F ]{6}' new.asm|cut -c 11- >new.$FLAVOUR.s + + if [ -f old.$FLAVOUR.s ] + then + if ! diff -b old.$FLAVOUR.s new.$FLAVOUR.s + then echo "--- Generated code changed ---" + fi + else + cp new.$FLAVOUR.s old.$FLAVOUR.s fi + fi diff --git a/src/tools/make/vishap.make b/src/tools/make/vishap.make index 8b50cb20..256a69ee 100644 --- a/src/tools/make/vishap.make +++ b/src/tools/make/vishap.make @@ -376,11 +376,11 @@ sourcechanges: confidence: @printf "\n\n--- Confidence tests ---\n\n" - cd src/test/confidence/hello; sh ./test.sh "$(INSTALLDIR)" - cd src/test/confidence/language; sh ./test.sh "$(INSTALLDIR)" - if [ "$(PLATFORM)" != "windows" ] ; then cd src/test/confidence/signal; sh ./test.sh "$(INSTALLDIR)"; fi - cd src/test/confidence/lola; sh ./test.sh "$(INSTALLDIR)" - cd src/test/confidence/arrayassignment; sh ./test.sh "$(INSTALLDIR)" + cd src/test/confidence/hello; FLAVOUR=$(FLAVOUR) sh ./test.sh "$(INSTALLDIR)" + cd src/test/confidence/language; FLAVOUR=$(FLAVOUR) sh ./test.sh "$(INSTALLDIR)" + if [ "$(PLATFORM)" != "windows" ] ; then cd src/test/confidence/signal; FLAVOUR=$(FLAVOUR) sh ./test.sh "$(INSTALLDIR)"; fi + cd src/test/confidence/lola; FLAVOUR=$(FLAVOUR) sh ./test.sh "$(INSTALLDIR)" + cd src/test/confidence/arrayassignment; FLAVOUR=$(FLAVOUR) sh ./test.sh "$(INSTALLDIR)" @printf "\n\n--- Confidence tests passed ---\n\n"