diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-09-17 08:09:49 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-09-17 08:09:49 +0300 |
commit | de64a2fe2482d4c6c31ce7c632edf422f32e68b1 (patch) | |
tree | e4fd1bc35cfe0b36a3ab840d7f40f893032f3f50 /check | |
parent | 266b00a00a6a245464b6a4918f98ea55fcba286b (diff) | |
download | obnam2-de64a2fe2482d4c6c31ce7c632edf422f32e68b1.tar.gz |
test: add script to run automated tests
Diffstat (limited to 'check')
-rwxr-xr-x | check | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -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." |