gcc/libstdc++/testsuite/libstdc++.tests/test.exp
Jason Merrill 6599da043e Initial revision
From-SVN: r14877
1997-08-21 18:57:35 -04:00

35 lines
864 B
Plaintext

global srcdir subdir
catch "glob -nocomplain $srcdir/$subdir/../../tests/*.exp" srcfiles
verbose "srcfiles are $srcfiles"
set prefix ""
foreach x $srcfiles {
regsub "\\.exp$" $x "" prefix
set bname [file tail $prefix]
set args ""
if [file exists $srcdir/$subdir/${bname}.arg] {
set id [open "$srcdir/$subdir/${bname}.arg" r];
set args [read -nonewline $id];
close $id;
}
if [file exists $srcdir/$subdir/${bname}.xpo] {
set resfile "$srcdir/$subdir/${bname}.xpo"
set options "regexp_match"
} else {
set resfile "${prefix}.exp"
set options ""
}
if [file exists ${prefix}.inp] {
set inpfile ${prefix}.inp
} else {
set inpfile ""
}
verbose "inpfile is $inpfile"
test_libstdc++ $options "${prefix}.cc" "" $inpfile $resfile $args
test_libstdc++ $options "${prefix}.cc" "-O" $inpfile $resfile $args
}