+2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
+
+ * conform/conformtest.pl: Handle --tmpdir argument, defaulting to /tmp.
+ * conform/run-conformtest.sh: Pass --tmpdir argument when invoking
+ conformtest.pl
+
2012-03-21 Joseph Myers <joseph@codesourcery.com>
* NOTES: Remove.
use Getopt::Long;
use POSIX;
+$standard = "XOPEN2K8";
$CC = "gcc";
-
-$standard="XOPEN2K8";
+$tmpdir = "/tmp";
GetOptions ('headers=s' => \@headers, 'standard=s' => \$standard,
- 'flags=s' => \$flags, 'cc=s' => \$CC);
+ 'flags=s' => \$flags, 'cc=s' => \$CC, 'tmpdir=s' => \$tmpdir);
@headers = split(/,/,join(',',@headers));
# List of the headers we are testing.
$isknown{pop (@knownproblems)} = 1;
}
-$uid = getuid();
-($pwname,$pwpasswd,$pwuid,$pwgid,
- $pwquota,$pwcomment,$pwgcos,$pwdir,$pwshell,$pwexpire) = getpwuid($uid);
-$tmpdir = "$pwdir";
-
$verbose = 1;
$total = 0;
cc="$3"
includes="$4"
+scratch=${objpfx}scratch
+mkdir -p "$scratch"
+
standards=("ISO" "ISO99" "ISO11" "POSIX" "XPG3" "XPG4" "UNIX98"
"XOPEN2K" "XOPEN2K8" "POSIX2008")
for s in ${standards[*]}; do
echo -n $s...
e=0
- if ! $perl conformtest.pl --cc="$cc" --flags="$includes" --standard=$s > ${objpfx}conform-$s.out; then
+ if ! $perl conformtest.pl --tmpdir="$scratch" --cc="$cc" --flags="$includes" --standard=$s > ${objpfx}conform-$s.out; then
e=1
fi
printf "\n%s\n" $s >> ${objpfx}run-conformtest.out