Skip to content

Commit

Permalink
[RT 53961] Worked around rrdtool-1.3.5 inaccuracy problem by
Browse files Browse the repository at this point in the history
skipping certain tests for rrdtool <= 1.4.
  • Loading branch information
mschilli committed Feb 22, 2010
1 parent 168b932 commit 36ca50d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 12 deletions.
4 changes: 4 additions & 0 deletions Changes
@@ -1,3 +1,7 @@
0.30 (02/21/2010)
(ms) [RT 53961] Worked around rrdtool-1.3.5 inaccuracy problem by
skipping certain tests for rrdtool <= 1.4.

0.29 (02/20/2010)
(ms) Added github repository link to Makefile.PL
(ms) Fixed documentation for fetch_next().
Expand Down
2 changes: 1 addition & 1 deletion README
@@ -1,5 +1,5 @@
######################################################################
RRDTool::OO 0.29
RRDTool::OO 0.30
######################################################################

NAME
Expand Down
2 changes: 1 addition & 1 deletion lib/RRDTool/OO.pm
Expand Up @@ -7,7 +7,7 @@ use Carp;
use RRDs;
use Log::Log4perl qw(:easy);

our $VERSION = '0.29';
our $VERSION = '0.30';

# Define the mandatory and optional parameters for every method.
our $OPTIONS = {
Expand Down
24 changes: 15 additions & 9 deletions t/005Graph.t
Expand Up @@ -602,22 +602,28 @@ PRINT:
@prgraph,
);

is($rrd->print_results()->[0], "Result = 5.50", "print result");

SKIP: {
skip "Skipping potentially buggy RRDs < 1.4 for print/format", 1 if
$RRDs::VERSION < 1.4;
is($rrd->print_results()->[0], "Result = 6.00", "print result");
}

######################################################################
# Draw simple graphv
######################################################################
SKIP: {
eval "use RRDs 1.3";
skip "RRDs is too old: need 1.3 for graphv", 2 if $@;
eval "use RRDs 1.3";
skip "RRDs is too old: need 1.3 for graphv", 2 if $@;

# Simple line graph
$rrd->graphv(
@prgraph,
);
$rrd->graphv( @prgraph );

ok(-f "mygraph.png", "Image exists");
unlink "mygraph.png";
is($rrd->print_results()->{'print[0]'}, "Result = 5.50", "print result");
ok(-f "mygraph.png", "Image exists");
unlink "mygraph.png";
skip "Skipping potentially buggy RRDs < 1.4 for print/format", 1 if
$RRDs::VERSION < 1.4;
is($rrd->print_results()->{'print[0]'}, "Result = 6.00", "print result");
}

unlink("foo");
Expand Down
2 changes: 1 addition & 1 deletion t/007Dump.t
Expand Up @@ -65,7 +65,7 @@ unlink "foo";
# Restore it.
#####################################################
$rrd->restore("out");
is(-s "foo", $size, "RRD same size");
ok(-f "foo", "RRD resurrected");

END { unlink "foo";
unlink "out";
Expand Down

0 comments on commit 36ca50d

Please sign in to comment.