~andrewjbeach/juju-ci-tools/make-local-patcher

« back to all changes in this revision

Viewing changes to run-unit-tests

  • Committer: Aaron Bentley
  • Date: 2016-05-25 16:12:07 UTC
  • mto: This revision was merged to the branch mainline in revision 1447.
  • Revision ID: aaron.bentley@canonical.com-20160525161207-h5z5uev3jkyewvxt
Update tests to use applications, not services.

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
 
71
71
if [[ $IS_LOCAL == "false" ]]; then
72
72
    # Download the buildvars and tartfile and lean the tarfile name.
73
 
    downloaded=$(
74
 
        $SCRIPTS/jujuci.py get -b $REVISION_BUILD build-revision '*' ./)
75
 
    tarfile=$(basename $(echo "$downloaded" | grep -F tar.gz))
76
 
    $SCRIPTS/jujuci.py get-build-vars \
77
 
        --summary --env $AMI_IMAGE $REVISION_BUILD
 
73
    tarfile=$(
 
74
        $SCRIPTS/s3ci.py get --config $JUJU_HOME/juju-qa.s3cfg \
 
75
        $REVISION_BUILD build-revision '.*.tar.gz' ./)
 
76
    $SCRIPTS/s3ci.py get-summary --config $JUJU_HOME/juju-qa.s3cfg \
 
77
        $REVISION_BUILD $AMI_IMAGE
78
78
fi
79
79
tarfile_path=$(readlink -f $tarfile)
80
80
tarfile_basename=$(basename $tarfile)
136
136
ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" \
137
137
    ubuntu@$instance_name  <<EOT
138
138
set -eux
 
139
if  [[ -L /tmp ]]; then
 
140
    export TMPDIR=\$(readlink -f /tmp)
 
141
fi
139
142
if [[ ! -f ~/.ssh/id_rsa ]]; then
140
143
    ssh-keygen -t rsa -b 2048 -N "" -f ~/.ssh/id_rsa
141
144
fi
190
193
if ! grep 'Angsty Antelope' $LOG_FILE_PATH ; then
191
194
  echo "$LOG_TXT" | sudo tee -a $LOG_FILE_PATH
192
195
fi
 
196
# Delay Xenial LTS birthday by one month.
 
197
sudo sed -i -e 's,2016-04-21,2016-05-21,' $LOG_FILE_PATH
193
198
 
194
199
if [[ $INSTANCE_TYPE == "host" ]]; then
195
200
    echo "Cleaning up /tmp if it is dirty."
202
207
    sudo rm -rf /tmp/test-* || true
203
208
fi
204
209
 
 
210
make setup-lxd || true
 
211
 
205
212
go test -i ./...
206
213
if [[ "$RETRY" == "true" ]]; then
207
214
    $GOTESTCMD ./... || $GOTESTCMD ./...
236
243
    sudo killall -SIGABRT /usr/bin/mongod || true
237
244
    sudo killall -SIGABRT /usr/lib/juju/bin/mongod || true
238
245
    rm -rf /home/ubuntu/$juju_version
239
 
    rm -rf /tmp/adduser-*
240
 
    rm -rf /tmp/go-*
241
 
    rm -rf /tmp/gocheck-*
242
 
    rm -rf /tmp/juju-*
243
 
    rm -rf /tmp/test-*
 
246
    rm -rf /tmp/adduser-* || true
 
247
    rm -rf /tmp/go-* || true
 
248
    rm -rf /tmp/gocheck-* || true
 
249
    rm -rf /tmp/gui-* || true
 
250
    rm -rf /tmp/pprof-* || true
 
251
    rm -rf /tmp/juju-* || true
 
252
    rm -rf /tmp/test-* || true
 
253
    rm -rf /tmp/gui-* || true
244
254
EOT
245
255
else
246
256
    set +e