The functional test scripts

The main.sh script is a Bourne shell script that accepts one of five possible command-line parameters, as described in the following table.
Command Description
main.sh build Runs user.sh with a build target.

Runs the setup.sql script.

main.sh clean Deletes .log files.

Runs user.sh with a clean target.

Executes clean.sql in the database.

main.sh run Uses DB-Access to run each SQL script generated by BladeSmith, saving the output in a .log file.

If a .req file exists, calls diff to determine the test result. It prints a message telling whether the test passed or failed.

After all BladeSmith-generated tests are run, executes user.sh with a run target.

main.sh save Copies all .log files to .req files, overwriting existing .req files.
main.sh all Performs the build, run, and clean actions. Use this shortcut after the .req files have been saved.