From b1a615f37eb06e06a1d378513757604faef612e0 Mon Sep 17 00:00:00 2001
From: Francois-Rene Rideau <tunes@google.com>
Date: Wed, 8 Jan 2014 23:29:49 -0500
Subject: [PATCH] Fix upgrade results checking for reversed order of tests.

---
 Makefile          |  5 ++---
 test/run-tests.sh | 11 ++++++++---
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index 7a93e0c9..3f32b625 100644
--- a/Makefile
+++ b/Makefile
@@ -167,9 +167,8 @@ check-all-test-results:
 
 check-all-upgrade-results:
 	@A="$$(for i in build/results/*-upgrade.text ; do \
-		case $$i in */gcl-*|*/xcl-*) ;; *) \
-		if [ 'Script succeeded' != "$$(tail -1 < $$i)" ] ; \
-		then echo $$i ; fi ; esac ; done)" ; \
+		case "$$(tail -1 < $$i)" in "Upgrade test succeeded for "*) ;; \
+		*) echo $$i ; esac ; done)" ; \
 	if [ -n "$$A" ] ; then \
 		echo "Unexpected upgrade failures on these implementations:" ; \
 		echo "$$A" ; \
diff --git a/test/run-tests.sh b/test/run-tests.sh
index 3fea7e7b..22e632e4 100755
--- a/test/run-tests.sh
+++ b/test/run-tests.sh
@@ -426,8 +426,11 @@ run_upgrade_tests () {
     rm -f build/*.*f* uiop/*.*f* test/*.*f* ## Remove stale FASLs from ASDF 1.x, especially when different implementations have same name
     ASDF_OUTPUT_TRANSLATIONS="(:output-translations (\"${ASDFDIR}\" (\"${ASDFDIR}/build/fasls/\" :implementation \"asdf/\")) (t (\"${ASDFDIR}/build/fasls/\" :implementation \"root/\")) :ignore-inherited-configuration)"
     su=test/script-support.lisp
-    for tag in `upgrade_tags` ; do
-        for method in `upgrade_methods` ; do
+    tags="`upgrade_tags`"
+    methods="`upgrade_methods`"
+    {
+    for tag in $tags ; do
+        for method in $methods ; do
             if valid_upgrade_test_p $lisp $tag $method ; then
                 echo "Testing ASDF upgrade from ${tag} using method $method"
                 extract_tagged_asdf $tag
@@ -441,7 +444,9 @@ run_upgrade_tests () {
                   echo "then copy/paste:"
                   echo "(load \"$su\") (asdf-test::da) (test-upgrade $method \"$tag\")"
                   exit 1 ;}
-    fi ; done ; done 2>&1 | tee build/results/${lisp}-upgrade.text
+    fi ; done ; done
+    echo "Upgrade test succeeded for ${lisp}"
+    } 2>&1 | tee build/results/${lisp}-upgrade.text
 }
 run_tests () {
   create_config
-- 
GitLab