File: README.md

package info (click to toggle)
tpm2-tools 5.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,988 kB
  • sloc: ansic: 45,737; sh: 14,915; xml: 8,342; makefile: 610; python: 51
file content (23 lines) | stat: -rw-r--r-- 812 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Testing Framework

The command **make check** can be used to run the test scripts.

The configure option `--enable-unit` must be specified and the
`tpm2-abrmd` and `tpm_server` must be found on `$PATH`. If they are installed
in custom locations, specify or export `$PATH` during configure.

For example:
```sh
./configure --enable-unit PATH=$PATH:/path/to/tpm2-abrmd:/path/to/tpm/sim/ibmtpm974/src
```

## Adding a new integration test
To add a new test, do:

1. add a script to the `test/integration/tests` directory.
2. `source helpers.sh` in the new script.
3. issue the command `start_up`.
4. Do whatever test you need to do.
5. If you set the `EXIT` handler, call `tpm2 shutdown` in that handler.
6. `make distclean`, re-run `bootstrap` and configure to pick up the new script.
7. Run `make check` again.