public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/3] sim: cris: drop custom "dynamic" test field
@ 2021-11-17  1:31 Mike Frysinger
  2021-11-17  1:31 ` [PATCH 2/3] sim: cris: replace @srcdir@ test extension with $srcdir/$subdir Mike Frysinger
  2021-11-17  1:31 ` [PATCH 3/3] sim: testsuite: add support for $pwd replacements Mike Frysinger
  0 siblings, 2 replies; 3+ messages in thread
From: Mike Frysinger @ 2021-11-17  1:31 UTC (permalink / raw)
  To: gdb-patches

This tag is used to force tests to be built dynamically (i.e. without
-static linking).  This is because cris-sim.exp in dejagnu turns on
static linking in ldflags.

The default configs and runtest flags shouldn't load these boards.
If these settings are still needed, we should figure out a different
way of suppressing the stock settings wholesale.  We want these to
all pass out of the box with little to no configuration so that they
can run in a multitarget build.

With dropping "dynamic", it'll be easier to merge the custom cris
test logic with the common sim test logic.
---
 sim/testsuite/cris/c/badldso1.c  |  1 -
 sim/testsuite/cris/c/badldso2.c  |  1 -
 sim/testsuite/cris/c/badldso3.c  |  1 -
 sim/testsuite/cris/c/c.exp       | 11 -----------
 sim/testsuite/cris/c/hellodyn.c  |  1 -
 sim/testsuite/cris/c/hellodyn2.c |  1 -
 sim/testsuite/cris/c/hellodyn3.c |  1 -
 7 files changed, 17 deletions(-)

diff --git a/sim/testsuite/cris/c/badldso1.c b/sim/testsuite/cris/c/badldso1.c
index 58caa8de821f..70414b536d23 100644
--- a/sim/testsuite/cris/c/badldso1.c
+++ b/sim/testsuite/cris/c/badldso1.c
@@ -1,6 +1,5 @@
 /*
 #notarget: cris*-*-elf
-#dynamic:
 #xerror:
 #output: *: could not load ELF interpreter `*' for program `*'\n
  */
diff --git a/sim/testsuite/cris/c/badldso2.c b/sim/testsuite/cris/c/badldso2.c
index db28889ae68c..92efc138c565 100644
--- a/sim/testsuite/cris/c/badldso2.c
+++ b/sim/testsuite/cris/c/badldso2.c
@@ -1,6 +1,5 @@
 /*
 #notarget: cris*-*-elf
-#dynamic:
 #xerror:
 #cc: additional_flags=-Wl,-dynamic-linker,/dev/null
 #output: *: could not load ELF interpreter `*' for program `*'\n
diff --git a/sim/testsuite/cris/c/badldso3.c b/sim/testsuite/cris/c/badldso3.c
index 3f9509bd0058..9ff6d9a76135 100644
--- a/sim/testsuite/cris/c/badldso3.c
+++ b/sim/testsuite/cris/c/badldso3.c
@@ -1,6 +1,5 @@
 /*
 #notarget: cris*-*-elf
-#dynamic:
 #xerror:
 #cc: additional_flags=-Wl,-dynamic-linker,/compilercheck.x
 #sim: --sysroot=@exedir@
diff --git a/sim/testsuite/cris/c/c.exp b/sim/testsuite/cris/c/c.exp
index 506f68ab0865..8f39b097a0a9 100644
--- a/sim/testsuite/cris/c/c.exp
+++ b/sim/testsuite/cris/c/c.exp
@@ -105,7 +105,6 @@ foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.c]] {
     set opts(xfail) ""
     set opts(target) ""
     set opts(notarget) ""
-    set opts(dynamic) ""
 
     # Clear any machine specific options specified in a previous test case
     if [info exists opts(sim,$mach)] {
@@ -142,16 +141,6 @@ foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.c]] {
 	    }
 	}
 
-	if { $opt_name == "dynamic" \
-		 && [info exists board_info([target_info name],ldflags)] } {
-	    # Weed out -static from ldflags, but keep the original in
-	    # $orig_ldflags.
-	    set orig_ldflags $board_info([target_info name],ldflags)
-	    set ldflags " $orig_ldflags "
-	    regsub -all " -static " $ldflags " " ldflags
-	    set board_info([target_info name],ldflags) $ldflags
-	}
-
 	foreach m $opt_machs {
 	    set opts($opt_name,$m) $opt_val
 	}
diff --git a/sim/testsuite/cris/c/hellodyn.c b/sim/testsuite/cris/c/hellodyn.c
index dc8042fbf5d4..4a036cc48796 100644
--- a/sim/testsuite/cris/c/hellodyn.c
+++ b/sim/testsuite/cris/c/hellodyn.c
@@ -1,5 +1,4 @@
 /*
-#dynamic:
 #sim: --sysroot=@exedir@
  */
 #include "hello.c"
diff --git a/sim/testsuite/cris/c/hellodyn2.c b/sim/testsuite/cris/c/hellodyn2.c
index 00f5369c3a72..2a94ea4824b4 100644
--- a/sim/testsuite/cris/c/hellodyn2.c
+++ b/sim/testsuite/cris/c/hellodyn2.c
@@ -1,5 +1,4 @@
 /*
-#dynamic:
 #sim: --sysroot=@exedir@ --load-vma
  */
 #include "hello.c"
diff --git a/sim/testsuite/cris/c/hellodyn3.c b/sim/testsuite/cris/c/hellodyn3.c
index 8ae3a4f1c16b..d21122f73ea9 100644
--- a/sim/testsuite/cris/c/hellodyn3.c
+++ b/sim/testsuite/cris/c/hellodyn3.c
@@ -3,7 +3,6 @@
    ld.so.cache (having no absolute path specified for the executable
    falls back on loading through the same mechanisms as a DSO).
 #notarget: *-*-elf
-#dynamic:
 #sim: --sysroot=@exedir@ @exedir@/lib/ld.so.1 --library-path /
  */
 #include "hello.c"
-- 
2.33.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/3] sim: cris: replace @srcdir@ test extension with $srcdir/$subdir
  2021-11-17  1:31 [PATCH 1/3] sim: cris: drop custom "dynamic" test field Mike Frysinger
@ 2021-11-17  1:31 ` Mike Frysinger
  2021-11-17  1:31 ` [PATCH 3/3] sim: testsuite: add support for $pwd replacements Mike Frysinger
  1 sibling, 0 replies; 3+ messages in thread
From: Mike Frysinger @ 2021-11-17  1:31 UTC (permalink / raw)
  To: gdb-patches

The common framework supports $srcdir & $subdir replacements already,
so replace the custom @srcdir@ logic with those.  Since the replace
happens in slurp_options that cris already uses, we don't have any
logic to port over there.  We have to duplicate that into the cris
slurp_rv helper though.
---
 sim/testsuite/cris/c/c.exp                  |  2 --
 sim/testsuite/cris/c/openpf2.c              |  2 +-
 sim/testsuite/cris/hw/rv-n-cris/host1.ms    |  2 +-
 sim/testsuite/cris/hw/rv-n-cris/rvc.exp     | 10 +++++-----
 sim/testsuite/cris/hw/rv-n-cris/trivial4.ms |  2 +-
 sim/testsuite/cris/hw/rv-n-cris/trivial5.ms |  2 +-
 6 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/sim/testsuite/cris/c/c.exp b/sim/testsuite/cris/c/c.exp
index 8f39b097a0a9..e5b48661b63b 100644
--- a/sim/testsuite/cris/c/c.exp
+++ b/sim/testsuite/cris/c/c.exp
@@ -124,8 +124,6 @@ foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.c]] {
 	# Replace specific substitutions:
 	# @exedir@ is where the test-program is located.
 	regsub -all "@exedir@" $opt_val "[pwd]" opt_val
-	# @srcdir@ is where the source of the test-program is located.
-	regsub -all "@srcdir@" $opt_val "$srcdir/$subdir" opt_val
 
 	# Multiple of these options concatenate, they don't override.
 	if { $opt_name == "output" || $opt_name == "progoptions" } {
diff --git a/sim/testsuite/cris/c/openpf2.c b/sim/testsuite/cris/c/openpf2.c
index 50337b110d4c..49f09b641ae4 100644
--- a/sim/testsuite/cris/c/openpf2.c
+++ b/sim/testsuite/cris/c/openpf2.c
@@ -1,5 +1,5 @@
 /* Check that the simulator has chdir:ed to the --sysroot argument
-#sim: --sysroot=@srcdir@
+#sim: --sysroot=$srcdir/$subdir
    (or that  --sysroot is applied to relative file paths).  */
 
 #include <stdio.h>
diff --git a/sim/testsuite/cris/hw/rv-n-cris/host1.ms b/sim/testsuite/cris/hw/rv-n-cris/host1.ms
index c41f51f1809b..78253942a0f2 100644
--- a/sim/testsuite/cris/hw/rv-n-cris/host1.ms
+++ b/sim/testsuite/cris/hw/rv-n-cris/host1.ms
@@ -3,6 +3,6 @@
 
 # Check that we trivially resolve a hostname.
 
-#r @,@srcdir@/trivial4.r
+#r @,$srcdir/$subdir/trivial4.r
 
  .include "trivial4.ms"
diff --git a/sim/testsuite/cris/hw/rv-n-cris/rvc.exp b/sim/testsuite/cris/hw/rv-n-cris/rvc.exp
index 4e302d2238fb..3d8b5c3813de 100644
--- a/sim/testsuite/cris/hw/rv-n-cris/rvc.exp
+++ b/sim/testsuite/cris/hw/rv-n-cris/rvc.exp
@@ -80,6 +80,7 @@ proc sim_has_rv_and_cris {} {
 # including parameters may not contain ":".
 
 proc slurp_rv { file } {
+    global subdir srcdir
     if [catch { set f [open $file r] } x] {
 	#perror "couldn't open `$file': $x"
 	perror "$x"
@@ -97,6 +98,10 @@ proc slurp_rv { file } {
 	# Whitespace here is space-tab.
 	if [regexp $pat $line xxx cmd] {
 	    # match!
+	    set cmd [string map [list \
+		{$srcdir} "$srcdir" \
+		{$subdir} "$subdir" \
+	    ] "$cmd"]
 	    lappend rv_array $cmd
 	    set seen_opt 1
 	} else {
@@ -204,11 +209,6 @@ if [istarget cris*-*-*] {
 		    error "$x"
 		} {
 		    set contents [join $hostcmds "\n"]
-
-		    # Make it possible to use files from the test
-		    # source directory; expected with the @-command.
-		    regsub -all "@srcdir@" $contents "$srcdir/$subdir" contents
-
 		    verbose "rv: $contents" 2
 		    puts $f $contents
 		    close $f
diff --git a/sim/testsuite/cris/hw/rv-n-cris/trivial4.ms b/sim/testsuite/cris/hw/rv-n-cris/trivial4.ms
index 6108160f962c..3259f3ee52e6 100644
--- a/sim/testsuite/cris/hw/rv-n-cris/trivial4.ms
+++ b/sim/testsuite/cris/hw/rv-n-cris/trivial4.ms
@@ -1,5 +1,5 @@
 #mach: crisv32
-#r @,@srcdir@/trivial4.r
+#r @,$srcdir/$subdir/trivial4.r
 
 # Test read and writes.
 
diff --git a/sim/testsuite/cris/hw/rv-n-cris/trivial5.ms b/sim/testsuite/cris/hw/rv-n-cris/trivial5.ms
index 849f17ebb450..c75e09fc6da0 100644
--- a/sim/testsuite/cris/hw/rv-n-cris/trivial5.ms
+++ b/sim/testsuite/cris/hw/rv-n-cris/trivial5.ms
@@ -11,6 +11,6 @@
 
 # Test trace output for read and write.
 
-#r @,@srcdir@/trivial4.r
+#r @,$srcdir/$subdir/trivial4.r
 
  .include "trivial4.ms"
-- 
2.33.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 3/3] sim: testsuite: add support for $pwd replacements
  2021-11-17  1:31 [PATCH 1/3] sim: cris: drop custom "dynamic" test field Mike Frysinger
  2021-11-17  1:31 ` [PATCH 2/3] sim: cris: replace @srcdir@ test extension with $srcdir/$subdir Mike Frysinger
@ 2021-11-17  1:31 ` Mike Frysinger
  1 sibling, 0 replies; 3+ messages in thread
From: Mike Frysinger @ 2021-11-17  1:31 UTC (permalink / raw)
  To: gdb-patches

Extend the common test framework to support $pwd replacements in
settings.  This allows replacing the custom cris @exedir@ with it.
---
 sim/testsuite/cris/c/badldso3.c         | 2 +-
 sim/testsuite/cris/c/c.exp              | 4 ----
 sim/testsuite/cris/c/clone2.c           | 2 +-
 sim/testsuite/cris/c/hellodyn.c         | 2 +-
 sim/testsuite/cris/c/hellodyn2.c        | 2 +-
 sim/testsuite/cris/c/hellodyn3.c        | 2 +-
 sim/testsuite/cris/c/openpf1.c          | 2 +-
 sim/testsuite/cris/c/openpf4.c          | 2 +-
 sim/testsuite/cris/c/openpf5.c          | 2 +-
 sim/testsuite/cris/c/readlink3.c        | 2 +-
 sim/testsuite/cris/c/readlink6.c        | 2 +-
 sim/testsuite/cris/c/readlink8.c        | 2 +-
 sim/testsuite/cris/c/readlink9.c        | 2 +-
 sim/testsuite/cris/c/seek2.c            | 2 +-
 sim/testsuite/cris/c/stat3.c            | 2 +-
 sim/testsuite/cris/c/stat4.c            | 2 +-
 sim/testsuite/cris/c/truncate2.c        | 2 +-
 sim/testsuite/cris/hw/rv-n-cris/rvc.exp | 1 +
 sim/testsuite/lib/sim-defs.exp          | 1 +
 19 files changed, 18 insertions(+), 20 deletions(-)

diff --git a/sim/testsuite/cris/c/badldso3.c b/sim/testsuite/cris/c/badldso3.c
index 9ff6d9a76135..f827e771a9c4 100644
--- a/sim/testsuite/cris/c/badldso3.c
+++ b/sim/testsuite/cris/c/badldso3.c
@@ -2,7 +2,7 @@
 #notarget: cris*-*-elf
 #xerror:
 #cc: additional_flags=-Wl,-dynamic-linker,/compilercheck.x
-#sim: --sysroot=@exedir@
+#sim: --sysroot=$pwd
 #output: *: could not load ELF interpreter `*' for program `*'\n
  */
 #include "hello.c"
diff --git a/sim/testsuite/cris/c/c.exp b/sim/testsuite/cris/c/c.exp
index e5b48661b63b..233ed8533778 100644
--- a/sim/testsuite/cris/c/c.exp
+++ b/sim/testsuite/cris/c/c.exp
@@ -121,10 +121,6 @@ foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.c]] {
 	    return
 	}
 
-	# Replace specific substitutions:
-	# @exedir@ is where the test-program is located.
-	regsub -all "@exedir@" $opt_val "[pwd]" opt_val
-
 	# Multiple of these options concatenate, they don't override.
 	if { $opt_name == "output" || $opt_name == "progoptions" } {
 	    set opt_val "$opts($opt_name)$opt_val"
diff --git a/sim/testsuite/cris/c/clone2.c b/sim/testsuite/cris/c/clone2.c
index e433a778b346..aaa0873b640f 100644
--- a/sim/testsuite/cris/c/clone2.c
+++ b/sim/testsuite/cris/c/clone2.c
@@ -1,6 +1,6 @@
 /* Make sure the thread system trivially works with trace output.
 #notarget: cris*-*-elf
-#sim: --cris-trace=basic --trace-file=@exedir@/clone2.tmp
+#sim: --cris-trace=basic --trace-file=$pwd/clone2.tmp
 #output: got: a\nthen: bc\nexit: 0\n
 */
 #include "clone1.c"
diff --git a/sim/testsuite/cris/c/hellodyn.c b/sim/testsuite/cris/c/hellodyn.c
index 4a036cc48796..886818ad82c6 100644
--- a/sim/testsuite/cris/c/hellodyn.c
+++ b/sim/testsuite/cris/c/hellodyn.c
@@ -1,4 +1,4 @@
 /*
-#sim: --sysroot=@exedir@
+#sim: --sysroot=$pwd
  */
 #include "hello.c"
diff --git a/sim/testsuite/cris/c/hellodyn2.c b/sim/testsuite/cris/c/hellodyn2.c
index 2a94ea4824b4..47b501372dab 100644
--- a/sim/testsuite/cris/c/hellodyn2.c
+++ b/sim/testsuite/cris/c/hellodyn2.c
@@ -1,4 +1,4 @@
 /*
-#sim: --sysroot=@exedir@ --load-vma
+#sim: --sysroot=$pwd --load-vma
  */
 #include "hello.c"
diff --git a/sim/testsuite/cris/c/hellodyn3.c b/sim/testsuite/cris/c/hellodyn3.c
index d21122f73ea9..4dd8bdd9e843 100644
--- a/sim/testsuite/cris/c/hellodyn3.c
+++ b/sim/testsuite/cris/c/hellodyn3.c
@@ -3,6 +3,6 @@
    ld.so.cache (having no absolute path specified for the executable
    falls back on loading through the same mechanisms as a DSO).
 #notarget: *-*-elf
-#sim: --sysroot=@exedir@ @exedir@/lib/ld.so.1 --library-path /
+#sim: --sysroot=$pwd $pwd/lib/ld.so.1 --library-path /
  */
 #include "hello.c"
diff --git a/sim/testsuite/cris/c/openpf1.c b/sim/testsuite/cris/c/openpf1.c
index e0d8e5c91409..fe767f71f370 100644
--- a/sim/testsuite/cris/c/openpf1.c
+++ b/sim/testsuite/cris/c/openpf1.c
@@ -1,5 +1,5 @@
 /* Check that --sysroot is applied to open(2).
-#sim: --sysroot=@exedir@
+#sim: --sysroot=$pwd
 
    We assume, with EXE being the name of the executable:
    - The simulator executes with cwd the same directory where the executable
diff --git a/sim/testsuite/cris/c/openpf4.c b/sim/testsuite/cris/c/openpf4.c
index d3fdcfe2f902..b7ae810d780a 100644
--- a/sim/testsuite/cris/c/openpf4.c
+++ b/sim/testsuite/cris/c/openpf4.c
@@ -1,5 +1,5 @@
 /* Basic file operations, now *with* sysroot.
-#sim: --sysroot=@exedir@
+#sim: --sysroot=$pwd
 */
 #define PREFIX "/"
 #include "openpf3.c"
diff --git a/sim/testsuite/cris/c/openpf5.c b/sim/testsuite/cris/c/openpf5.c
index 1f86ea283d4b..90bebe509be5 100644
--- a/sim/testsuite/cris/c/openpf5.c
+++ b/sim/testsuite/cris/c/openpf5.c
@@ -1,6 +1,6 @@
 /* Check that TRT happens when error on too many opened files.
 #notarget: cris*-*-elf
-#sim: --sysroot=@exedir@
+#sim: --sysroot=$pwd
 */
 #include <stddef.h>
 #include <stdlib.h>
diff --git a/sim/testsuite/cris/c/readlink3.c b/sim/testsuite/cris/c/readlink3.c
index 94cff727e380..d728087f1d52 100644
--- a/sim/testsuite/cris/c/readlink3.c
+++ b/sim/testsuite/cris/c/readlink3.c
@@ -1,6 +1,6 @@
 /* Simulator options:
 #notarget: cris*-*-elf
-#sim: --sysroot=@exedir@
+#sim: --sysroot=$pwd
 */
 #define SYSROOTED 1
 #include "readlink2.c"
diff --git a/sim/testsuite/cris/c/readlink6.c b/sim/testsuite/cris/c/readlink6.c
index 52a26f496392..d64b95913a3f 100644
--- a/sim/testsuite/cris/c/readlink6.c
+++ b/sim/testsuite/cris/c/readlink6.c
@@ -1,5 +1,5 @@
 /* Check that rare readlink calls don't cause the simulator to abort.
 #notarget: cris*-*-elf
-#sim: --argv0 @exedir@/readlink6.c.x
+#sim: --argv0 $pwd/readlink6.c.x
 */
 #include "readlink2.c"
diff --git a/sim/testsuite/cris/c/readlink8.c b/sim/testsuite/cris/c/readlink8.c
index 98319fb4e344..ddc424e4c510 100644
--- a/sim/testsuite/cris/c/readlink8.c
+++ b/sim/testsuite/cris/c/readlink8.c
@@ -1,6 +1,6 @@
 /* Check that rare readlink calls don't cause the simulator to abort.
 #notarget: cris*-*-elf
-#sim: --sysroot=@exedir@ --env-unset PWD
+#sim: --sysroot=$pwd --env-unset PWD
  */
 #define SYSROOTED 1
 #include "readlink2.c"
diff --git a/sim/testsuite/cris/c/readlink9.c b/sim/testsuite/cris/c/readlink9.c
index 278805436372..7316b7a9854e 100644
--- a/sim/testsuite/cris/c/readlink9.c
+++ b/sim/testsuite/cris/c/readlink9.c
@@ -1,6 +1,6 @@
 /* Check that odd cases of readlink work.
 #notarget: cris*-*-elf
-#cc: additional_flags=-DX="@exedir@"
+#cc: additional_flags=-DX="$pwd"
 */
 
 #include <unistd.h>
diff --git a/sim/testsuite/cris/c/seek2.c b/sim/testsuite/cris/c/seek2.c
index 9c24dfbdb08c..65d9d2402da2 100644
--- a/sim/testsuite/cris/c/seek2.c
+++ b/sim/testsuite/cris/c/seek2.c
@@ -1,4 +1,4 @@
 /* Simulator options:
-#sim: --sysroot=@exedir@/
+#sim: --sysroot=$pwd/
 */
 #include "seek1.c"
diff --git a/sim/testsuite/cris/c/stat3.c b/sim/testsuite/cris/c/stat3.c
index a248ec0864ca..fa9fcc14b487 100644
--- a/sim/testsuite/cris/c/stat3.c
+++ b/sim/testsuite/cris/c/stat3.c
@@ -1,5 +1,5 @@
 /* Simulator options:
-#sim: --sysroot=@exedir@
+#sim: --sysroot=$pwd
 */
 #include <sys/types.h>
 #include <sys/stat.h>
diff --git a/sim/testsuite/cris/c/stat4.c b/sim/testsuite/cris/c/stat4.c
index 62415a340e81..e524ac87a8b8 100644
--- a/sim/testsuite/cris/c/stat4.c
+++ b/sim/testsuite/cris/c/stat4.c
@@ -1,6 +1,6 @@
 /* Simulator options:
 #notarget: cris*-*-elf
-#sim: --sysroot=@exedir@
+#sim: --sysroot=$pwd
 */
 
 #include <sys/types.h>
diff --git a/sim/testsuite/cris/c/truncate2.c b/sim/testsuite/cris/c/truncate2.c
index a4c6470d8c79..f021ae8ac992 100644
--- a/sim/testsuite/cris/c/truncate2.c
+++ b/sim/testsuite/cris/c/truncate2.c
@@ -1,5 +1,5 @@
 /*
-#sim: --sysroot=@exedir@
+#sim: --sysroot=$pwd
 #notarget: cris*-*-elf
 */
 #define PREFIX "/"
diff --git a/sim/testsuite/cris/hw/rv-n-cris/rvc.exp b/sim/testsuite/cris/hw/rv-n-cris/rvc.exp
index 3d8b5c3813de..ff3f757e49da 100644
--- a/sim/testsuite/cris/hw/rv-n-cris/rvc.exp
+++ b/sim/testsuite/cris/hw/rv-n-cris/rvc.exp
@@ -99,6 +99,7 @@ proc slurp_rv { file } {
 	if [regexp $pat $line xxx cmd] {
 	    # match!
 	    set cmd [string map [list \
+		{$pwd} [pwd] \
 		{$srcdir} "$srcdir" \
 		{$subdir} "$subdir" \
 	    ] "$cmd"]
diff --git a/sim/testsuite/lib/sim-defs.exp b/sim/testsuite/lib/sim-defs.exp
index 7bc4c66549ee..0ddc4d556ab7 100644
--- a/sim/testsuite/lib/sim-defs.exp
+++ b/sim/testsuite/lib/sim-defs.exp
@@ -447,6 +447,7 @@ proc slurp_options { file } {
 	if [regexp $pat $line xxx opt_name opt_machs opt_val] {
 	    # match!
 	    set opt_val [string map [list \
+		{$pwd} [pwd] \
 		{$srcdir} "$srcdir" \
 		{$subdir} "$subdir" \
 	    ] "$opt_val"]
-- 
2.33.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-17  1:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-17  1:31 [PATCH 1/3] sim: cris: drop custom "dynamic" test field Mike Frysinger
2021-11-17  1:31 ` [PATCH 2/3] sim: cris: replace @srcdir@ test extension with $srcdir/$subdir Mike Frysinger
2021-11-17  1:31 ` [PATCH 3/3] sim: testsuite: add support for $pwd replacements Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).