1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-12-22 02:13:08 +00:00

printing: always use ls to find PDF, update needles

When the printing_builtin test ran on an F35 respin compose it
failed; it turns out the target filename was different for the
built-in print-to-PDF on GNOME on F35. So let's just always
use the 'ls' output to find the file, but pick the directory
to check based on whether we're using cups or not.

Also rename the needles to have unique names, and add one for
F35 GNOME.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2022-02-16 17:21:36 -08:00
parent b26fa834ef
commit 5c011ab567
7 changed files with 19 additions and 8 deletions

View File

@ -0,0 +1,15 @@
{
"area": [
{
"ypos": 274,
"xpos": 206,
"height": 20,
"type": "match",
"width": 107
}
],
"properties": [],
"tags": [
"printing_use_saveas_pdf"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

Before

Width:  |  Height:  |  Size: 433 KiB

After

Width:  |  Height:  |  Size: 433 KiB

View File

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 63 KiB

View File

@ -95,14 +95,10 @@ sub run {
# Get the name of the printed file. The path location depends
# on the selected method.
# For the built-in printing method.
my $filepath = "/home/test/Documents/output.pdf";
# If we use cups-pdf, the file will be placed elsewhere.
if ($usecups) {
my $filename = script_output("ls /home/test/Desktop/");
$filepath = "/home/test/Desktop/$filename";
}
my $directory = $usecups ? "/home/test/Desktop" : "/home/test/Documents";
my $filename = script_output("ls $directory");
my $filepath = "$directory/$filename";
# Echo that filename to the terminal for troubleshooting purposes
diag("The file of the printed out file is located in $filepath");