-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathrun_tests
executable file
·56 lines (42 loc) · 964 Bytes
/
run_tests
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
set -euo pipefail
pkgs=(
mkcert
go-task-bin
atlassian-plugin-sdk
)
programs=(
task
atlas-mvn
)
basedir="$(readlink -f "$(dirname "$0")")"
broken=false
for pkg in "${pkgs}"; do
if ! pacman -Q $pkg >/dev/null; then
echo "$pkg package is not installed" >&2
broken=true
fi
done
if $broken; then
echo "Please install the missing packages" >&2
exit 1
fi
for program in "${programs}"; do
if ! command -v $program >/dev/null; then
echo "$program is not in PATH" >&2
broken=true
fi
done
if $broken; then
echo "Please fix the PATH to find required programs" >&2
exit 1
fi
cd $basedir/integration_tests
go build -o external-hooks-test -v ./
cd $basedir
if [[ ! -d target ]]; then
task atlas:package
fi
export PATH=/opt/atlassian/plugin-sdk/bin:/home/operator/deadfiles/bin:$HOME/go/bin:$PATH
runner=$basedir/integration_tests/external-hooks-test
$runner "${@}"