Skip to content

Backport wycheproof exclude to 1.1.1 branch #139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ exclude = [
'openssl/krb5/*',
'openssl/pyca-cryptography/*',
'openssl/test/*',
'openssl/wycheproof/*',
]

[features]
Expand All @@ -33,6 +34,7 @@ seed = []

[workspace]
members = ['testcrate']
exclude = ['target']

[dependencies]
cc = "1.0"
35 changes: 31 additions & 4 deletions ci/run.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,39 @@
#!/bin/bash

target=$1
testcrate_dir="$(pwd)/testcrate"
set -ex

if [ "$1" = "aarch64-apple-darwin" ] ; then
export CARGO_TARGET_AARCH64_APPLE_DARWIN_RUNNER=echo
export CARGO_TARGET_AARCH64_APPLE_DARWIN_RUNNER=echo
fi

cargo test --manifest-path testcrate/Cargo.toml --target $1 -vv
cargo test --manifest-path testcrate/Cargo.toml --target $1 -vv --release
cargo test --manifest-path "$testcrate_dir/Cargo.toml" --target $1 -vv
cargo test --manifest-path "$testcrate_dir/Cargo.toml" --target $1 -vv --release

if [ "$1" = "x86_64-unknown-linux-gnu" ] ; then
cargo test --manifest-path testcrate/Cargo.toml --target $1 -vv --all-features
cargo test --manifest-path "$testcrate_dir/Cargo.toml" --target $1 -vv --all-features

# Run a few tests here:
#
# * Make sure the packaged crate file isn't bigger than 10MB which is
# crate.io's limit.
# * Make sure that the package crate itself works.
#
# A lot of OpenSSL's source code is excluded on crates.io because it makes the
# crate file much too large, so the test here should inform us if we're
# missing anything actually required to build OpenSSL.
rm -rf target/ci
cargo package --allow-dirty --target-dir target/ci
crate=`ls target/ci/package/*.crate`
filesize=$(stat -c%s "$crate")
echo "tarball is $filesize bytes"
if (( filesize > 10000000 )); then
echo "file size too big"
exit 1
fi
rm "$crate"
cd target/ci/package/openssl-src-*
cp -r "$testcrate_dir" .
cargo test --manifest-path "testcrate/Cargo.toml" --target $1 -vv
fi