diff options
author | Tiago Gomes <tiago.gomes@codethink.co.uk> | 2015-07-31 13:25:50 +0000 |
---|---|---|
committer | Tiago Gomes <tiago.gomes@codethink.co.uk> | 2015-08-12 16:40:52 +0000 |
commit | c5cb1b57cab30d089ad577f89a82e83a6d487d4f (patch) | |
tree | 4ddca03b76217f32e4677e3b9af8871d9966fefa /scripts/test-shell.c | |
parent | 2cf830f7df706cab0042481e772b1bd6f4f8ab8a (diff) | |
download | morph-c5cb1b57cab30d089ad577f89a82e83a6d487d4f.tar.gz |
Use the shell X-ray mode
Instead of logging every command for ourselves, use the shell X-ray
mode. As side effect, each command argument will now be printed out in
its evaluated form, which aids debugging.
Also, improve the visual separation between the different build steps,
and display those steps with finer granularity.
Change-Id: I16ebe9ba4ac46fef82e37d0b3e05f42d14249de8
Diffstat (limited to 'scripts/test-shell.c')
-rw-r--r-- | scripts/test-shell.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/test-shell.c b/scripts/test-shell.c index 9818fbb4..963d128c 100644 --- a/scripts/test-shell.c +++ b/scripts/test-shell.c @@ -192,9 +192,10 @@ int run_commands(FILE *cmdstream){ } int main(int argc, char *argv[]) { - if (argc == 3 && strcmp(argv[1], "-c") == 0) { - size_t cmdlen = strlen(argv[2]); - FILE *cmdstream = fmemopen(argv[2], cmdlen, "r"); + if (argc == 4 && strcmp(argv[1], "-x") == 0 \ + && strcmp(argv[2], "-c") == 0) { + size_t cmdlen = strlen(argv[3]); + FILE *cmdstream = fmemopen(argv[3], cmdlen, "r"); return run_commands(cmdstream); } else if (argc == 2) { FILE *cmdstream = fopen(argv[1], "r"); |