diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-11-16 20:21:59 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-11-16 20:21:59 -0500 |
commit | c2aad00a7447a32e1f4b0bd558a1bd2b13085381 (patch) | |
tree | f3223f0539737be3ee23b0cb4b11ea306802853e /sim/testsuite/cris/c | |
parent | 927f25ebac00e225ed7ca88e45e2a98ddbdb122a (diff) | |
download | binutils-gdb-c2aad00a7447a32e1f4b0bd558a1bd2b13085381.tar.gz |
sim: testsuite: add support for $pwd replacements
Extend the common test framework to support $pwd replacements in
settings. This allows replacing the custom cris @exedir@ with it.
Diffstat (limited to 'sim/testsuite/cris/c')
-rw-r--r-- | sim/testsuite/cris/c/badldso3.c | 2 | ||||
-rw-r--r-- | sim/testsuite/cris/c/c.exp | 4 | ||||
-rw-r--r-- | sim/testsuite/cris/c/clone2.c | 2 | ||||
-rw-r--r-- | sim/testsuite/cris/c/hellodyn.c | 2 | ||||
-rw-r--r-- | sim/testsuite/cris/c/hellodyn2.c | 2 | ||||
-rw-r--r-- | sim/testsuite/cris/c/hellodyn3.c | 2 | ||||
-rw-r--r-- | sim/testsuite/cris/c/openpf1.c | 2 | ||||
-rw-r--r-- | sim/testsuite/cris/c/openpf4.c | 2 | ||||
-rw-r--r-- | sim/testsuite/cris/c/openpf5.c | 2 | ||||
-rw-r--r-- | sim/testsuite/cris/c/readlink3.c | 2 | ||||
-rw-r--r-- | sim/testsuite/cris/c/readlink6.c | 2 | ||||
-rw-r--r-- | sim/testsuite/cris/c/readlink8.c | 2 | ||||
-rw-r--r-- | sim/testsuite/cris/c/readlink9.c | 2 | ||||
-rw-r--r-- | sim/testsuite/cris/c/seek2.c | 2 | ||||
-rw-r--r-- | sim/testsuite/cris/c/stat3.c | 2 | ||||
-rw-r--r-- | sim/testsuite/cris/c/stat4.c | 2 | ||||
-rw-r--r-- | sim/testsuite/cris/c/truncate2.c | 2 |
17 files changed, 16 insertions, 20 deletions
diff --git a/sim/testsuite/cris/c/badldso3.c b/sim/testsuite/cris/c/badldso3.c index 9ff6d9a7613..f827e771a9c 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 e5b48661b63..233ed853377 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 e433a778b34..aaa0873b640 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 4a036cc4879..886818ad82c 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 2a94ea4824b..47b501372da 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 d21122f73ea..4dd8bdd9e84 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 e0d8e5c9140..fe767f71f37 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 d3fdcfe2f90..b7ae810d780 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 1f86ea283d4..90bebe509be 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 94cff727e38..d728087f1d5 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 52a26f49639..d64b95913a3 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 98319fb4e34..ddc424e4c51 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 27880543637..7316b7a9854 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 9c24dfbdb08..65d9d2402da 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 a248ec0864c..fa9fcc14b48 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 62415a340e8..e524ac87a8b 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 a4c6470d8c7..f021ae8ac99 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 "/" |