summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tet3/tcm/ictp.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/tet3/tcm/ictp.c b/src/tet3/tcm/ictp.c
index 1e81c169..f06b494c 100644
--- a/src/tet3/tcm/ictp.c
+++ b/src/tet3/tcm/ictp.c
@@ -123,6 +123,9 @@ MODIFICATIONS:
Andrew Dingwall, UniSoft Ltd., July 1998
Added support for shared API libraries.
+ Peter Hutterer, Red Hat, Inc., June 2010
+ Guess TET_RESFILE if it's not in the environment.
+
************************************************************************/
#include <stdio.h>
@@ -798,7 +801,13 @@ char *progname;
/* get results filename from the environment */
resfile = getenv("TET_RESFILE");
if (!resfile)
- fatal(0, "TET_RESFILE not set in the environment", NULL);
+ {
+ /* just assume progname.log. */
+ char *new_resfile = malloc(strlen(progname) + 5);
+ sprintf(new_resfile, "%s.log", progname);
+ resfile = new_resfile; /* XXX: leaking memory */
+ printf("TET_RESFILE not set in the environment, using '%s'.\n", resfile);
+ }
tmpresenv = malloc(strlen(tmpvar) + strlen(resfile) +
strlen("=.tmp") + 1);