-
-
Notifications
You must be signed in to change notification settings - Fork 44
/
test
executable file
·45 lines (39 loc) · 1.1 KB
/
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
40
41
42
43
44
45
#!/usr/bin/env bash
FAILURES=0
apply() {
sudo BUNDLE_GEMFILE="$GEMFILE" FUTURE_PARSER="$FUTURE_PARSER" bundle exec \
puppet apply --detailed-exitcodes --debug "$@" || [ $? -eq 2 ]
FAILURES=$((FAILURES + $?))
}
check() {
"$@"
FAILURES=$((FAILURES + $?))
}
if [ "${CIRCLE_NODE_INDEX}" = "0" ]; then
echo 'Apply init.pp...'
apply tests/init.pp
check which brew
elif [ "${CIRCLE_NODE_INDEX}" = "1" ]; then
echo 'Test apply token.pp...'
apply tests/token.pp
check cat /etc/environment | grep HOMEBREW_GITHUB_API_TOKEN
else
echo 'Apply install_options.pp...'
apply tests/install_options.pp
check which ack
echo 'Apply packages.pp...'
apply tests/packages.pp
check stat /Applications/clementine.app/Contents/MacOS/clementine
check which git
check stat "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
check which bzr
echo 'Apply tap.pp...'
apply tests/tap.pp
check which gc2qif
echo 'Apply tap_priority.pp...'
apply tests/tap_priority.pp
check brew list ncl
fi
if [ "$FAILURES" -ne "0" ]; then
exit 1
fi