# 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" } {
/* 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>
# Check that we trivially resolve a hostname.
-#r @,@srcdir@/trivial4.r
+#r @,$srcdir/$subdir/trivial4.r
.include "trivial4.ms"
# 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"
# 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 {
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
#mach: crisv32
-#r @,@srcdir@/trivial4.r
+#r @,$srcdir/$subdir/trivial4.r
# Test read and writes.
# Test trace output for read and write.
-#r @,@srcdir@/trivial4.r
+#r @,$srcdir/$subdir/trivial4.r
.include "trivial4.ms"