Skip to content

Commit

Permalink
attest: fix test build for MacOS (#241)
Browse files Browse the repository at this point in the history
Windows still requires openssl due to tpm-tools simulator. Will try to
figure out that next.
  • Loading branch information
ericchiang committed Sep 1, 2021
1 parent 505680f commit a35bd36
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Link openssl
run: sudo ln -s $(brew --prefix openssl)/include/openssl /usr/local/include
- name: Test
run: C_INCLUDE_PATH="$(brew --prefix openssl)/include" LIBRARY_PATH="$(brew --prefix openssl)/lib" go build ./...
run: C_INCLUDE_PATH="$(brew --prefix openssl)/include" LIBRARY_PATH="$(brew --prefix openssl)/lib" go test ./...
test-windows:
strategy:
matrix:
Expand Down
4 changes: 1 addition & 3 deletions attest/attest_simulated_tpm20_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@
// License for the specific language governing permissions and limitations under
// the License.

// +build linux
// +build !localtest !tpm12
// +build cgo

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

package attest

Expand All @@ -35,7 +33,7 @@ func setupSimulatedTPM(t *testing.T) (*simulator.Simulator, *TPM) {
if err != nil {
t.Fatal(err)
}
attestTPM, err := OpenTPM(&OpenConfig{CommandChannel: &linuxCmdChannel{tpm}})
attestTPM, err := OpenTPM(&OpenConfig{CommandChannel: &fakeCmdChannel{tpm}})
if err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit a35bd36

Please sign in to comment.