From de64a2fe2482d4c6c31ce7c632edf422f32e68b1 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 17 Sep 2020 08:09:49 +0300 Subject: test: add script to run automated tests --- check | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 check (limited to 'check') diff --git a/check b/check new file mode 100755 index 0000000..29032dc --- /dev/null +++ b/check @@ -0,0 +1,28 @@ +#!/bin/sh +# +# Run the automated tests for the project. + +set -eu + +quiet=-q +hideok=chronic +if [ "$#" -gt 0 ] +then + case "$1" in + verbose | -v | --verbose) + quiet= + hideok= + ;; + esac +fi + +cargo build --all-targets $quiet +cargo clippy $quiet +$hideok cargo test $quiet + +if command -v rustfmt > /dev/null +then + find src -type f -name '*.rs' -exec rustfmt --check '{}' + +fi + +echo "Everything seems to be in order." -- cgit v1.2.1