./check_parser.sh will give an error if build/parser is not found. that means you need to run make.
./check_parser.sh uses proper bash arrays for the FILES variable. this is required in case any of the file names have spaces in them.
./check_parser.sh says how many tests are going to be run so that you have some sense of what you're waiting for.
./check_parser.sh says "FAIL" for each failed test instead of just printing the name. Also shows the reason for failure.
./check_parser.sh says "all tests passed" when they all pass.
This all came out of a usage confusion i had when i ran the script and it printed a bunch of tests to stdout. i thought it was telling me they all succeeded when really it was failing due to build/parser not even existing ( ͡° ͜ʖ ͡°). The output is much clearer now.
also:
Makefile lists the build directory as an "exist only" dependency of the first build artifact. This fixes the use case make build/parser when the build directory doesn't exist.
Makefile lists all and clean as .PHONY, which is "best practice" or whatever in case someone creates file system objects that match those names.
./check_parser.sh
will give an error ifbuild/parser
is not found. that means you need to run make../check_parser.sh
uses proper bash arrays for theFILES
variable. this is required in case any of the file names have spaces in them../check_parser.sh
says how many tests are going to be run so that you have some sense of what you're waiting for../check_parser.sh
says "FAIL" for each failed test instead of just printing the name. Also shows the reason for failure../check_parser.sh
says "all tests passed" when they all pass.This all came out of a usage confusion i had when i ran the script and it printed a bunch of tests to stdout. i thought it was telling me they all succeeded when really it was failing due to
build/parser
not even existing ( ͡° ͜ʖ ͡°). The output is much clearer now.also:
Makefile
lists thebuild
directory as an "exist only" dependency of the first build artifact. This fixes the use casemake build/parser
when thebuild
directory doesn't exist.Makefile
listsall
andclean
as.PHONY
, which is "best practice" or whatever in case someone creates file system objects that match those names.