summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Raiskup <praiskup@redhat.com>2014-10-20 15:03:26 +0200
committerPavel Raiskup <praiskup@redhat.com>2014-10-20 15:30:45 +0200
commitfa94bd10b74748c87272edbc7d93abc335949e94 (patch)
treefe4a6649a14314e806725b4d0079e5279d014bf8
parent42ab13ada931882e9aab25085aed98bb76f970e6 (diff)
downloadpostgresql-setup-tests-fa94bd10b74748c87272edbc7d93abc335949e94.tar.gz
postgresql-setup-tests-fa94bd10b74748c87272edbc7d93abc335949e94.tar.xz
postgresql-setup-tests-fa94bd10b74748c87272edbc7d93abc335949e94.zip
run_remote: allow installing not-yet-stable packages
For that purpose you may use '--extra-rpms-file FILE' option where the file contains list of rpms to be installed. The RPMs should be defined like accessible URLs from testing machine. Also, export the overall log file as dtf-run.overview. * run_remote: Add new option --extra-rpms-file. * ansible/fedora.yml: Include conditionally the additional-packages playbook. Generate the dtf-run.overview. * ansible/include/additional-packages.yml: New playbook used to install explicit list of additional packages. * ansible/include/download-results.yml: Fix to download also dtf-run.overview file.
-rw-r--r--ansible/fedora.yml5
-rw-r--r--ansible/include/additional-packages.yml6
-rw-r--r--ansible/include/download-results.yml2
-rwxr-xr-xrun_remote9
4 files changed, 20 insertions, 2 deletions
diff --git a/ansible/fedora.yml b/ansible/fedora.yml
index d96ef90..5f9eba8 100644
--- a/ansible/fedora.yml
+++ b/ansible/fedora.yml
@@ -50,9 +50,12 @@
- include: include/prepare-testenv.yml
+ - include: include/additional-packages.yml
+ when: dtf_rpm_files_list is defined
+
- shell: cd /root && tar -xf postgresql-setup-tests.tar.gz
- - shell: cd /root/postgresql-setup-tests && ./run
+ - shell: cd /root/postgresql-setup-tests && ./run &>/var/tmp/dtf-run.overview
register: test_result
ignore_errors: yes
diff --git a/ansible/include/additional-packages.yml b/ansible/include/additional-packages.yml
new file mode 100644
index 0000000..f821255
--- /dev/null
+++ b/ansible/include/additional-packages.yml
@@ -0,0 +1,6 @@
+- local_action: shell cat "{{ dtf_rpm_files_list }}" | xargs -n 100
+ register: additional_packages
+
+- debug: msg="{{ additional_packages.stdout }}"
+
+- shell: yum install -y {{ additional_packages.stdout }}
diff --git a/ansible/include/download-results.yml b/ansible/include/download-results.yml
index e3a551d..74b35b8 100644
--- a/ansible/include/download-results.yml
+++ b/ansible/include/download-results.yml
@@ -1,3 +1,5 @@
+- shell: cp -f /var/tmp/dtf-run.overview /var/tmp/dtf/
+
- shell: cd /var/tmp ; tar -czf dtf.tar.gz dtf
- fetch: src=/var/tmp/dtf.tar.gz dest="{{ opt_tmp_resultdir }}/" flat=yes
diff --git a/run_remote b/run_remote
index 47aaeb4..39e45dd 100755
--- a/run_remote
+++ b/run_remote
@@ -8,10 +8,11 @@ opt_workdir=/var/tmp/dbt-results
opt_distro=fedora
opt_openstack_instance=dropbear
opt_distro_ver=20
+opt_extra_rpms=
die() { echo >&2 "$@" ; exit 1 ; }
-longopts="distro:,distro-version:,workdir:,openstack-instance:"
+longopts="distro:,distro-version:,workdir:,openstack-instance:,extra-rpms-file:"
ARGS=$(getopt -o "v" -l "$longopts" -n "getopt" -- "$@") \
|| exit 1
eval set -- "$ARGS"
@@ -38,6 +39,11 @@ while true; do
shift 2
;;
+ --extra-rpms-file)
+ opt_extra_rpms="$(readlink -f "$2")"
+ shift 2
+ ;;
+
--)
shift
break
@@ -66,3 +72,4 @@ ansible-playbook "$run_playbook" \
--extra-vars "os_keypair=${os_keypair}" \
--extra-vars "os_security_group=${os_security_group}" \
--extra-vars "os_network_dev=${os_network_dev}" \
+ --extra-vars "${opt_extra_rpms:+dtf_rpm_files_list=$opt_extra_rpms}"