mirror of
https://github.com/danog/ir.git
synced 2024-12-11 16:59:46 +01:00
Dot't print exit code after "--run" (delegate this to tester)
This commit is contained in:
parent
fb10fa2861
commit
05db256d87
@ -1072,7 +1072,6 @@ finish:
|
|||||||
int jit_argc = 1;
|
int jit_argc = 1;
|
||||||
char **jit_argv;
|
char **jit_argv;
|
||||||
int (*func)(int, char**) = loader.main;
|
int (*func)(int, char**) = loader.main;
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (run_args && argc > run_args) {
|
if (run_args && argc > run_args) {
|
||||||
jit_argc = argc - run_args + 1;
|
jit_argc = argc - run_args + 1;
|
||||||
@ -1082,11 +1081,7 @@ finish:
|
|||||||
for (i = 1; i < jit_argc; i++) {
|
for (i = 1; i < jit_argc; i++) {
|
||||||
jit_argv[i] = argv[run_args + i - 1];
|
jit_argv[i] = argv[run_args + i - 1];
|
||||||
}
|
}
|
||||||
ret = func(jit_argc, jit_argv);
|
return func(jit_argc, jit_argv);
|
||||||
fflush(stdout);
|
|
||||||
if (ret) {
|
|
||||||
fprintf(stderr, "\nexit code = %d\n", ret);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -287,13 +287,19 @@ static int run_test(const char *filename, test *t, int show_diff)
|
|||||||
|
|
||||||
ret = system(cmd) >> 8;
|
ret = system(cmd) >> 8;
|
||||||
|
|
||||||
|
if (ret) {
|
||||||
|
FILE *f = fopen(out_filename, "a+");
|
||||||
|
fprintf(f, "\nexit code = %d\n", ret);
|
||||||
|
fclose(f);
|
||||||
|
}
|
||||||
|
|
||||||
out = read_file(out_filename);
|
out = read_file(out_filename);
|
||||||
if (!out) {
|
if (!out) {
|
||||||
out = malloc(1);
|
out = malloc(1);
|
||||||
out[0] = 0;
|
out[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = ret == 0 && same_text(t->expect, out);
|
ret = same_text(t->expect, out);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
unlink(code_filename);
|
unlink(code_filename);
|
||||||
unlink(out_filename);
|
unlink(out_filename);
|
||||||
|
Loading…
Reference in New Issue
Block a user