Skip to content

Latest commit

 

History

History
28 lines (21 loc) · 1.3 KB

TESTING.md

File metadata and controls

28 lines (21 loc) · 1.3 KB

Testing

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:

  1. Under the directory TEST_DIR_ROOT, create a directory, <feature>.testdir and chdir into that directory.
  2. 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)
  3. Write a GNU makefile that invokes pmake. Required targets inteh GNU makefile are:
    • build
    • run
    • check
    • clean
  4. make build : Builds any collatertal that is needed for running the test.
  5. 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.
  6. make check : Perform a check of the run the test. Usually done by looking at a logfile generated by make run. If there is an error, create a file, test.failed. If there is no error, create a file, test.passed.
  7. make clean : Remove all collateral that was generated by make build, make run and make check.