forked from Normation/rudder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqa-test
executable file
·38 lines (32 loc) · 1.28 KB
/
qa-test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
set -ex
##################
### Slow tests ###
##################
if [ "$1" = "--relayd" ]; then
cd relay/sources && make check
exit 0
elif [ "$1" = "--language" ]; then
cd rudder-lang && make test
exit 0
elif [ "$1" = "--scala" ]; then
cd webapp/sources && mvn clean install -Dmaven.test.postgres=false
exit 0
fi
###################
### Quick tests ###
###################
webapp/sources/rudder/rudder-core/src/test/resources/hooks.d/test-hooks.sh
# Python linter
export PYTHONPATH=./relay/sources/rudder-pkg/lib/rudder-pkg/:./relay/sources/rudder-pkg/lib:$PYTHONPATH
find . ! -name 'convertOpenLDAPSchema.py' ! -wholename '*jsondiff/*' -name '*.py' | xargs pylint -E --persistent=n --disable=C,R,import-error,no-member,no-name-in-module
pylint -E --persistent=n --disable=C,R,no-member relay/sources/rudder-pkg/rudder-pkg
# Rudder-pkg check
cd relay/sources/rudder-pkg/lib/rudder-pkg/tests && ./testall && cd -
# Shellcheck
find . \( -path ./.git -prune -o -path ./rudder-lang/target -prune -o -path ./relay/sources/relayd/target -prune \) -o -type f -exec grep -Eq '^#!(.*/|.*env +)(sh|bash|ksh)' {} \; -print |
while IFS="" read -r file
do
# with recent shellcheck, "-S error" replaces this hack
shellcheck -f gcc "$file" | grep " error: " && exit 1 || true
done