3.4. Testing the Port
Prev | Chapter 3. Quick Porting | Next

## 3.4. Testing the Port

You should make sure that the port rules do exactly what you want them to do, including packaging up the port. These are the important points you need to verify.

- `pkg-plist` does not contain anything not installed by your port

- `pkg-plist` contains everything that is installed by your port

- Your port can be installed multiple times using the `reinstall` target

- Your port cleans up after itself upon deinstall

Procedure 3.1. Recommended Test Ordering

1. `make install`

2. `make package`

3. `make deinstall`

4. `pkg_add `package-name``

5. `make deinstall`

6. `make reinstall`

7. `make package`

8. `make readme`

Make sure that there are not any warnings issued in any of the `package` and `deinstall` stages. After step 3, check to see if all the new directories are correctly deleted. Also, try using the software after step 4, to ensure that it works correctly when installed from a package.

The most thorough way to automate these steps is via installing the ports tinderbox. This maintains `jails` in which you can test all of the above steps without changing the state of your running system. Please see `ports/ports-mgmt/tinderbox` for more information.

Prev | Up | Next
3.3. Creating the Checksum File | Home | 3.5. Checking Your Port with `portlint`

All FreeBSD documents are available for download at http://ftp.FreeBSD.org/pub/FreeBSD/doc/

Questions that are not answered by the documentation may be sent to <freebsd-questions@FreeBSD.org>.
Send questions about this document to <freebsd-doc@FreeBSD.org>.