| 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | set -ex |
| 4 | |
| 5 | ################################################################################ |
| 6 | # Tests for crate-crypto/Ed448-Goldilocks |
| 7 | ################################################################################ |
| 8 | git clone https://github.com/crate-crypto/Ed448-Goldilocks.git --branch=master Ed448-Goldilocks || exit $? |
| 9 | |
| 10 | pushd Ed448-Goldilocks >/dev/null || exit $? |
| 11 | |
| 12 | if grep -q "^\[patch\.crates-io\]" Cargo.toml; then |
| 13 | # Add to existing [patch.crates-io] section |
| 14 | sed -i '/^\[patch\.crates-io\]/a fiat-crypto = { path = "../fiat-rust" }' Cargo.toml |
| 15 | else |
| 16 | # Create new [patch.crates-io] section |
| 17 | cat >> Cargo.toml <<EOF |
| 18 | |
| 19 | [patch.crates-io] |
| 20 | fiat-crypto = { path = "../fiat-rust" } |
| 21 | EOF |
| 22 | fi |
| 23 | |
| 24 | cargo test --features="fiat_u64_backend" --no-default-features || exit $? |
| 25 | |
| 26 | popd >/dev/null |