From af9669acd09f3307308556757bb8fcac1d176893 Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Sun, 1 Jul 2018 00:55:57 +0300 Subject: [PATCH] Add a bash script to run the test-suite. --- scripts/test.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 scripts/test.sh diff --git a/scripts/test.sh b/scripts/test.sh new file mode 100755 index 0000000..25d1a40 --- /dev/null +++ b/scripts/test.sh @@ -0,0 +1,26 @@ +#!/usr/bin/sh + +file="/.flatpak-info" +if [ -f "$file" ] +then + # If you open a build terminal with gnome-builder + source /usr/lib/sdk/rust-stable/enable.sh + export CARGO_HOME=target/cargo-home/ +fi + +export RUSTFLAGS="--cfg rayon_unstable" +export RUSTBACKTRACE="1" + +rustc --version +cargo --version +# cargo fmt --version + +cargo build --all && \ +cargo test -- --test-threads=1 && \ +cargo test -- --test-threads=1 --ignored + +# Rustfmt from the flatpak bundle tends to be outdated, +# will probably get better when rustfmt stabilizes +# cargo fmt --all -- --write-mode=diff + +# cargo bench large