Skip to content

Commit 24f3ff4

Browse files
authored
Backport wycheproof exclude to 1.1.1 branch (alexcrichton#139)
* Backport wycheproof exclude to 1.1.1 branch * Backport exclude CI checks * Backport exclude CI checks
1 parent ef76fcd commit 24f3ff4

File tree

2 files changed

+33
-4
lines changed

2 files changed

+33
-4
lines changed

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ exclude = [
1414
'openssl/krb5/*',
1515
'openssl/pyca-cryptography/*',
1616
'openssl/test/*',
17+
'openssl/wycheproof/*',
1718
]
1819

1920
[features]
@@ -33,6 +34,7 @@ seed = []
3334

3435
[workspace]
3536
members = ['testcrate']
37+
exclude = ['target']
3638

3739
[dependencies]
3840
cc = "1.0"

ci/run.sh

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,39 @@
1+
#!/bin/bash
2+
13
target=$1
4+
testcrate_dir="$(pwd)/testcrate"
25
set -ex
36

47
if [ "$1" = "aarch64-apple-darwin" ] ; then
5-
export CARGO_TARGET_AARCH64_APPLE_DARWIN_RUNNER=echo
8+
export CARGO_TARGET_AARCH64_APPLE_DARWIN_RUNNER=echo
69
fi
710

8-
cargo test --manifest-path testcrate/Cargo.toml --target $1 -vv
9-
cargo test --manifest-path testcrate/Cargo.toml --target $1 -vv --release
11+
cargo test --manifest-path "$testcrate_dir/Cargo.toml" --target $1 -vv
12+
cargo test --manifest-path "$testcrate_dir/Cargo.toml" --target $1 -vv --release
13+
1014
if [ "$1" = "x86_64-unknown-linux-gnu" ] ; then
11-
cargo test --manifest-path testcrate/Cargo.toml --target $1 -vv --all-features
15+
cargo test --manifest-path "$testcrate_dir/Cargo.toml" --target $1 -vv --all-features
16+
17+
# Run a few tests here:
18+
#
19+
# * Make sure the packaged crate file isn't bigger than 10MB which is
20+
# crate.io's limit.
21+
# * Make sure that the package crate itself works.
22+
#
23+
# A lot of OpenSSL's source code is excluded on crates.io because it makes the
24+
# crate file much too large, so the test here should inform us if we're
25+
# missing anything actually required to build OpenSSL.
26+
rm -rf target/ci
27+
cargo package --allow-dirty --target-dir target/ci
28+
crate=`ls target/ci/package/*.crate`
29+
filesize=$(stat -c%s "$crate")
30+
echo "tarball is $filesize bytes"
31+
if (( filesize > 10000000 )); then
32+
echo "file size too big"
33+
exit 1
34+
fi
35+
rm "$crate"
36+
cd target/ci/package/openssl-src-*
37+
cp -r "$testcrate_dir" .
38+
cargo test --manifest-path "testcrate/Cargo.toml" --target $1 -vv
1239
fi

0 commit comments

Comments
 (0)