mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
27 lines
745 B
Bash
Executable File
27 lines
745 B
Bash
Executable File
#!/bin/bash
|
|
# Copyright (c) Microsoft Corporation.
|
|
# Licensed under the MIT License.
|
|
|
|
set -eo pipefail
|
|
|
|
if [ -f Cargo.toml ]; then
|
|
# Run precommit checks
|
|
dir=$(dirname "${BASH_SOURCE[0]}")
|
|
"$dir/pre-commit"
|
|
|
|
# Ensure that the public API works
|
|
cargo test -r --doc
|
|
|
|
# Ensure that all tests pass
|
|
cargo test -r
|
|
cargo test -r --test aci
|
|
|
|
# Ensure that OPA conformance tests don't regress.
|
|
cargo test -r --features opa-testutil --test opa -- $(tr '\n' ' ' < tests/opa.passing)
|
|
|
|
# Run the same tests using "coverage" build
|
|
cargo test -r --features "coverage"
|
|
cargo test -r --test aci --features "coverage"
|
|
cargo test -r --features "coverage,opa-testutil" --test opa -- $(tr '\n' ' ' < tests/opa.passing)
|
|
fi
|