/*** Options ***/
int timeout_value = 5; /* child timeout value */
-
+char *testsuite_name;
static void handle_line(const char * filepos, char *line) {
- int pos;
-
/* Search end */
xbt_str_rtrim(line+2,"\n");
char buff[256];
strerror_r(errno, buff, 256);
- ERROR2("Chdir to %s failed: %s",dir+pos+2,buff);
+ perror(bprintf("Chdir to %s failed: %s",dir,buff));
+ ERROR1("Test suite `%s': NOK (system error)",testsuite_name);
exit(4);
}
break;
default:
ERROR2("[%s] Syntax error: %s",filepos, line);
+ ERROR1("Test suite `%s': NOK (syntax error)",testsuite_name);
exit(1);
break;
}
if (!rctx->cmd && !rctx->is_empty) {
ERROR1("[%d] Error: no command found in this chunk of lines.",
buffbegin);
+ ERROR1("Test suite `%s': NOK (syntax error)",testsuite_name);
exit(1);
}
if (rctx->cmd)
suitename[strlen(suitename)-5] = '\0';
INFO1("Test suite `%s'",suitename);
+ testsuite_name = suitename;
IN=fopen(argv[i], "r");
if (!IN) {
perror(bprintf("Impossible to open the suite file `%s'",argv[i]));
+ ERROR1("Test suite `%s': NOK (system error)",testsuite_name);
exit(1);
}
handle_suite(suitename,IN);