summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2009-09-24 23:42:48 -0700
committerDan Nicholson <dbn.lists@gmail.com>2009-09-24 23:42:48 -0700
commit057d0cb6c69531852d5482b8eec16956cdf4f4f9 (patch)
treef70c3ee21519b6db1db5249e97b086a6f26e9d17 /src
parent830f253234c94636c197617466c4b2910a39e574 (diff)
tet: Fix tcc's notion of the results file
While the test program was fixed to output results in the results directory with the $test.log name, tcc still was trying to use the file tet_xres in the test directory. This fixes xresfilename to set the correct name.
Diffstat (limited to 'src')
-rw-r--r--src/tet3/tcc/tool.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/tet3/tcc/tool.c b/src/tet3/tcc/tool.c
index d977930f..376fcee0 100644
--- a/src/tet3/tcc/tool.c
+++ b/src/tet3/tcc/tool.c
@@ -54,6 +54,7 @@ MODIFICATIONS:
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <time.h>
#include <ctype.h>
#include <errno.h>
@@ -360,7 +361,7 @@ char *tcname, **argv, *ocfname;
case TCS_BUILD:
case TCS_EXEC:
case TCS_CLEAN:
- xresfilename(tcname, buf, sizeof buf);
+ xresfilename(argv[0], buf, sizeof buf);
(void) tcc_unlink(*prp->pr_sys, buf);
prp->pr_tetxres = rstrstore(buf);
break;
@@ -661,7 +662,11 @@ static void xresfilename(tcpath, xrfname, xrfnamelen)
char *tcpath, *xrfname;
int xrfnamelen;
{
- tcdirfname(tcpath, "tet_xres", xrfname, xrfnamelen);
+ char *tcname = tet_basename(tcpath);
+ char logname[64];
+
+ sprintf(logname, "%.*s.log", sizeof(logname) - 5, tcname);
+ fullpath(resdirname(), logname, xrfname, xrfnamelen, 1);
}
/*