Skip Menu |

This queue is for tickets about the Graph-Writer-GraphViz CPAN distribution.

Report information
The Basics
Id: 85950
Status: open
Priority: 0/
Queue: Graph-Writer-GraphViz

People
Owner: Nobody in particular
Requestors: gregoa [...] debian.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



From: gregoa [...] cpan.org
Subject: libgraph-writer-graphviz-perl: FTBFS with perl 5.18: test failure
This bug has been forwarded from http://bugs.debian.org/711446 Source: libgraph-writer-graphviz-perl Version: 0.11-1 Severity: important User: debian-perl@lists.debian.org Usertags: perl-5.18-transition Tags: sid jessie This package FTBFS with perl 5.18 from experimental (in a clean sbuild session): # Failed test at t/1.simple.t line 23. # Looks like you failed 1 test of 1. t/1.simple.t .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/1 subtests # Failed test at t/2.ioall.t line 31. # Looks like you failed 1 test of 2. t/2.ioall.t ... Failed 2/3 test programs. 2/4 subtests failed. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/2 subtests -- Dominic Hargreaves | http://www.larted.org.uk/~dom/ PGP key 5178E2A5 from the.earth.li (keyserver,web,email) Thanks in advance, gregor herrmann, Debian Perl Group
Subject: [rt.cpan.org #85950] Patches to fix
Date: Sat, 8 Feb 2014 18:03:32 +0000
To: bug-Graph-Writer-GraphViz [...] rt.cpan.org
From: Ian Jackson <ijackson [...] chiark.greenend.org.uk>
Patches to fix this bug are now available in the Debian bug and the Debian version of the package. Thanks, Ian.
The test broke again due to changes in the dot output, cf. https://bugs.debian.org/755328 I'm attaching a patch which switches the output from dot to plain. Cheers, gregor
Subject: fix-test-suite.patch
Description: Fix testsuite. - Tests: Provide a TestUtils.pl containing broken-out launder() function The code for laundering font sizes was duplicated between the tests. Instead, break it out into a common function launder() in a new file t/TestUtils.pl (which exists just for the tests). (iwj) - Tests: Sort the keywords in the graph output They come out in hash order which is not necessarily stable. Fixes FTBFS with perl 5.18 (Debian #711446, CPAN #85950). (iwj) - Tests: switch from dot to plain format GraphViz dot output has changed again, causing new build failures (Debian #755328). Use plain format instead of dot; textually comparing nested strings is just too fragile. Update t/TestUtils.pl's sorting fucntion. (gregoa) Origin: vendor Bug: http://rt.cpan.org/Public/Bug/Display.html?id=85950 Bug-Debian: https://bugs.debian.org/711446 https://bugs.debian.org/755328 Forwarded: http://rt.cpan.org/Public/Bug/Display.html?id=85950 Author: Ian Jackson <ijackson@chiark.greenend.org.uk> gregor herrmann <gregoa@debian.org> Last-Update: 2014-10-22 --- a/MANIFEST +++ b/MANIFEST @@ -14,3 +14,4 @@ t/0.use.t t/1.simple.t t/2.ioall.t +t/TestUtils.pl --- a/t/1.simple.t +++ b/t/1.simple.t @@ -6,31 +6,27 @@ use IO::All; use Graph; use Graph::Writer::GraphViz; +require 't/TestUtils.pl'; my @v = qw/Alice Bob Crude Dr/; my $g = Graph->new; $g->add_vertices(@v); -my $wr = Graph::Writer::GraphViz->new(-format => 'dot'); +my $wr = Graph::Writer::GraphViz->new(-format => 'plain'); $wr->write_graph($g,'t/graph.simple.dot'); $/ = undef; my $g1 = <DATA>; my $g2 = io('t/graph.simple.dot')->slurp; -# Ignore font-sizes, it's system-dependant -$g1 =~ s/\d+/0/g; -$g2 =~ s/\d+/0/g; +launder(\$g1); +launder(\$g2); ok($g1 eq $g2); unlink('t/graph.simple.dot'); __DATA__ -digraph test { - graph [ratio=fill]; - node [label="\N", color=black]; - edge [color=black]; - graph [bb="0,0,290,52"]; - Bob [label=Bob, pos="27,26", width="0.75", height="0.50"]; - Dr [label=Dr, pos="99,26", width="0.75", height="0.50"]; - Alice [label=Alice, pos="174,26", width="0.83", height="0.50"]; - Crude [label=Crude, pos="256,26", width="0.94", height="0.50"]; -} +graph 1 4.3624 0.5 +node Crude 0.55065 0.25 1.1013 0.5 Crude solid ellipse black black +node Dr 1.7312 0.25 0.75 0.5 Dr solid ellipse black black +node Bob 2.759 0.25 0.79437 0.5 Bob solid ellipse black black +node Alice 3.884 0.25 0.95686 0.5 Alice solid ellipse black black +stop --- a/t/2.ioall.t +++ b/t/2.ioall.t @@ -6,12 +6,13 @@ use IO::All; use Graph; use Graph::Writer::GraphViz; +require 't/TestUtils.pl'; my @v = qw/Alice Bob Crude Dr/; my $g = Graph->new; $g->add_vertices(@v); -my $wr = Graph::Writer::GraphViz->new(-format => 'dot'); +my $wr = Graph::Writer::GraphViz->new(-format => 'plain'); my $io = io('t/graph.ioall.dot')->mode('w+')->assert; $wr->write_graph($g, $io ); @@ -25,20 +26,16 @@ } ok(-f 't/graph.ioall.dot'); -# Ignore font-sizes, it's system-dependant -$g1 =~ s/\d+/0/g; -$g2 =~ s/\d+/0/g; + +launder(\$g1); +launder(\$g2); ok($g1 eq $g2); $io->unlink; __DATA__ -digraph test { - graph [ratio=fill]; - node [label="\N", color=black]; - edge [color=black]; - graph [bb="0,0,290,52"]; - Bob [label=Bob, pos="27,26", width="0.75", height="0.50"]; - Dr [label=Dr, pos="99,26", width="0.75", height="0.50"]; - Alice [label=Alice, pos="174,26", width="0.83", height="0.50"]; - Crude [label=Crude, pos="256,26", width="0.94", height="0.50"]; -} +graph 1 4.3624 0.5 +node Crude 0.55065 0.25 1.1013 0.5 Crude solid ellipse black black +node Dr 1.7312 0.25 0.75 0.5 Dr solid ellipse black black +node Bob 2.759 0.25 0.79437 0.5 Bob solid ellipse black black +node Alice 3.884 0.25 0.95686 0.5 Alice solid ellipse black black +stop --- /dev/null +++ b/t/TestUtils.pl @@ -0,0 +1,11 @@ + +sub launder ($) { + my ($gr) = @_; + # Ignore font-sizes, it's system-dependant + $$gr =~ s/\d+/0/g; + # Sort the the graph output, as it comes out + # in hash order which isn't necessarily stable. + $$gr = join "\n", sort split /\n/, $$gr; +} + +1;