+2007-11-18 Paolo Bonzini <bonzini@gnu.org>
+ and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * lib/autotest/general.m4 (at_func_test): Use cached line numbers
+ to extract test scripts.
+ (AT_INIT): Extract and cache test script line numbers.
+
2007-11-19 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/autotest/general.m4: Revert 2007-11-15 patch and
# 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"
+ eval at_sed=\$at_sed$[1]
+ sed "$at_sed" "$at_myself" > "$at_test_source"
}
# at_func_create_debugging_script
at_diff=diff
fi
+# Extract the start and end lines of each test group at the tail
+# of this file
+awk '
+BEGIN { FS="\a" }
+/^@%:@AT_START_/ {
+ start = NR
+}
+/^@%:@AT_STOP_/ {
+ print "at_sed" substr ($ 0, 10) "=\"1," start "d;" NR "q\""
+}' "$at_myself" > "$at_test_source"
+. "$at_test_source"
+
m4_text_box([Driver loop.])
for at_group in $at_groups