]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autotest/general.m4: Revert 2007-11-15 patch and
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 18 Nov 2007 16:35:02 +0000 (17:35 +0100)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 19 Nov 2007 20:18:04 +0000 (21:18 +0100)
subsequent fixups; the awk -> here-document conversion trashes
performance too much with AIX sh.

ChangeLog
lib/autotest/general.m4

index d1f20c1c1a3d777a651059cc0324293257c82715..c8aa3777e0e3d04654fbbf2ffcaf2995c1c6695a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-11-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * lib/autotest/general.m4: Revert 2007-11-15 patch and
+       subsequent fixups; the awk -> here-document conversion trashes
+       performance too much with AIX sh.
+
 2007-11-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * tests/local.at: Do not test m4, perl with AT_TESTED.
index 7a6ccfed6ee5e61eab033a0284c2f7d06e4af8ad..6855f3195a0f01f9bb2c66f913a4ccdf6dfb0df6 100644 (file)
@@ -311,6 +311,15 @@ at_func_diff_devnull ()
   $at_diff "$at_devnull" "$[1]"
 }
 
+# at_func_test NUMBER
+# -------------------
+# Parse out test NUMBER from the tail of this file.
+at_func_test ()
+{
+  sed -n '/^@%:@AT_START_'$[1]'$/,/^@%:@AT_STOP_'$[1]'$/p' "$at_myself" \
+       > "$at_test_source"
+}
+
 # at_func_create_debugging_script
 # -------------------------------
 # Create the debugging script $at_group_dir/run which will reproduce the
@@ -423,7 +432,7 @@ at_status_file=$at_suite_dir/at-status
 at_stdout=$at_suite_dir/at-stdout
 at_stder1=$at_suite_dir/at-stder1
 at_stderr=$at_suite_dir/at-stderr
-# The stem for files containing a test group.
+# The file containing the function to run a test group.
 at_test_source=$at_suite_dir/at-test-source
 # The file containing dates.
 at_times_file=$at_suite_dir/at-times
@@ -863,38 +872,6 @@ else
   at_diff=diff
 fi
 
-{
-  echo 'BEGIN {'
-  for at_group in $at_groups; do
-    at_group_normalized=$at_group
-    _AT_NORMALIZE_TEST_GROUP_NUMBER(at_group_normalized)
-    echo "  outfile[[\"$at_group\"]] = \"$at_test_source-$at_group_normalized\""
-  done
-  AS_ECHO(['
-  FS = "\a"
-}
-emit == 0 && /^@%:@AT_START_/ {
-  test = substr($ 0, 11);
-  if (outfile[[test]]) {
-    emit = 1
-    print "cat >\"" outfile[[test]] "\" <<'\''_AT_T_EOF'\''"
-  }
-}
-emit != 0 && /^@%:@AT_STOP_/ {
-  print "_AT_T_EOF"
-  emit = 0
-}
-emit != 0 { print }
-'])
-} > "$at_test_source.awk"
-
-# Extract test group that will be run from the tail of this file
-if awk -f "$at_test_source.awk" "$at_myself" >"$at_test_source.sh" \
-   && . "$at_test_source.sh" \
-   && rm -f "$at_test_source.awk" "$at_test_source.sh"; then :; else
-  AS_ECHO(["$as_me: unable to parse test groups"]) >&2
-  exit 1
-fi
 
 m4_text_box([Driver loop.])
 for at_group in $at_groups
@@ -930,7 +907,10 @@ do
     at_tee_pipe='cat >> "$at_group_log"'
   fi
 
-  . "$at_test_source-$at_group_normalized"
+  if at_func_test $at_group && . "$at_test_source"; then :; else
+    AS_ECHO(["$as_me: unable to parse test group: $at_group"]) >&2
+    at_failed=:
+  fi
 
   # Be sure to come back to the suite directory, in particular
   # since below we might `rm' the group directory we are in currently.
@@ -999,7 +979,7 @@ _ATEOF
          find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
          rm -fr "$at_group_dir"
         fi
-       rm -f "$at_test_source-$at_group_normalized"
+       rm -f "$at_test_source"
       fi
       ;;
     *)