diff options
Diffstat (limited to 'src/tet3/tcc/exec.c')
-rw-r--r-- | src/tet3/tcc/exec.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/tet3/tcc/exec.c b/src/tet3/tcc/exec.c index 80cf630b..3389270e 100644 --- a/src/tet3/tcc/exec.c +++ b/src/tet3/tcc/exec.c @@ -75,6 +75,8 @@ char *path, **argv, *tcdir, *outfile; static #endif /* TET_LITE */ /* -LITE-CUT-LINE- */ char buf[sizeof fmt + LNUMSZ]; + char *resdir; + char resbuf[MAXPATH + sizeof("TET_RESDIR=")]; struct systab *sp; long remid; #ifdef TET_LITE /* -LITE-CUT-LINE- */ @@ -104,6 +106,19 @@ char *path, **argv, *tcdir, *outfile; sp->sy_activity = prp->pr_activity; } + /* put the results directory into the environment */ + resdir = resdirname(); + if (resdir) { + sprintf(resbuf, "TET_RESDIR=%s", resdir); + TRACE3(tet_Ttcc, 6, "putenv \"%s\" on system %s", + resbuf, tet_i2a(*prp->pr_sys)); + if (tcc_putenv(*prp->pr_sys, resbuf) < 0) { + prperror(prp, *prp->pr_sys, tet_tcerrno, + "tcc_putenv(TET_RESDIR) failed", NULL); + return(-1L); + } + } + /* change to the test case directory */ if (sychdir(sp, tcdir) < 0) { prperror(prp, *prp->pr_sys, errno ? errno : tet_tcerrno, |