forked from rustls/rustls
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get Bogo test working on M1 ("Apple Silicon") macOS Big Sur.
Fix the "build bogo_shim if it doesn't exist" logic; it was broken even on Linux as newer versions of Rust don't allow `--features` to be used at workspace level. I had to bootstrap Go on a Linux machine using the procedure at golang/go#42684 (comment): ``` git clone https://go.googlesource.com/go cd go git fetch https://go.googlesource.com/go refs/changes/58/272258/1 && git checkout FETCH_HEAD cd src GOOS=darwin GOARCH=arm64 ./bootstrap.bash ``` This version of Go required me to have a go.mod file. Change the way Bogo is downloaded from BoringSSL's repo to get this to work. The script tries to use sparse checkouts and a single-revision checkout but it is still slow so maybe one or both of those things aren't working as I expect. In particular, avoid `wget` since my Mac doesn't have `wget` available. Remove two of the patches to Bogo that seem to not be necessary if using a newer version of Go. Patch the remaining patch to work with the new directory structure. I verified that ./runme runs the tests and spits out "PASS" at the end on both macOS and Linux.
- Loading branch information
1 parent
47d3092
commit 049fd89
Showing
5 changed files
with
22 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,22 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
mkdir bogo | ||
pushd bogo | ||
|
||
git init | ||
cat << EOF > .git/info/sparse-checkout | ||
go.mod | ||
ssl/test/runner | ||
util/testresult | ||
EOF | ||
|
||
# a known-good commit | ||
COMMIT=47a6f5b4bf4d7acd8d5f7d43cb9c94335cec1c60 | ||
|
||
rm -f runner.tar.gz testresult.tar.gz | ||
wget https://boringssl.googlesource.com/boringssl/+archive/$COMMIT/ssl/test/runner.tar.gz | ||
wget https://boringssl.googlesource.com/boringssl/+archive/$COMMIT/util/testresult.tar.gz | ||
mkdir -p bogo | ||
cd bogo/ | ||
mkdir -p testresult | ||
tar -xzf ../runner.tar.gz | ||
( cd testresult && tar -xzf ../../testresult.tar.gz ) | ||
git fetch https://boringssl.googlesource.com/boringssl $COMMIT | ||
git checkout $COMMIT | ||
patch -p1 < ../patches/testerrormap.diff | ||
patch -p1 < ../patches/go-1.13-breakage.diff | ||
patch -p1 < ../patches/vendor.diff | ||
go test -c | ||
(cd ssl/test/runner && go test -c) | ||
|
||
popd |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters