tests: rename $am_make_rc_got -> $am_make_rc
authorStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 24 May 2013 18:54:41 +0000 (20:54 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 24 May 2013 18:54:41 +0000 (20:54 +0200)
The latter is more natural  More importantly, I keep misspelling
the former over and over.

* t/ax/am-test-lib.sh (run_make): Update.
* t/ax/tap-summary-aux.sh: Adjust.
* t/ax/testsuite-summary-checks.sh: Likewise.
* t/parallel-tests-exit-statuses.sh: Likewise.
* t/parallel-tests-extra-programs.sh: Likewise.
* t/parallel-tests-fd-redirect-exeext.sh: Likewise.
* t/parallel-tests-fd-redirect.sh: Likewise.
* t/parallel-tests-fork-bomb.sh: Likewise.
* t/parallel-tests-no-spurious-summary.sh: Likewise.
* t/parallel-tests-recheck-pr11791.sh: Likewise.
* t/parallel-tests-reset-term.sh: Likewise.
* t/tap-signal.tap: Likewise.
* t/test-driver-acsubst.sh: Likewise.
* t/test-driver-cond.sh: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
14 files changed:
t/ax/am-test-lib.sh
t/ax/tap-summary-aux.sh
t/ax/testsuite-summary-checks.sh
t/parallel-tests-exit-statuses.sh
t/parallel-tests-extra-programs.sh
t/parallel-tests-fd-redirect-exeext.sh
t/parallel-tests-fd-redirect.sh
t/parallel-tests-fork-bomb.sh
t/parallel-tests-no-spurious-summary.sh
t/parallel-tests-recheck-pr11791.sh
t/parallel-tests-reset-term.sh
t/tap-signal.tap
t/test-driver-acsubst.sh
t/test-driver-cond.sh

index 7aed3ee..3c6e803 100644 (file)
@@ -188,14 +188,14 @@ run_make ()
   am__make_redirect_stderr=no
   am__make_redirect_stdall=no
   am__make_flags=
-  # Follow-up code might want to analyse these, so don't make them as
-  # private, nor unset them later.
-  am_make_rc_exp=0
-  am_make_rc_got=0
+  am__make_rc_exp=0
+  # Follow-up code might want to analyse this, so mark is as
+  # publicly accessible (no double undesrscore).
+  am_make_rc=0
   # Parse options for this function.
   while test $# -gt 0; do
     case $1 in
-      -e) am_make_rc_exp=$2; shift;;
+      -e) am__make_rc_exp=$2; shift;;
       -O) am__make_redirect_stdout=yes;;
       -E) am__make_redirect_stderr=yes;;
       -M) am__make_redirect_stdall=yes;;
@@ -269,9 +269,9 @@ run_make ()
       fi
     fi
     exec $MAKE ${1+"$@"}
-  ) || am_make_rc_got=$?
+  ) || am_make_rc=$?
 
-  if test $am_make_rc_got -eq 253; then
+  if test $am_make_rc -eq 253; then
     fatal_ "run_make: problems in redirecting make output"
   fi
 
@@ -286,17 +286,17 @@ run_make ()
     fi
   fi
 
-  case $am_make_rc_exp in
+  case $am__make_rc_exp in
     IGNORE)
       : Ignore exit status
       ;;
     FAIL)
-      test $am_make_rc_got -gt 0 || return 1
+      test $am_make_rc -gt 0 || return 1
       ;;
     *)
-     test $am_make_rc_exp -ge 0 && test $am_make_rc_exp -le 255 \
-       || fatal_ "invalid expected exit status: '$am_make_rc_exp'"
-     test $am_make_rc_exp -eq $am_make_rc_got || return 1
+     test $am__make_rc_exp -ge 0 && test $am__make_rc_exp -le 255 \
+       || fatal_ "invalid expected exit status: '$am__make_rc_exp'"
+     test $am_make_rc -eq $am__make_rc_exp || return 1
      ;;
   esac
 }
index 472c43f..a914087 100644 (file)
@@ -62,9 +62,9 @@ do_check ()
   fi
   run_make -O -e IGNORE $make_args check
   if test $expect_failure = yes; then
-    test $am_make_rc_got -gt 0 || exit 1
+    test $am_make_rc -gt 0 || exit 1
   else
-    test $am_make_rc_got -eq 0 || exit 1
+    test $am_make_rc -eq 0 || exit 1
   fi
   $PERL "$am_testaux_srcdir"/extract-testsuite-summary.pl stdout >summary.got \
     || fatal_ "cannot extract testsuite summary"
index 1b37134..962a730 100644 (file)
@@ -76,9 +76,9 @@ do_check ()
   done
   run_make -O -e IGNORE check TESTS="$tests" XFAIL_TESTS="$xfail_tests"
   if $expect_failure; then
-    test $am_make_rc_got -gt 0 || exit 1
+    test $am_make_rc -gt 0 || exit 1
   else
-    test $am_make_rc_got -eq 0 || exit 1
+    test $am_make_rc -eq 0 || exit 1
   fi
   $PERL "$am_testaux_srcdir"/extract-testsuite-summary.pl stdout >summary.got \
    || fatal_ "cannot extract testsuite summary"
index 54181e2..6bbc615 100644 (file)
@@ -72,7 +72,7 @@ sed '/^ERROR:/d' exp-1 > exp-2
 mk_ ()
 {
   n=$1; shift
-  unset am_make_rc_got
+  unset am_make_rc
   run_make -e IGNORE -O -- ${1+"$@"} check
   cat test-suite.log
   LC_ALL=C grep '^[A-Z][A-Z]*:' stdout | LC_ALL=C sort > got-$n
@@ -82,10 +82,10 @@ mk_ ()
 }
 
 mk_ 0
-test $am_make_rc_got -gt 0
+test $am_make_rc -gt 0
 mk_ 1 XFAIL_TESTS="$failure_statuses 99"
-test $am_make_rc_got -gt 0
+test $am_make_rc -gt 0
 mk_ 2 XFAIL_TESTS="$failure_statuses" TESTS="0 77 $failure_statuses"
-test $am_make_rc_got -eq 0
+test $am_make_rc -eq 0
 
 :
index 4df28ad..0125219 100644 (file)
@@ -118,7 +118,7 @@ $AUTOMAKE -a
 run_make -E -O -e IGNORE -- -k check
 ls -l
 if using_gmake; then
-  test $am_make_rc_got -gt 0 || exit 1
+  test $am_make_rc -gt 0 || exit 1
 else
   # Don't trust exit status of "make -k" for non-GNU make.
   $MAKE check && exit 1
@@ -157,7 +157,7 @@ echo 'int main (void) { return 0; }' > none.c
 
 run_make -O -e IGNORE check RECHECK_LOGS=
 ls -l # For debugging.
-test $am_make_rc_got -eq 0 || exit 1
+test $am_make_rc -eq 0 || exit 1
 
 # For debugging.
 stat stamp foo.log bar.log baz.log || :
index e4d7caa..1dcdbd9 100644 (file)
@@ -107,7 +107,7 @@ test $st -eq 0 || fatal_ "doesn't cover expected code paths"
 run_make -O -e IGNORE check
 cat baz.log
 cat qux.log
-test $am_make_rc_got -eq 0
+test $am_make_rc -eq 0
 grep "^ bazbazbaz$" stdout
 grep "^ quxquxqux$" stdout
 $EGREP '(bazbazbaz|quxquxqux)' *.log && exit 1
index 1ccaf74..cb331ca 100644 (file)
@@ -60,7 +60,7 @@ test $st -eq 0 || fatal_ "doesn't cover expected code paths"
 run_make -O -e IGNORE check
 cat foo.log
 cat bar.log
-test $am_make_rc_got -eq 0
+test $am_make_rc -eq 0
 grep "^ foofoofoo$" stdout
 grep "^ barbarbar$" stdout
 $EGREP '(foofoofoo|barbarbar)' *.log && exit 1
index 1361bbd..62cd241 100644 (file)
@@ -105,7 +105,7 @@ do_check ()
   test ! -e "$log"
   if using_gmake; then
     grep "[Cc]ircular.*dependency" output | $FGREP "$log"
-    test $am_make_rc_got -gt 0
+    test $am_make_rc -gt 0
   else
     # Look for possible error messages about circular dependencies from
     # either make or our own recipes.  At least one such a message must
index 300d593..7c6398b 100644 (file)
@@ -53,7 +53,7 @@ run_make -O -e IGNORE check
 cat test-suite.log
 cat foo.log
 cat bar.log
-test $am_make_rc_got -eq 0
+test $am_make_rc -eq 0
 
 grep '^:test-result:XFAIL$'  foo.log
 grep '^:test-result: SKIP$'  foo.log
index cad1969..f14288c 100644 (file)
@@ -44,7 +44,7 @@ count_test_results total=1 pass=0 fail=1 xpass=0 xfail=0 skip=0 error=0
 $sleep # Required to avoid a spurious failure with some FreeBSD makes.
 run_make -O -e IGNORE -- -k recheck
 # Don't trust the exit status of "make -k" for non-GNU makes.
-! using_gmake || test $am_make_rc_got -gt 0 || exit 1
+! using_gmake || test $am_make_rc -gt 0 || exit 1
 count_test_results total=1 pass=0 fail=1 xpass=0 xfail=0 skip=0 error=0
 
 # Introduce an error in foo.c, that should cause a compilation failure.
@@ -62,7 +62,7 @@ test -f foo.trs
 $sleep # Required to avoid a spurious failure with some FreeBSD makes.
 run_make -O -e IGNORE -- -k recheck
 # Don't trust the exit status of "make -k" for non-GNU makes.
-! using_gmake || test $am_make_rc_got -gt 0 || exit 1
+! using_gmake || test $am_make_rc -gt 0 || exit 1
 # We don't get a change to run the testsuite.
 $EGREP '(X?PASS|X?FAIL|SKIP|ERROR):' stdout && exit 1
 test -f foo.log
index 187a503..3dae4b6 100644 (file)
@@ -45,7 +45,7 @@ mkcheck ()
   cat stdout
   cat foobar.log
   cat test-suite.log
-  return $am_make_rc_got
+  return $am_make_rc
 }
 
 $ACLOCAL
index 27e23ab..f1a8130 100644 (file)
@@ -113,7 +113,7 @@ command_ok_ '"make check" fails' eval '
     # garbled output with NetBSD make, which would miss some final
     # newlines in the expected places and thus mess up our TAP output.
     set +x; echo
-    test $am_make_rc_got -gt 0
+    test $am_make_rc -gt 0
   )
 '
 cat stdout # For debugging.
index 85113a4..a17ac57 100644 (file)
@@ -80,7 +80,7 @@ cat test-suite.log
 cat foo.log
 cat bar.log
 cat baz.log
-test $am_make_rc_got -eq 0
+test $am_make_rc -eq 0
 count_test_results total=3 pass=1 fail=0 skip=1 xfail=1 xpass=0 error=0
 
 :
index cf204c4..febb9d2 100644 (file)
@@ -107,7 +107,7 @@ cat test-suite.log
 cat foo.log
 cat bar.log
 cat baz.log
-test $am_make_rc_got -eq 0 || exit 1
+test $am_make_rc -eq 0 || exit 1
 do_count
 
 run_make -O distcheck