aboutsummaryrefslogtreecommitdiff
path: root/test/run.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/run.sh')
-rwxr-xr-xtest/run.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/run.sh b/test/run.sh
new file mode 100755
index 0000000..66ebde0
--- /dev/null
+++ b/test/run.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+set -e
+
+usage() {
+ cat <<USAGE
+Usage: $0 [pattern] [args...]
+Examples
+$0 pyls
+$0 "pyls|kotlin"
+$0 bash start
+USAGE
+}
+
+if [ $# == 0 ]; then
+ usage
+ exit 1
+fi
+
+test_installer() {
+ set -e
+ "./installer/install-$1.sh"
+ ./test/send.py | "./servers/$1/$1" $2
+ ret="$?"
+ printf "\n\nresult=%s" $ret
+}
+export -f test_installer
+
+jq ".[][].command" -r -c <./settings.json | sort | uniq |
+ grep -E "$1" |
+ xargs -I% bash -c "test_installer % $2"