Skip to content

Commit a35bd36

Browse files
authored
attest: fix test build for MacOS (#241)
Windows still requires openssl due to tpm-tools simulator. Will try to figure out that next.
1 parent 505680f commit a35bd36

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
- name: Link openssl
5050
run: sudo ln -s $(brew --prefix openssl)/include/openssl /usr/local/include
5151
- name: Test
52-
run: C_INCLUDE_PATH="$(brew --prefix openssl)/include" LIBRARY_PATH="$(brew --prefix openssl)/lib" go build ./...
52+
run: C_INCLUDE_PATH="$(brew --prefix openssl)/include" LIBRARY_PATH="$(brew --prefix openssl)/lib" go test ./...
5353
test-windows:
5454
strategy:
5555
matrix:

attest/attest_simulated_tpm20_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@
1212
// License for the specific language governing permissions and limitations under
1313
// the License.
1414

15-
// +build linux
1615
// +build !localtest !tpm12
1716
// +build cgo
1817

1918
// NOTE: simulator requires cgo, hence the build tag.
20-
// NOTE: currently requires linuxCmdChannel, which is only defined on Linux.
2119

2220
package attest
2321

@@ -35,7 +33,7 @@ func setupSimulatedTPM(t *testing.T) (*simulator.Simulator, *TPM) {
3533
if err != nil {
3634
t.Fatal(err)
3735
}
38-
attestTPM, err := OpenTPM(&OpenConfig{CommandChannel: &linuxCmdChannel{tpm}})
36+
attestTPM, err := OpenTPM(&OpenConfig{CommandChannel: &fakeCmdChannel{tpm}})
3937
if err != nil {
4038
t.Fatal(err)
4139
}

0 commit comments

Comments
 (0)