In a bit of irony, the testing mechanism for pmake is based on ... GNU make.
Why? Well, GNU works and is a sound choice for building its replacement.
Tests should be self-checking from within the pmake makefile Sideband signalling (to provide information from the GNU makefile which invoked pmake) via ENV VARS.
Heres' the basic flow:
- Under the directory TEST_DIR_ROOT, create a directory,
<feature>.testdir
and chdir into that directory. - Write a pmake makefile that tests a particular feature of the pmake
- You will probably want to try and use a common Makefile (TODO: more description)
- Write a GNU makefile that invokes pmake. Required targets inteh GNU makefile are:
- build
- run
- check
- clean
make build
: Builds any collatertal that is needed for running the test.make run
: Invoke pmake using GNU make and a GNU makefile.- Set up env vars as needed for the test. The pmake makefile will (can) read in the values via python.
make check
: Perform a check of the run the test. Usually done by looking at a logfile generated bymake run
. If there is an error, create a file,test.failed
. If there is no error, create a file,test.passed
.make clean
: Remove all collateral that was generated bymake build
,make run
andmake check
.