Software Distributor Administration Guide for HP-UX 11i
Using Control Scripts
Testing Control Scripts
Chapter 11402
Testing Control Scripts
The following testing suggestions do not cover all test scenarios. There
may still be problems with a control script even after doing this testing.
For example, you may test installing/removing individual filesets. But
there might be some interactions that are discovered only after all the
filesets are installed on or removed from the system.
Similarly, you may test the control scripts on a fully loaded system and
miss a problem when you execute a command in your script that is not
part of the base (or core) system. If your target system does not contain
the particular command, your script may fail.
Testing Installation Scripts
For checkinstall, preinstall, and postinstall scripts you should perform at
least these tests. All tests can be performed on the local system (that is,
by doing local installs).
1. The basic test:
• Run swinstall to install the full product (that is, all the filesets).
To avoid testing the configure script(s), either do not include any
in the product, or set the defer_configure option to “true.”
• After the installation completes, check the
<${SW_ROOT_DIRECTORY}var/adm/sw/swagent.log file for any
problems, either in the scripts or the format/contents of the
messages generated by the scripts.
• Study the resulting file system to see if the scripts performed the
expected actions.
• Re-run the test by re-installing the same product.
2. If you want to avoid the time spent loading files, then set the
reinstall_files option to “false” and the
reinstall_files_use_cksum option to “false.”
3. If a previous version of the product can be updated to this version,
then re-run the test by updating this product where the previous
version has been installed.