mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
tests: improve update-test
* build-aux/update-test: When given a directory, use the testsuite.log which it contains. Do not accept empty "from"s, as substituting the empty string with something is rarely a good idea.
This commit is contained in:
@@ -73,6 +73,11 @@ def diff_to_re(match):
|
|||||||
is_diff = True
|
is_diff = True
|
||||||
to.append(l)
|
to.append(l)
|
||||||
if is_diff:
|
if is_diff:
|
||||||
|
# Do not run s//SOMETHING/g (with an emty pattern), that won't
|
||||||
|
# work well...
|
||||||
|
if frm == []:
|
||||||
|
trace("no from for", match.group(1))
|
||||||
|
return
|
||||||
frm = "\n".join(frm)
|
frm = "\n".join(frm)
|
||||||
to = "\n".join(to)
|
to = "\n".join(to)
|
||||||
subst[frm] = to
|
subst[frm] = to
|
||||||
@@ -112,4 +117,6 @@ def process(logfile):
|
|||||||
|
|
||||||
for logfile in args.logs:
|
for logfile in args.logs:
|
||||||
trace("FILE:", logfile)
|
trace("FILE:", logfile)
|
||||||
|
if os.path.isdir(logfile):
|
||||||
|
logfile = os.path.join(logfile, 'testsuite.log')
|
||||||
process(logfile)
|
process(logfile)
|
||||||
|
|||||||
Reference in New Issue
Block a user