forked from SeasideSt/Grease
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestTravisCI.sh
More file actions
executable file
·66 lines (58 loc) · 1.82 KB
/
testTravisCI.sh
File metadata and controls
executable file
·66 lines (58 loc) · 1.82 KB
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
57
58
59
60
61
62
63
64
65
66
#!/bin/bash -x
#
# Sample test driver that allows for customizing build/tests based on env vars defined in .travis.yml
#
# -verbose flag causes unconditional transcript display
#
# Copyright (c) 2013 VMware, Inc. All Rights Reserved <dhenrich@vmware.com>.
#
echo "--->$TRAVIS_BUILD_DIR"
echo "`pwd`"
if [ "${CONFIGURATION}x" = "x" ]; then
if [ "${BASELINE}x" = "x" ]; then
echo "Must specify either BASELINE or CONFIGURATION"
exit 1
else
PROJECT_LINE=" baseline: '${BASELINE}';"
VERSION_LINE=""
FULL_CONFIG_NAME="BaselineOf${BASELINE}"
fi
else
PROJECT_LINE=" configuration: '${CONFIGURATION}';"
VERSION_LINE=" version: '$VERSION';"
FULL_CONFIG_NAME="ConfigurationOf${CONFIGURATION}"
fi
if [ "${REPOSITORY}x" = "x" ]; then
echo "Must specify REPOSITORY"
exit 1
fi
REPOSITORY_LINE=" repository: '$REPOSITORY';"
OUTPUT_PATH="${PROJECT_HOME}/tests/travisCI.st"
cat - >> $OUTPUT_PATH << EOF
(Smalltalk includesKey: #UserGlobals) ifTrue:[
"Load latest GLASS1 when on Gemstone"
[ Metacello new
baseline: 'GLASS1';
repository: 'github://glassdb/glass:master/repository';
load.
] on: Warning
do:[:ex | Transcript show: ex greaseString. ex resume].
].
Transcript cr; show: 'travis--->${OUTPUT_PATH}'.
"Load the configuration or baseline"
Metacello new
$PROJECT_LINE
$VERSION_LINE
$REPOSITORY_LINE
load: #( ${LOADS} ).
"Run the tests"
Smalltalk at: #Author ifPresent:[:author | author fullName: 'Travis'].
((Smalltalk includesKey: #Utilities) and:[(Smalltalk at: #Utilities) respondsTo: #setAuthorInitials:]) ifTrue:[(Smalltalk at: #Utilities) setAuthorInitials: 'TCI'].
TravisCIHarness
value: #( '${FULL_CONFIG_NAME}' )
value: 'TravisCISuccess.txt'
value: 'TravisCIFailure.txt'.
EOF
cat $OUTPUT_PATH
$BUILDER_CI_HOME/testTravisCI.sh "$@"
if [[ $? != 0 ]] ; then exit 1; fi