767.1.5
by Aaron Bentley
Fix hashbang. |
1 |
#!/bin/bash
|
767.1.3
by Aaron Bentley
Stop echoing var assignment. |
2 |
set -eu
|
767.1.2
by Aaron Bentley
Reduce repetition, add hashbang and eux. |
3 |
: ${SCRIPTS=$(readlink -f $(dirname $0))} |
869.1.1
by Aaron Bentley
Add --old-stable parameter to run-reliability-test. |
4 |
old_stable_juju=$(find $old_stable_juju_dir -name juju) |
5 |
||
767.1.1
by Aaron Bentley
Verbatim copy of run-reliability-test.bash from job. |
6 |
export JUJU_HOME=$HOME/cloud-city |
7 |
build_id=${JOB_NAME}-${BUILD_NUMBER} |
|
767.1.2
by Aaron Bentley
Reduce repetition, add hashbang and eux. |
8 |
s3cfg=$JUJU_HOME/juju-qa.s3cfg |
9 |
s3base=s3://juju-qa-data/industrial-test/${build_id} |
|
1302.1.3
by Aaron Bentley
Support running industrial tests by revision-build. |
10 |
if [ "${new_agent_url-}" != "" ]; then |
767.1.1
by Aaron Bentley
Verbatim copy of run-reliability-test.bash from job. |
11 |
extra_args="--new-agent-url $new_agent_url" |
12 |
else
|
|
13 |
extra_args="" |
|
14 |
fi
|
|
767.1.3
by Aaron Bentley
Stop echoing var assignment. |
15 |
set -x
|
878.1.1
by Aaron Bentley
Delete all files in before running industrial-test. |
16 |
# Delete all files in $WORKSPACE, but no error if empty.
|
1219.1.1
by Aaron Bentley
Update run-reliability-test to supply log directory. |
17 |
find $WORKSPACE -mindepth 1 -delete |
1302.1.3
by Aaron Bentley
Support running industrial tests by revision-build. |
18 |
if [ "${revision_build-}" != "" ]; then |
19 |
extra_args="$extra_args --agent-stream revision-build-$revision_build" |
|
20 |
new_juju=$($SCRIPTS/s3ci.py get-juju-bin $revision_build $WORKSPACE) |
|
21 |
$SCRIPTS/s3ci.py get $revision_build build-revision buildvars.json $WORKSPACE |
|
22 |
buildvars=$WORKSPACE/buildvars.json |
|
23 |
else
|
|
24 |
new_juju=$(find $new_juju_dir -name juju) |
|
25 |
buildvars=$new_juju_dir/buildvars.json |
|
26 |
fi
|
|
1381.1.1
by Aaron Bentley
Hack: allow industrial test to use "new" client as baseline. |
27 |
if [ "${both_new-}" == "true" ]; then |
28 |
export PATH=$(dirname $new_juju):$PATH |
|
29 |
fi
|
|
1219.1.1
by Aaron Bentley
Update run-reliability-test to supply log directory. |
30 |
logs=$WORKSPACE/logs |
31 |
mkdir $logs
|
|
1302.1.3
by Aaron Bentley
Support running industrial tests by revision-build. |
32 |
$SCRIPTS/write_industrial_test_metadata.py $buildvars $environment \ |
33 |
metadata.json |
|
767.1.3
by Aaron Bentley
Stop echoing var assignment. |
34 |
s3cmd -c $s3cfg put metadata.json $s3base-metadata.json |
1577
by Aaron Bentley
Increase industrial test timeout to 2 days. |
35 |
timeout -sINT -k 10m 2d $SCRIPTS/industrial_test.py $environment $new_juju \ |
1224
by Aaron Bentley
Flip argument order for industrial tests. |
36 |
--old-stable $old_stable_juju $suite $logs --attempts $attempts \ |
869.1.1
by Aaron Bentley
Add --old-stable parameter to run-reliability-test. |
37 |
--json-file results.json $extra_args
|
767.1.2
by Aaron Bentley
Reduce repetition, add hashbang and eux. |
38 |
s3cmd -c $s3cfg put results.json $s3base-results.json |