rust/ci/build_and_test.sh
Yacin Tmimi b3d4fb448c Allow #[ignore] tests to run in rustfmt's test suite
There are some tests in the rustfmt test suite that are ignored by
default. I believe these tests are ignored because they have caused
issues with the the `rust-lang/rust` test suite.

However, we recently experienced an issue (5395) that would have been
avoided had these tests been running.

With the introduction of the new `#[rustfmt_only_ci_test]` attribute
macro we can run these tests when the `RUSTFMT_CI` environment variable
is set, which will presumably only be set during rustfmts CI runs.
When the environment variable is not set the `#[rustfmt_only_ci_test]`
will be replaced with an `#[ignore]`.
2022-06-29 18:55:02 -05:00

20 lines
276 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
export RUSTFLAGS="-D warnings"
export RUSTFMT_CI=1
# Print version information
rustc -Vv
cargo -V
# Build and test main crate
cargo build --locked
cargo test
# Build and test other crates
cd config_proc_macro
cargo build --locked
cargo test