-
Notifications
You must be signed in to change notification settings - Fork 8
/
osg-build-test
executable file
·39 lines (34 loc) · 792 Bytes
/
osg-build-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
39
#!/bin/bash
: "${PYTHON:=python3}"
if ! "${PYTHON}" -c 'import sys; sys.exit(0)'; then
echo '`'${PYTHON}'`' is not a useable Python interpreter
exit 127
fi
ret=0
ret1=
ret2=
"${PYTHON}" -m "osgbuild.test.test_osgbuild"
ret1=$?
ret=$((ret | ret1))
if command -v koji &>/dev/null; then
if [[ -d $HOME/.osg-koji ]]; then
"${PYTHON}" -m "osgbuild.test.test_osgbuild_koji"
ret2=$?
ret=$((ret | ret2))
else
echo "$HOME/.osg-koji not found; skipping koji tests."
fi
else
echo "koji binary not found; skipping koji tests."
fi
if [[ -n $ret1 ]]; then
echo "Common tests returned $ret1"
else
echo "Common tests skipped"
fi
if [[ -n $ret2 ]]; then
echo "Koji tests returned $ret2"
else
echo "Koji tests skipped."
fi
exit $ret