Browse Source

Fix some minor issues in the regression tests.

master
Solomon Peachy 2 years ago
parent
commit
aabc8f33d6
  1. 0
      pano-split.sh
  2. 4
      regression-gp.csv
  3. 31
      regression-gp.pl

0
pano-split.sh

4
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

1 #gp_printername,vid,pid,type,gp_options[,pano_options]
198 sony-updr200,0x054c,0x035f,,PageSize=B7
199 sony-updr200,0x054c,0x035f,,PageSize=w360h504
200 sony-updr200,0x054c,0x035f,,PageSize=w360h504-div2
201 sony-updr200,0x054c,0x035f,,PageSize=B7,StpLaminate=Glossy sony-updr200,0x054c,0x035f,,PageSize=B7;StpLaminate=Glossy
202 sony-updr200,0x054c,0x035f,,PageSize=B7,StpLaminate=Matte sony-updr200,0x054c,0x035f,,PageSize=B7;StpLaminate=Matte
203 #
204 sony-upd895,0x054c,0x0049,,PageSize=w213h284
205 sony-upd895,0x054c,0x0049,,PageSize=w284h284

31
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);
}

Loading…
Cancel
Save