Better support rustc 1.64+ by not requiring `RUSTC_BOOTSTRAP`
[dnssec-prover] / test.sh
diff --git a/test.sh b/test.sh
index 4d89ab0233fe1cfd82b8f22a16d0a31a41b4799d..b55143a235e749f0de5e0269aaceb7981668c194 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -1,6 +1,12 @@
 #!/bin/sh
 set -eox
-export RUSTC_BOOTSTRAP=1
+
+RUSTC_MINOR_VERSION=$(rustc --version | awk '{ split($2,a,"."); print a[2] }')
+if [ "$RUSTC_MINOR_VERSION" = 63 ]; then
+       export RUSTC_BOOTSTRAP=1
+       export RUSTFLAGS=--cfg=rust_1_63
+fi
+
 cargo test --no-default-features
 cargo test
 cargo test --no-default-features --features std