Software Distributor Administration Guide (March 2009)

Table Of Contents
7. If your product is locatable (that is, it can be installed into a different location),
then re-run the tests by installing and configuring the product in a different location.
Make sure that the scripts perform all their operations in the new location, and
not the default location. (This verifies the correct use of $SW_LOCATION by your
scripts.)
8. If you have a complex script, run additional tests for your product that you feel
will give you confidence your product has been installed correctly on the system.
For example, only install certain subsets of your product instead of the full product.
11.9.3 Testing Removal Scripts
For checkremove, preremove, and postremove scripts you should perform at least these
tests. All tests can be performed on the local system (that is, by doing local installs).
There is no value gained by testing your scripts by installing to remote target systems.
1. Run swinstall to install the full product (that is, all the filesets). Avoid
configuration by setting the defer_configure option to false.
Run swremove to remove the unconfigured product.
After the removal completes, check the ${SW_ROOT_DIRECTORY}var/adm/
sw/swagent.log file for any problems, either in the removal scripts or the
format/contents of the messages generated by the scripts.
Study the resulting file system to see if the removal scripts performed the
expected actions.
2. Run swinstall to install the full product (that is, all of the filesets). Let the
installation process perform the configuration task (and run your configure
script(s)).
Run swremove to remove the configured product.
After the unconfiguration and removal completes, check the
${SW_ROOT_DIRECTORY}var/adm/sw/swagent.log file for any problems,
either in the removal scripts or the format/contents of the messages generated
by the scripts.
Study the resulting file system to see if the removal scripts performed the
expected actions.
3. If your checkremove script can generate error or warning conditions based on the
current activity or configuration of the target system, then enable those conditions
to ensure that the checkremove script correctly detects them.
4. Re-run the first test by installing into an alternate root directory (swinstall -r)
instead of the primary root directory (“/”). Make sure that the scripts perform all
of their operations (if any) within the alternate root directory. (This verifies the
correct use of ${SW_ROOT_DIRECTORY} by your scripts.)
5. If your product is locatable (that is, it can be installed into a different location),
then re-run the tests by installing the product into a different location. When
removing the product, make sure that the removal scripts perform all of their
290 Using Control Scripts