Change the way to download test data.
This PR changes the way to download the test data into the VM. Although it does not use a disk image as suggested in one of the review, it does not clone the entire repository, but a simple tar.gz file that holds the data which will be distributed into the directory structure. This way, the amount of data needed to be downloaded dropped from approximately 50MB to below 2MB. Also, the existing test suites were adapted to this situation.
32
lib/utils.pm
@ -1509,17 +1509,31 @@ sub check_and_install_git {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# This routine is used in Desktop test suites. It downloads the test data from
|
# This routine is used in Desktop test suites. It downloads the test data from
|
||||||
# the repository and puts the file into correct locations.
|
# the repository and populates the directory structure.
|
||||||
|
# The data repository is located at https://pagure.io/fedora-qa/openqa_testdata.
|
||||||
|
|
||||||
sub download_testdata {
|
sub download_testdata {
|
||||||
my ($repodir, $location) = @_;
|
# Navigate to the user's home directory
|
||||||
# Navigate to the test's home directory
|
my $user = get_var("USER_LOGIN") // "test";
|
||||||
assert_script_run("cd /home/test/");
|
assert_script_run("cd /home/$user/");
|
||||||
# Clone the test repository;
|
# Create a temporary directory to unpack the zipped file.
|
||||||
assert_script_run("git clone https://pagure.io/fedora-qa/openqa_testdata.git");
|
assert_script_run("mkdir temp");
|
||||||
# Copy the test data into $repodir to $location.
|
assert_script_run("cd temp");
|
||||||
assert_script_run("cp openqa_testdata/$repodir/* $location");
|
# Download the compressed file with the repository content.
|
||||||
|
assert_script_run("wget https://pagure.io/fedora-qa/openqa_testdata/blob/thetree/f/repository.tar.gz", timeout => 120);
|
||||||
|
# Untar it.
|
||||||
|
assert_script_run("tar -zxvf repository.tar.gz");
|
||||||
|
# Copy out the files into the VMs directory 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/");
|
||||||
|
# Delete the temporary directory and the downloaded file.
|
||||||
|
assert_script_run("cd");
|
||||||
|
assert_script_run("rm -rf /home/$user/temp");
|
||||||
# Change ownership
|
# Change ownership
|
||||||
assert_script_run("chown -R test:test $location");
|
assert_script_run("chown -R test:test /home/$user/");
|
||||||
}
|
}
|
||||||
|
|
||||||
# On Fedora, the serial console is not writable for regular users which lames
|
# On Fedora, the serial console is not writable for regular users which lames
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"area": [
|
"area": [
|
||||||
{
|
{
|
||||||
"height": 15,
|
|
||||||
"type": "match",
|
"type": "match",
|
||||||
|
"height": 15,
|
||||||
"width": 71,
|
"width": 71,
|
||||||
"xpos": 330,
|
"xpos": 188,
|
||||||
"ypos": 157
|
"ypos": 182
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"properties": [],
|
"properties": [],
|
||||||
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 36 KiB |
@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"area": [
|
"area": [
|
||||||
{
|
{
|
||||||
"width": 71,
|
"xpos": 14,
|
||||||
|
"ypos": 6,
|
||||||
"type": "match",
|
"type": "match",
|
||||||
"ypos": 7,
|
"width": 71,
|
||||||
"height": 91,
|
"height": 91
|
||||||
"xpos": 14
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"properties": [],
|
"properties": [],
|
||||||
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 417 KiB |
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"area": [
|
"area": [
|
||||||
{
|
{
|
||||||
"xpos": 515,
|
"ypos": 470,
|
||||||
"ypos": 469,
|
"xpos": 521,
|
||||||
"width": 183,
|
"width": 183,
|
||||||
"height": 117,
|
"height": 117,
|
||||||
"type": "match"
|
"type": "match"
|
||||||
|
Before Width: | Height: | Size: 652 KiB After Width: | Height: | Size: 320 KiB |
@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"area": [
|
"area": [
|
||||||
{
|
{
|
||||||
"xpos": 403,
|
"type": "match",
|
||||||
"ypos": 355,
|
|
||||||
"width": 155,
|
|
||||||
"height": 95,
|
"height": 95,
|
||||||
"type": "match"
|
"width": 155,
|
||||||
|
"xpos": 408,
|
||||||
|
"ypos": 355
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"properties": [],
|
"properties": [],
|
||||||
|
Before Width: | Height: | Size: 822 KiB After Width: | Height: | Size: 586 KiB |
@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"area": [
|
"area": [
|
||||||
{
|
{
|
||||||
"xpos": 816,
|
"type": "match",
|
||||||
"ypos": 91,
|
|
||||||
"width": 205,
|
"width": 205,
|
||||||
"height": 285,
|
"height": 285,
|
||||||
"type": "match"
|
"xpos": 819,
|
||||||
|
"ypos": 91
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"properties": [],
|
"properties": [],
|
||||||
|
Before Width: | Height: | Size: 652 KiB After Width: | Height: | Size: 321 KiB |
@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"area": [
|
"area": [
|
||||||
{
|
{
|
||||||
"xpos": 475,
|
|
||||||
"ypos": 47,
|
|
||||||
"width": 75,
|
"width": 75,
|
||||||
"height": 21,
|
"height": 21,
|
||||||
"type": "match"
|
"type": "match",
|
||||||
|
"ypos": 47,
|
||||||
|
"xpos": 475
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"properties": [],
|
"properties": [],
|
||||||
|
Before Width: | Height: | Size: 652 KiB After Width: | Height: | Size: 320 KiB |
@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"area": [
|
"area": [
|
||||||
{
|
{
|
||||||
"xpos": 793,
|
|
||||||
"ypos": 93,
|
|
||||||
"width": 162,
|
"width": 162,
|
||||||
"height": 22,
|
"height": 22,
|
||||||
"type": "match"
|
"type": "match",
|
||||||
|
"ypos": 93,
|
||||||
|
"xpos": 797
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"properties": [],
|
"properties": [],
|
||||||
|
Before Width: | Height: | Size: 653 KiB After Width: | Height: | Size: 320 KiB |
15
needles/gnome/apps/gnome-text-editor/gte_txt_file.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"area": [
|
||||||
|
{
|
||||||
|
"xpos": 200,
|
||||||
|
"ypos": 180,
|
||||||
|
"type": "match",
|
||||||
|
"width": 66,
|
||||||
|
"height": 20
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"properties": [],
|
||||||
|
"tags": [
|
||||||
|
"gte_txt_file"
|
||||||
|
]
|
||||||
|
}
|
BIN
needles/gnome/apps/gnome-text-editor/gte_txt_file.png
Normal file
After Width: | Height: | Size: 249 KiB |
@ -13,7 +13,7 @@ sub run {
|
|||||||
# Perform git test
|
# Perform git test
|
||||||
check_and_install_git();
|
check_and_install_git();
|
||||||
# Download the test data
|
# Download the test data
|
||||||
download_testdata("eog", "Pictures");
|
download_testdata();
|
||||||
# Exit the terminal
|
# Exit the terminal
|
||||||
desktop_vt;
|
desktop_vt;
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ sub run {
|
|||||||
assert_script_run("ls /home/test/Pictures/");
|
assert_script_run("ls /home/test/Pictures/");
|
||||||
|
|
||||||
# Compare the files
|
# Compare the files
|
||||||
assert_script_run("diff /home/test/Pictures/image.jpg /home/test/Pictures/new_image.jpg");
|
assert_script_run("diff /home/test/Pictures/leaves.jpg /home/test/Pictures/new_image.jpg");
|
||||||
}
|
}
|
||||||
|
|
||||||
sub test_flags {
|
sub test_flags {
|
||||||
|
@ -14,7 +14,7 @@ sub run {
|
|||||||
# Perform git test
|
# Perform git test
|
||||||
check_and_install_git();
|
check_and_install_git();
|
||||||
# Download the test data
|
# Download the test data
|
||||||
download_testdata("evince", "Documents");
|
download_testdata();
|
||||||
# Exit the terminal
|
# Exit the terminal
|
||||||
desktop_vt;
|
desktop_vt;
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ sub run {
|
|||||||
|
|
||||||
# Get the test data from the test data repository.
|
# Get the test data from the test data repository.
|
||||||
check_and_install_git();
|
check_and_install_git();
|
||||||
download_testdata("gnome-text-editor", "Documents");
|
download_testdata();
|
||||||
# Remove gedit on upgraded systems so we don't launch it by accident
|
# Remove gedit on upgraded systems so we don't launch it by accident
|
||||||
script_run("dnf -y remove gedit") if (get_var("IMAGETYPE") eq "upgrade");
|
script_run("dnf -y remove gedit") if (get_var("IMAGETYPE") eq "upgrade");
|
||||||
# Return to Desktop
|
# Return to Desktop
|
||||||
|