diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-05-04 12:51:16 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-05-04 12:51:16 +0200 |
commit | 0d9191295e5ee60def97775c8ed672fd882caec2 (patch) | |
tree | 41d1c21ee05b097dca6dfc01b8129a5875a91d01 | |
parent | db89b40022b0ac464febec6224d820ff0bb64799 (diff) |
Add the ‘test’ subcommand
-rw-r--r-- | make.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -61,7 +61,10 @@ main(int argc, char **argv) while ((opt = getopt(argc, argv, "fj:r")) != -1) { switch (opt) { case '?': - fprintf(stderr, "Usage: %s [-j procs] [-fr]\n", *argv); + fprintf(stderr, + "Usage: %s [-j procs] [-fr]\n" + " %s clean | gen | test\n", + *argv, *argv); exit(EXIT_FAILURE); case 'j': procs = atoi(optarg); @@ -83,7 +86,9 @@ main(int argc, char **argv) cmdadd(&c, "find", "gen", "-mindepth", "2", "-type", "f", "-executable", "-not", "(", "-name", "scale", "-or", "-name", "bool-props.py", ")", "-exec", "{}", ";"); - } else + } else if (streq(*argv, "test")) + cmdadd(&c, "./test/run-tests"); + else diex("invalid subcommand — ‘%s’", *argv); cmdput(c); CMDRC(c); |