2 # -----------------------------------------------------------------------------
5 use lib
($0 =~ m
|^(.*/)| ?
$1 : ".");
8 # We get hit by a bitfield error on old Valgrinds.
9 my $valgrind_version = `valgrind --version 2>&1`;
10 &GnumericTest
::report_skip
("Valgrind is not available")
11 unless defined $valgrind_version;
12 my ($ma,$mi,$rv) = $valgrind_version =~ /^valgrind-?\s*(\d+)\.(\d+)\.(\d+)/;
13 &GnumericTest
::report_skip
("Valgrind is missing or too old")
14 unless (($ma || 0) * 1000 + ($mi || 0)) * 1000 + ($rv || 0) > 3001001;
16 my $cairo = `pkg-config --modversion cairo 2>/dev/null`;
18 &GnumericTest
::report_skip
("Cairo version $cairo is buggy")
21 &message
("Check the pdf exporter with valgrind -- part 1.");
22 my $src = "$samples/excel/statfuns.xls";
23 &GnumericTest
::report_skip
("file $src does not exist") unless -r
$src;
24 my $tmp = "statfuns.pdf";
25 &GnumericTest
::junkfile
($tmp);
26 &test_valgrind
("$ssconvert $src $tmp", 1);
28 &message
("Check the pdf exporter with valgrind -- part 2.");
29 my $src2 = "$samples/excel12/cellstyle.xlsx";
30 &GnumericTest
::report_skip
("file $src2 does not exist") unless -r
$src2;
31 my $tmp2 = "cellstyle.pdf";
32 &GnumericTest
::junkfile
($tmp2);
33 &test_valgrind
("$ssconvert $src2 $tmp2", 1);