From 0213237b8c918984a66a43ffe66f2f0bd77d8632 Mon Sep 17 00:00:00 2001 From: Jakub Kadlčík Date: Jun 11 2019 12:33:51 +0000 Subject: [beaker-tests-sanity] create helpers file --- diff --git a/beaker-tests/Sanity/copr-cli-basic-operations/helpers b/beaker-tests/Sanity/copr-cli-basic-operations/helpers new file mode 100644 index 0000000..ecf7b5a --- /dev/null +++ b/beaker-tests/Sanity/copr-cli-basic-operations/helpers @@ -0,0 +1,12 @@ +#!/bin/sh + +HELLO=https://frostyx.fedorapeople.org/hello-2.8-1.fc23.src.rpm +EVIL_HELLO=https://frostyx.fedorapeople.org/evilhello-2.8-1.fc28.src.rpm + +parse_build_id() +{ + local id + id=$(grep 'Created builds:' "$rlRun_LOG" | sed 's/.* //') + test -n "$id" || return 1 + export BUILD_ID=$id +} diff --git a/beaker-tests/Sanity/copr-cli-basic-operations/runtest-custom-method.sh b/beaker-tests/Sanity/copr-cli-basic-operations/runtest-custom-method.sh index a89d3fc..2cd865b 100755 --- a/beaker-tests/Sanity/copr-cli-basic-operations/runtest-custom-method.sh +++ b/beaker-tests/Sanity/copr-cli-basic-operations/runtest-custom-method.sh @@ -6,16 +6,10 @@ # Load config settings HERE=$(dirname "$(realpath "$0")") source "$HERE/config" +source "$HERE/helpers" export RESULTDIR=`mktemp -d` -parse_build_id() -{ - local id - id=$(grep 'Created builds:' "$rlRun_LOG" | sed 's/.* //') - test -n "$id" || return 1 - export BUILD_ID=$id -} cleanup_resultdir () ( diff --git a/beaker-tests/Sanity/copr-cli-basic-operations/runtest-epel.sh b/beaker-tests/Sanity/copr-cli-basic-operations/runtest-epel.sh index 415a7f0..937818a 100755 --- a/beaker-tests/Sanity/copr-cli-basic-operations/runtest-epel.sh +++ b/beaker-tests/Sanity/copr-cli-basic-operations/runtest-epel.sh @@ -7,8 +7,7 @@ # Load config settings HERE=$(dirname "$(realpath "$0")") source "$HERE/config" - -HELLO=https://frostyx.fedorapeople.org/hello-2.8-1.fc23.src.rpm +source "$HERE/helpers" rlJournalStart diff --git a/beaker-tests/Sanity/copr-cli-basic-operations/runtest.sh b/beaker-tests/Sanity/copr-cli-basic-operations/runtest.sh index 2b4ef62..e0fdf07 100755 --- a/beaker-tests/Sanity/copr-cli-basic-operations/runtest.sh +++ b/beaker-tests/Sanity/copr-cli-basic-operations/runtest.sh @@ -32,9 +32,7 @@ # Load config settings HERE=$(dirname "$(realpath "$0")") source "$HERE/config" - -HELLO=https://frostyx.fedorapeople.org/hello-2.8-1.fc23.src.rpm -EVIL_HELLO=https://frostyx.fedorapeople.org/evilhello-2.8-1.fc28.src.rpm +source "$HERE/helpers" rlJournalStart