blob: 87d29bf1adadc202709a0d1e96dc03263cac2ccc [file] [log] [blame]
Neels Hofmeyrd46ea132017-04-08 15:56:31 +02001#!/bin/sh
2set -e -x
3
Neels Hofmeyrc59e0792017-05-14 01:57:25 +02004# remove older trial dirs and *-run.tgz, if any
5trial_dir_prefix="trial-"
6rm -rf "$trial_dir_prefix"* || true
Neels Hofmeyrd46ea132017-04-08 15:56:31 +02007
Neels Hofmeyrc59e0792017-05-14 01:57:25 +02008# Expecting *.tgz artifacts to be copied to this workspace from the various
9# jenkins-*.sh runs, via jenkins job configuration. Compose a trial dir:
10trial_dir="${trial_dir_prefix}$BUILD_NUMBER"
11mkdir -p "$trial_dir"
Neels Hofmeyrd46ea132017-04-08 15:56:31 +020012
Neels Hofmeyrc59e0792017-05-14 01:57:25 +020013mv *.tgz "$trial_dir"
14cat *.md5 >> "$trial_dir/checksums.md5"
15rm *.md5
Neels Hofmeyrd46ea132017-04-08 15:56:31 +020016
Neels Hofmeyrc59e0792017-05-14 01:57:25 +020017# OSMO_GSM_TESTER_OPTS is a way to pass in e.g. logging preferences from the
18# jenkins build job.
19python3 -u "$(which osmo-gsm-tester.py)" "$trial_dir" $OSMO_GSM_TESTER_OPTS
Neels Hofmeyrd46ea132017-04-08 15:56:31 +020020
Neels Hofmeyrc59e0792017-05-14 01:57:25 +020021# no need to keep extracted binaries
22rm -rf "$trial_dir/inst" || true
Neels Hofmeyrd46ea132017-04-08 15:56:31 +020023
Neels Hofmeyrc59e0792017-05-14 01:57:25 +020024# tar up all results for archiving (optional)
25tar czf "$trial_dir"-run.tgz "$trial_dir"