From: Paolo Bonzini Date: Sun, 18 Nov 2007 17:01:24 +0000 (+0100) Subject: * lib/autotest/general.m4 (at_func_test): Use cached line numbers X-Git-Tag: v2.62~120 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22ced06229064c48845c4409cdd897e19c0774a4;p=thirdparty%2Fautoconf.git * lib/autotest/general.m4 (at_func_test): Use cached line numbers to extract test scripts. (AT_INIT): Extract and cache test script line numbers. --- diff --git a/ChangeLog b/ChangeLog index c8aa3777..409ee36b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-11-18 Paolo Bonzini + and Ralf Wildenhues + + * 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 * lib/autotest/general.m4: Revert 2007-11-15 patch and diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4 index 6855f319..53b00607 100644 --- a/lib/autotest/general.m4 +++ b/lib/autotest/general.m4 @@ -316,8 +316,8 @@ at_func_diff_devnull () # 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 @@ -872,6 +872,18 @@ else at_diff=diff fi +# Extract the start and end lines of each test group at the tail +# of this file +awk ' +BEGIN { FS="" } +/^@%:@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