summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
0218d1b)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5909
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
if (rctx->cmd)
rctx_start();
if (rctx->cmd)
rctx_start();
/* search begining */
while (*(dir++) == ' ');
dir--;
VERB1("Saw cd '%s'",dir);
if (chdir(dir)) {
ERROR2("Chdir to %s failed: %s",dir,strerror(errno));
/* search begining */
while (*(dir++) == ' ');
dir--;
VERB1("Saw cd '%s'",dir);
if (chdir(dir)) {
ERROR2("Chdir to %s failed: %s",dir,strerror(errno));
- ERROR1("Test suite `%s': NOK (system error)", testsuite_name);
+ ERROR1("Test suite `%s': NOK (system error)", testsuite_name);
rctx_armageddon(rctx,4);
}
break;
rctx_armageddon(rctx,4);
}
break;
case '<':
case '>':
case '!':
case '<':
case '>':
case '!':
- rctx_pushline(filepos, line[0], line+2 /* pass '$ ' stuff*/);
+ rctx_pushline(filepos, line[0], line+2 /* pass '$ ' stuff*/);
char file_pos[256];
xbt_strbuff_t buff=xbt_strbuff_new();
char file_pos[256];
xbt_strbuff_t buff=xbt_strbuff_new();
/* Count the line length while checking wheather it's blank */
int blankline=1;
/* Count the line length while checking wheather it's blank */
int blankline=1;
while (line[linelen] != '\0') {
if (line[linelen] != ' ' && line[linelen] != '\t' && line[linelen]!='\n')
blankline = 0;
linelen++;
}
while (line[linelen] != '\0') {
if (line[linelen] != ' ' && line[linelen] != '\t' && line[linelen]!='\n')
blankline = 0;
linelen++;
}
if (blankline) {
if (!rctx->cmd && !rctx->is_empty) {
ERROR1("[%d] Error: no command found in this chunk of lines.",
if (blankline) {
if (!rctx->cmd && !rctx->is_empty) {
ERROR1("[%d] Error: no command found in this chunk of lines.",
} else {
to_be_continued = 1;
line[linelen-2] = '\0';
} else {
to_be_continued = 1;
line[linelen-2] = '\0';
if (!buff->used)
buffbegin = line_num;
}
}
if (!buff->used)
buffbegin = line_num;
}
}
- if (buff->used || to_be_continued) {
+ if (buff->used || to_be_continued) {
xbt_strbuff_append(buff,line);
if (!to_be_continued) {
snprintf(file_pos,256,"%s:%d",filename,buffbegin);
xbt_strbuff_append(buff,line);
if (!to_be_continued) {
snprintf(file_pos,256,"%s:%d",filename,buffbegin);
- handle_line(file_pos, buff->data);
+ handle_line(file_pos, buff->data);
xbt_strbuff_empty(buff);
}
xbt_strbuff_empty(buff);
}
} else {
snprintf(file_pos,256,"%s:%d",filename,line_num);
} else {
snprintf(file_pos,256,"%s:%d",filename,line_num);
- handle_line(file_pos, line);
+ handle_line(file_pos, line);
}
}
/* Check that last command of the file ran well */
}
}
/* Check that last command of the file ran well */
rctx_start();
/* Wait all background commands */
rctx_start();
/* Wait all background commands */
FILE *IN;
/* Ignore pipe issues.
FILE *IN;
/* Ignore pipe issues.
- They will show up when we try to send data to dead buddies,
+ They will show up when we try to send data to dead buddies,
but we will stop doing so when we're done with provided input */
struct sigaction newact;
memset(&newact,0, sizeof(newact));
newact.sa_handler=SIG_IGN;
sigaction(SIGPIPE,&newact,NULL);
but we will stop doing so when we're done with provided input */
struct sigaction newact;
memset(&newact,0, sizeof(newact));
newact.sa_handler=SIG_IGN;
sigaction(SIGPIPE,&newact,NULL);
xbt_init(&argc,argv);
rctx_init();
xbt_init(&argc,argv);
rctx_init();
testsuite_name = xbt_strdup("(stdin)");
handle_suite("stdin",stdin);
INFO0("Test suite from stdin OK");
testsuite_name = xbt_strdup("(stdin)");
handle_suite("stdin",stdin);
INFO0("Test suite from stdin OK");
for (i=1; i<argc; i++) {
char *suitename=xbt_strdup(argv[i]);
if (!strcmp("./",suitename))
for (i=1; i<argc; i++) {
char *suitename=xbt_strdup(argv[i]);
if (!strcmp("./",suitename))
}
handle_suite(suitename,IN);
rctx_wait_bg();
}
handle_suite(suitename,IN);
rctx_wait_bg();
INFO1("Test suite `%s' OK",suitename);
free(suitename);
}
INFO1("Test suite `%s' OK",suitename);
free(suitename);
}