From aabc8f33d632f617650b4986588abf3ce735cd03 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Sun, 24 Jan 2021 14:37:33 -0500 Subject: [PATCH] Fix some minor issues in the regression tests. --- pano-split.sh | 0 regression-gp.csv | 4 ++-- regression-gp.pl | 31 ++++++++++++++++--------------- 3 files changed, 18 insertions(+), 17 deletions(-) mode change 100644 => 100755 pano-split.sh diff --git a/pano-split.sh b/pano-split.sh old mode 100644 new mode 100755 diff --git a/regression-gp.csv b/regression-gp.csv index a6b018e..272347f 100644 --- a/regression-gp.csv +++ b/regression-gp.csv @@ -198,8 +198,8 @@ sony-updr200,0x054c,0x035f,0x04,PageSize=w432h576-div2 sony-updr200,0x054c,0x035f,,PageSize=B7 sony-updr200,0x054c,0x035f,,PageSize=w360h504 sony-updr200,0x054c,0x035f,,PageSize=w360h504-div2 -sony-updr200,0x054c,0x035f,,PageSize=B7,StpLaminate=Glossy -sony-updr200,0x054c,0x035f,,PageSize=B7,StpLaminate=Matte +sony-updr200,0x054c,0x035f,,PageSize=B7;StpLaminate=Glossy +sony-updr200,0x054c,0x035f,,PageSize=B7;StpLaminate=Matte # sony-upd895,0x054c,0x0049,,PageSize=w213h284 sony-upd895,0x054c,0x0049,,PageSize=w284h284 diff --git a/regression-gp.pl b/regression-gp.pl index 2f7feaf..e4f99a9 100755 --- a/regression-gp.pl +++ b/regression-gp.pl @@ -42,7 +42,7 @@ my @pages_set = (1, 3); my @copies_set = (1, 3); my $valgrind = 0; -my $work_dir_base = "/tmp/"; +my $work_dir_base = "/tmp"; my $rotor = 0; my $rotor_circ = 0; @@ -131,7 +131,7 @@ if ($proc_count > 1 && $kid > 0) { $ENV{"BACKEND"} = $row[0]; $ENV{"EXTRA_VID"} = $row[1]; $ENV{"EXTRA_PID"} = $row[2]; - my $work_dir = "${work_dir_base}/$currow/"; + my $work_dir = "${work_dir_base}/$currow"; if (!mkdir($work_dir)) { print("cannot crate work dir ${work_dir}\n"); $error++; @@ -163,7 +163,7 @@ if ($proc_count > 1 && $kid > 0) { my @args; # Generate PPD - my $ppd_fname = "${work_dir}stp-${gp_name}.5.3.ppd"; + my $ppd_fname = "${work_dir}/stp-${gp_name}.5.3.ppd"; $ENV{"PPD"} = $ppd_fname; $ENV{"DEVICE_URI"} = "gutenprint53+usb://$row[0]/12345678"; @@ -190,11 +190,12 @@ if ($proc_count > 1 && $kid > 0) { foreach my $pages (@pages_set) { if ($pano_mode) { + print("... $row[0] $row[1] $row[2] $row[3]\n"); # XXX generate panorama bitmap my $pano_tmp = $input_image; # XXX # Generate PDF by running through script. - @args = ($pano_exec, $pano_tmp, "${work_dir}$currow-${gp_name}.pdf", $gp_name, $row[5]); + @args = ($pano_exec, $pano_tmp, "${work_dir}/$currow-${gp_name}.pdf", $gp_name, $row[5]); if (!$quiet) { print join(":", @args) . "\n"; } @@ -212,7 +213,7 @@ if ($proc_count > 1 && $kid > 0) { } push(@args, "-density"); push(@args, "300x300"); - push(@args, "${work_dir}$currow-${gp_name}.pdf"); + push(@args, "${work_dir}/$currow-${gp_name}.pdf"); if (!$quiet) { print join(":", @args) . "\n"; } @@ -225,14 +226,14 @@ if ($proc_count > 1 && $kid > 0) { } # Generate raster from PDF - @args = ($pdftoraster_exec, $id, $user, $title, 1, $options, "${work_dir}$currow-${gp_name}.pdf"); + @args = ($pdftoraster_exec, $id, $user, $title, 1, $options, "${work_dir}/$currow-${gp_name}.pdf"); if (!$quiet) { print join(":", @args) . "\n"; } if ($quiet) { - $rval = run \@args, ">", "${work_dir}$currow-${gp_name}.raster", "2>", "/dev/null"; + $rval = run \@args, ">", "${work_dir}/$currow-${gp_name}.raster", "2>", "/dev/null"; } else { - $rval = run \@args, ">", "${work_dir}$currow-${gp_name}.raster"; + $rval = run \@args, ">", "${work_dir}/$currow-${gp_name}.raster"; } if (!$rval) { print("***** $row[0] $row[1] $row[2] $row[3] '$row[4]' FAIL: imagetoraster $?: $pages -- " . join(":", @args) . "\n"); @@ -253,9 +254,9 @@ if ($proc_count > 1 && $kid > 0) { print join(":", @args) . "\n"; } if ($quiet) { - $rval = run \@args, "<", "${work_dir}$currow-${gp_name}.raster", ">", "${work_dir}$currow-${gp_name}.raw", "2>", "/dev/null"; + $rval = run \@args, "<", "${work_dir}/$currow-${gp_name}.raster", ">", "${work_dir}/$currow-${gp_name}.raw", "2>", "/dev/null"; } else { - $rval = run \@args, "<", "${work_dir}$currow-${gp_name}.raster", ">", "${work_dir}$currow-${gp_name}.raw"; + $rval = run \@args, "<", "${work_dir}/$currow-${gp_name}.raster", ">", "${work_dir}/$currow-${gp_name}.raw"; } if (!$rval) { print("***** $row[0] $row[1] $row[2] $row[3] '$row[4]' FAIL: rastertogutenorint $?: $pages $copies -- " . join(":", @args) . "\n"); @@ -275,9 +276,9 @@ if ($proc_count > 1 && $kid > 0) { print join(":", @args) . "\n"; } if ($quiet) { - $rval = run \@args, "<", "${work_dir}$currow-${gp_name}.raw", "2>", "/dev/null"; + $rval = run \@args, "<", "${work_dir}/$currow-${gp_name}.raw", "2>", "/dev/null"; } else { - $rval = run \@args, "<", "${work_dir}$currow-${gp_name}.raw"; + $rval = run \@args, "<", "${work_dir}/$currow-${gp_name}.raw"; } if (!$rval) { print("***** $row[0] $row[1] $row[2] $row[3] '$row[4]' FAIL: backend $?: $pages $copies -- " . join(":", @args) . "\n"); @@ -288,9 +289,9 @@ if ($proc_count > 1 && $kid > 0) { } print "***** $row[0] $row[1] $row[2] $row[3] '$row[4]' PASS\n"; - unlink ("${work_dir}$currow-${gp_name}.pdf"); - unlink ("${work_dir}$currow-${gp_name}.raster"); - unlink ("${work_dir}$currow-${gp_name}.raw"); + unlink ("${work_dir}/$currow-${gp_name}.pdf"); + unlink ("${work_dir}/$currow-${gp_name}.raster"); + unlink ("${work_dir}/$currow-${gp_name}.raw"); unlink ($ppd_fname); rmdir ($work_dir); }