This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[patch] Robustify gas-dg.exp.
- From: Kazu Hirata <kazu at codesourcery dot com>
- To: binutils at sourceware dot org
- Date: Thu, 7 Sep 2006 10:17:42 -0700
- Subject: [patch] Robustify gas-dg.exp.
Hi,
Attached is a patch to robustify gas-dg.exp.
While I was running dejagnu tests, I noticed that the line with regsub
in the patch below causes an error. It turned out that the name of my
build directory contained '+', which caused $dir to contain '+', which
in turn confused regsub.
The patch fixes this problem by treating $dir as a literal. This way,
characters like '+' and '?' won't be treated as special characters.
Tested by running dejagnu. OK to apply?
Kazu Hirata
2006-09-07 Kazu Hirata <kazu@codesourcery.com>
* lib/gas-dg.exp (gas-dg-test): Treat $dir as a literal.
Index: gas/testsuite/lib/gas-dg.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/lib/gas-dg.exp,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 gas-dg.exp
--- gas/testsuite/lib/gas-dg.exp 3 May 1999 07:28:53 -0000 1.1.1.1
+++ gas/testsuite/lib/gas-dg.exp 7 Sep 2006 16:45:22 -0000
@@ -36,7 +36,8 @@
regsub -all "//" $dir "/" dir
regsub -all "//" $prog "/" prog
if [string match "$dir/*" $prog] {
- regsub "$dir" $prog "" prog
+ # We use (?q) to treat $dir as a literal.
+ regsub "(?q)$dir" $prog "" prog
}
# FIXME: This should be gas_start but it doesn't set comp_output.