diff --git a/data/testdata.tar.gz b/data/testdata.tar.gz
new file mode 100644
index 00000000..4545a70f
Binary files /dev/null and b/data/testdata.tar.gz differ
diff --git a/lib/utils.pm b/lib/utils.pm
index 5596072f..9cdac0b5 100644
--- a/lib/utils.pm
+++ b/lib/utils.pm
@@ -1718,8 +1718,10 @@ sub check_and_install_git {
}
# This routine is used in Desktop test suites. It downloads the test data from
-# the repository and populates the directory structure.
-# The data repository is located at https://pagure.io/fedora-qa/openqa_testdata.
+# tarball and populates the directory structure.
+# The tarball is generated by update-data-tarball.sh from the
+# https://pagure.io/fedora-qa/openqa_testdata repository; make changes
+# there, then run the update-data-tarball.sh script and commit the result.
sub download_testdata {
# We can select which Data to copy over.
@@ -1732,20 +1734,19 @@ sub download_testdata {
assert_script_run("mkdir temp");
assert_script_run("cd temp");
# Download the compressed file with the repository content.
- assert_script_run("curl --retry-delay 10 --max-time 120 --retry 5 -o repository.tar.gz https://pagure.io/fedora-qa/openqa_testdata/blob/thetree/f/repository.tar.gz", timeout => 600);
+ assert_script_run("curl --retry-delay 10 --max-time 120 --retry 5 -O " . autoinst_url . "/data/testdata.tar.gz", timeout => 600);
# Untar it.
- assert_script_run("tar -zxvf repository.tar.gz");
+ assert_script_run("tar -zxvf testdata.tar.gz");
# Copy out the files into the VMs directory structure.
if ($data eq "structure") {
- assert_script_run("cp music/* /home/$user/Music");
- assert_script_run("cp documents/* /home/$user/Documents");
- assert_script_run("cp pictures/* /home/$user/Pictures");
- assert_script_run("cp video/* /home/$user/Videos");
- assert_script_run("cp reference/* /home/$user/");
+ assert_script_run("cp openqa_testdata/music/* /home/$user/Music");
+ assert_script_run("cp openqa_testdata/documents/* /home/$user/Documents");
+ assert_script_run("cp openqa_testdata/pictures/* /home/$user/Pictures");
+ assert_script_run("cp openqa_testdata/reference/* /home/$user/");
}
else {
assert_script_run("mkdir /home/$user/$data");
- assert_script_run("cp $data/* /home/$user/$data/");
+ assert_script_run("cp openqa_testdata/$data/* /home/$user/$data/");
}
# Delete the temporary directory and the downloaded file.
assert_script_run("cd");
diff --git a/update-data-tarball.sh b/update-data-tarball.sh
new file mode 100755
index 00000000..7ab2db20
--- /dev/null
+++ b/update-data-tarball.sh
@@ -0,0 +1,32 @@
+#!/usr/bin/bash
+
+# Copyright Red Hat
+#
+# This file is part of os-autoinst-distri-fedora.
+#
+# os-autoinst-distri-fedora is free software; you can redistribute it
+# and/or modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation, either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+# Author: Adam Williamson
+
+# This is a helper script to update the tarball of the openqa_testdata
+# repository that lives in data/ and is downloaded by the tests.
+
+WORK_DIR=$(mktemp -d)
+pushd ${WORK_DIR}
+git clone https://pagure.io/fedora-qa/openqa_testdata.git
+tar --exclude='.git' -czvf testdata.tar.gz openqa_testdata
+popd
+here=$(dirname ${0})
+mv ${WORK_DIR}/testdata.tar.gz ${here}/data
+rm -rf ${WORK_DIR}