-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.sh
executable file
·51 lines (42 loc) · 936 Bytes
/
build.sh
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
#!/bin/bash
echo_service_message()
{
sleep 0.1
echo "##teamcity[$@]" 1>&2
}
record_event()
{
local message=$(echo "$1" | sed -e "s/|/||/g; s/'/|'/g")
echo_service_message message text="'${message}'"
}
begin_section()
{
echo_service_message blockOpened name="'$1'"
}
end_section()
{
echo_service_message blockClosed name="'$1'"
}
set -e
case "$arch" in
CYGWIN)
# this ensures we use the Windows Python
nosetests="nosetests.exe"
;;
*)
nosetests="nosetests"
;;
esac
begin_section "Self Test"
# ensure AUTOBUILD is in native path form for child processes
export AUTOBUILD="$(native_path "$AUTOBUILD")"
if $nosetests -v
then
echo_service_message buildStatus text="'Self Test Passed'" status="'SUCCESS'"
ExitStatus=0
else
echo_service_message buildStatus text="'Self Test Failed'" status="'FAILURE'"
ExitStatus=1
fi
end_section "Self Test"
exit $ExitStatus