summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2009-09-25 06:23:32 -0700
committerDan Nicholson <dbn.lists@gmail.com>2009-09-25 06:23:32 -0700
commit0d4075ecf5e465bedb145d568817ed7b6a66edce (patch)
tree647507bd6c55c952b13da8e1d995e177dffc0e0c /src
parent707adf6328759b19f44294a9ca3e860655ff1671 (diff)
tcc: Output results files in test case subdirectories
When a lot of test cases are run, the results directory can become very cluttered. Instead, they'll be created in subdirectories matching the directory structure of the tests themselves.
Diffstat (limited to 'src')
-rw-r--r--src/tet3/tcc/tool.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/tet3/tcc/tool.c b/src/tet3/tcc/tool.c
index 376fcee0..80c75c2f 100644
--- a/src/tet3/tcc/tool.c
+++ b/src/tet3/tcc/tool.c
@@ -361,7 +361,7 @@ char *tcname, **argv, *ocfname;
case TCS_BUILD:
case TCS_EXEC:
case TCS_CLEAN:
- xresfilename(argv[0], buf, sizeof buf);
+ xresfilename(prp->pr_scen->sc_tcname, buf, sizeof buf);
(void) tcc_unlink(*prp->pr_sys, buf);
prp->pr_tetxres = rstrstore(buf);
break;
@@ -666,7 +666,7 @@ int xrfnamelen;
char logname[64];
sprintf(logname, "%.*s.log", sizeof(logname) - 5, tcname);
- fullpath(resdirname(), logname, xrfname, xrfnamelen, 1);
+ tcdirfname(tcpath, logname, xrfname, xrfnamelen);
}
/*
@@ -679,8 +679,11 @@ char *tcpath, *fname, *path;
int pathlen;
{
char tcdir[MAXPATH];
+ size_t reslen;
- tcc_dirname(tcpath, tcdir, sizeof tcdir);
+ strncpy(tcdir, resdirname(), sizeof(tcdir) - 1);
+ reslen = strlen(tcdir);
+ tcc_dirname(tcpath, tcdir + reslen, sizeof(tcdir) - reslen);
fullpath(tcdir, fname, path, pathlen, 1);
}