@@ -24,6 +24,7 @@ declare -A config_directories=(
24
24
)
25
25
26
26
tempest_dir=" $HOME /tempest-artifacts"
27
+ sot_results_dir=" $HOME /sot-results"
27
28
lock_path=/tmp/deploy-openstack.lock
28
29
rc_path=/tmp/deploy-openstack.rc
29
30
194
195
# Wait for Kayobe Tempest pipeline to complete to ensure artifacts exist.
195
196
sudo docker container wait kayobe_tempest
196
197
197
- if [[ ! -f $tempest_dir /failed-tests ]]; then
198
- echo " Unable to find Tempest test results in $tempest_dir /failed-tests"
199
- exit 1
198
+ activate_virt_env " kayobe"
199
+ activate_kayobe_env
200
+
201
+ if [[ -d $sot_results_dir ]]; then
202
+ sot_results_backup=$$ {sot_results_dir}.$( date --iso-8601=minutes)
203
+ echo " Found previous StackHPC OpenStack test results"
204
+ echo " Moving to $sot_results_backup "
205
+ mv $sot_results_dir $sot_results_backup
200
206
fi
201
207
202
- if [[ $( wc -l < $tempest_dir /failed-tests) -ne 0 ]]; then
208
+ # Run StackHPC OpenStack tests
209
+ kayobe playbook run $KAYOBE_CONFIG_PATH /ansible/stackhpc-openstack-tests.yml
210
+
211
+ rc=0
212
+ echo " Tempest test results are available in $tempest_dir "
213
+ if [[ ! -f $tempest_dir /failed-tests ]]; then
214
+ echo " Unable to find Tempest test results in $tempest_dir /failed-tests"
215
+ rc=1
216
+ elif [[ $( wc -l < $tempest_dir /failed-tests) -ne 0 ]]; then
203
217
echo " Some Tempest tests failed"
204
- exit 1
218
+ rc=1
219
+ else
220
+ echo " Tempest testing successful"
205
221
fi
206
222
207
- echo " Tempest testing successful"
223
+ echo " StackHPC OpenStack test results are available in $sot_results_dir "
224
+ if [[ ! -f $sot_results_dir /failed-tests ]]; then
225
+ echo " Unable to find StackHPC OpenStack test results in $sot_results_dir /failed-tests"
226
+ rc=1
227
+ elif [[ $( wc -l < $sot_results_dir /failed-tests) -ne 0 ]]; then
228
+ echo " Some StackHPC OpenStack tests failed"
229
+ rc=1
230
+ else
231
+ echo " StackHPC OpenStack testing successful"
232
+ fi
208
233
209
234
# Report success.
210
- echo 0 > $rc_path
235
+ echo " Writing result to $rc_path "
236
+ echo $rc > $rc_path
0 commit comments