blob: cd3f38bb894520db8083222646bcb0e99e5271c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
#!@BASHREAL@
# Harness for rastertogutenprint tester.
#
# Copyright 2007-2017 Robert Krawitz (rlk@alum.mit.edu)
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
if [[ -n "$STP_TEST_LOG_PREFIX" ]] ; then
redir="${STP_TEST_LOG_PREFIX}${0##*/}_$$.log"
if [[ -n $BUILD_VERBOSE ]] ; then
exec > >(tee -a "$redir" >&3)
else
exec 1>>"$redir"
fi
exec 2>&1
fi
STP_TEST_PROFILE=${STP_TEST_PROFILE:-full}
set -e
declare FASTOPT="-o StpDitherAlgorithm=VeryFast -l -N -o ColorCorrection=Raw"
declare MIN_PRINTERS="@MINIMAL_PRINTERS_TO_TEST@"
function runit() {
echo "================================================================"
echo "$@"
[[ -z $STP_TEST_DEBUG ]] && "$@"
}
function test_minimal() {
runit ./test-rastertogutenprint -s $FASTOPT -p 1 \
$MIN_PRINTERS
}
function test_fast() {
runit ./test-rastertogutenprint -S -s $FASTOPT -p 2
}
function test_full() {
runit ./test-rastertogutenprint -l -p 2 $FASTOPT
runit ./test-rastertogutenprint -S -s -X
}
function test_valgrind_minimal() {
runit ./test-rastertogutenprint -v -v -s $FASTOPT -p 1 \
$MIN_PRINTERS
}
function test_valgrind_fast() {
test_valgrind_minimal
}
function test_valgrind() {
runit ./test-rastertogutenprint -v -v -S -s $FASTOPT -p 2
}
case "$STP_TEST_PROFILE" in
full|fast|valgrind|valgrind_minimal|valgrind_fast|minimal)
test_$STP_TEST_PROFILE
;;
*)
exit 77
;;
esac
|