Mercurial > crates > nonstick
annotate testharness/install-test-harness.sh @ 163:a75a66cb4181
Add end-to-end tests; fix issues found by tests.
- Create tests and installer/remover shell script
- Fix Pointer/pointee problems
- Add Debug formatting
- Misc cleanup
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Mon, 14 Jul 2025 17:40:11 -0400 |
parents | |
children | d0bba0117456 |
rev | line source |
---|---|
163
a75a66cb4181
Add end-to-end tests; fix issues found by tests.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
1 #!/bin/bash |
a75a66cb4181
Add end-to-end tests; fix issues found by tests.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
2 |
a75a66cb4181
Add end-to-end tests; fix issues found by tests.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
3 set -eo pipefail |
a75a66cb4181
Add end-to-end tests; fix issues found by tests.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
4 |
a75a66cb4181
Add end-to-end tests; fix issues found by tests.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
5 HERE="$(dirname -- "$0")" |
a75a66cb4181
Add end-to-end tests; fix issues found by tests.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
6 echo "$HERE" |
a75a66cb4181
Add end-to-end tests; fix issues found by tests.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
7 cargo build --release |
a75a66cb4181
Add end-to-end tests; fix issues found by tests.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
8 |
a75a66cb4181
Add end-to-end tests; fix issues found by tests.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
9 sudo mkdir -p /lib/security |
a75a66cb4181
Add end-to-end tests; fix issues found by tests.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
10 sudo cp ../target/release/libnonstick_testharness.so /lib/security/pam_testharness.so |
a75a66cb4181
Add end-to-end tests; fix issues found by tests.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
11 sudo cp nonstick_testharness.conf /etc/pam.d/nonstick-testharness |
a75a66cb4181
Add end-to-end tests; fix issues found by tests.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
12 trap 'sudo rm /etc/pam.d/nonstick-testharness; sudo rm /lib/security/pam_testharness.so' EXIT |
a75a66cb4181
Add end-to-end tests; fix issues found by tests.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
13 "$@" && echo "SUCCESS!!!" || echo "FAILURE: $?" |