summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2019-05-19 09:23:12 -0400
committerSolomon Peachy <pizza@shaftnet.org>2019-05-19 09:23:12 -0400
commit28de5a9c4862db7f0f4342955198283ce9e68d18 (patch)
tree59a4d86af86d25c5f21509c2e3bd2b2cabca9c50
parent057f0a20c599e6a030ef466a7a4f3b1d65d6d820 (diff)
downloadselphy_print-28de5a9c4862db7f0f4342955198283ce9e68d18.tar.gz
selphy_print-28de5a9c4862db7f0f4342955198283ce9e68d18.tar.bz2
selphy_print-28de5a9c4862db7f0f4342955198283ce9e68d18.zip
regression: Alloe gutenprint executables be overridden by envvars.
-rwxr-xr-xregression-gp.pl23
-rwxr-xr-xregression.pl4
2 files changed, 21 insertions, 6 deletions
diff --git a/regression-gp.pl b/regression-gp.pl
index 7016659..83abf27 100755
--- a/regression-gp.pl
+++ b/regression-gp.pl
@@ -52,6 +52,12 @@ my @children = ();
my $kid;
my $error = 0;
+my $genppd_exec = "/usr/sbin/cups-genppd.5.3";
+my $convert_exec = "/usr/bin/convert";
+my $pdftoraster_exec = "/usr/lib/cups/filter/pdftoraster";
+my $rastertogutenprint_exec = "/usr/lib/cups/filter/rastertogutenprint.5.3";
+my $backend_exec = "./dyesub_backend";
+
$ENV{"STP_SUPPRESS_VERBOSE_MESSAGES"} = 1;
$ENV{"OMP_NUM_THREADS"} = 1;
$ENV{"TEST_MODE"} = "2";
@@ -65,6 +71,13 @@ if (defined($ENV{"STP_VERBOSE"})) {
if (defined($ENV{"STP_PARALLEL"})) {
$proc_count = $ENV{"STP_PARALLEL"};
};
+if (defined($ENV{"STP_GENPPD"})) {
+ $genppd_exec = $ENV{"STP_GENPPD"};
+}
+if (defined($ENV{"STP_RASTERTOGUTENPRINT"})) {
+ $rastertogutenprint_exec = $ENV{"STP_RASTERTOGUTENPRINT"};
+}
+
if ($proc_count > 1) {
$quiet = 1;
@@ -148,7 +161,7 @@ if ($proc_count > 1 && $kid > 0) {
print "DEVICE_URI=$ENV{DEVICE_URI}\n";
}
- @args = ("/usr/sbin/cups-genppd.5.3", "-p", $work_dir, "-Z", "-q", $gp_name);
+ @args = ($genppd_exec, "-p", $work_dir, "-Z", "-q", $gp_name);
if (!$quiet) {
print join(":", @args) . "\n";
}
@@ -165,7 +178,7 @@ if ($proc_count > 1 && $kid > 0) {
for (my $pages = 1 ; $pages <= $max_pages ; $pages++) {
# generate PDF.
- @args = ("/usr/bin/convert");
+ @args = ($convert_exec);
for (my $i = 0 ; $i < $pages ; $i++) {
push(@args, $input_image);
}
@@ -183,7 +196,7 @@ if ($proc_count > 1 && $kid > 0) {
}
# Generate raster from PDF
- @args = ("/usr/lib/cups/filter/pdftoraster", $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";
}
@@ -200,7 +213,7 @@ if ($proc_count > 1 && $kid > 0) {
for (my $copies = 1 ; $copies <= $max_copies ; $copies++) {
# Call raster2gutenprint
- @args = ("/usr/lib/cups/filter/rastertogutenprint.5.3", $id, $user, $title, $copies, $options);
+ @args = ($rastertogutenprint_exec, $id, $user, $title, $copies, $options);
if ($valgrind) {
if ($quiet) {
unshift(@args,"-q");
@@ -222,7 +235,7 @@ if ($proc_count > 1 && $kid > 0) {
}
# Call backend using CUPS methodologies, using STDIN.
- @args = ("./dyesub_backend", $id, $user, $title, $copies, $options);
+ @args = ($backend_exec, $id, $user, $title, $copies, $options);
if ($valgrind) {
if ($quiet) {
unshift(@args,"-q");
diff --git a/regression.pl b/regression.pl
index ac205f7..0dc8861 100755
--- a/regression.pl
+++ b/regression.pl
@@ -45,6 +45,8 @@ my @children = ();
my $kid;
my $error = 0;
+my $backend_exec = "./dyesub_backend";
+
$ENV{"TEST_MODE"} = "2";
if (!defined($ARGV[0])) {
@@ -113,7 +115,7 @@ if ($proc_count > 1 && $kid > 0) {
}
foreach (my $i = 1; $i <= $copies ; $i++) {
- my @args = ("./dyesub_backend", "-d", $i, "testjobs/${row[3]}");
+ my @args = ($backend_exec, "-d", $i, "testjobs/${row[3]}");
if ($valgrind) {
if ($quiet) {
unshift(@args,"-q");