[tor-commits] [chutney/master] tests: Add a shellcheck test

teor at torproject.org teor at torproject.org
Fri Apr 12 02:43:09 UTC 2019


commit ef79e2143ee426eee74d322dd4140d7c076af221
Author: teor <teor at torproject.org>
Date:   Mon Apr 8 12:23:48 2019 +1000

    tests: Add a shellcheck test
    
    Part of 30065.
---
 tests/shellcheck-tests.sh | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/tests/shellcheck-tests.sh b/tests/shellcheck-tests.sh
new file mode 100755
index 0000000..02afbaa
--- /dev/null
+++ b/tests/shellcheck-tests.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# Exit on errors
+set -e
+# Verbose mode
+set -v
+
+
+# Output is prefixed with the name of the script
+myname=$(basename "$0")
+
+echo "$myname: finding chutney directory"
+TEST_DIR=$(dirname "$0")
+CHUTNEY_DIR=$(dirname "$TEST_DIR")
+
+echo "$myname: changing to chutney directory"
+cd "$CHUTNEY_DIR"
+
+
+echo "$myname: running shellcheck tests"
+
+shellcheck chutney
+find . -name "*.sh" -exec shellcheck {} +





More information about the tor-commits mailing list