Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests (and functionality?) fail when Gnuplot has "unknown" default terminal #66

Closed
akhuettel opened this issue Jun 26, 2017 · 1 comment
Assignees

Comments

@akhuettel
Copy link
Contributor

akhuettel commented Jun 26, 2017

Depending on the Gnuplot compilation options, differents sets of terminals are available. When (on Linux) either X or Qt4 terminals are enabled, one of these automatically becomes default terminal after program start. This can be verified with "show terminal", and in this case also PDL::Graphics::Gnuplot works fine.

However, if both X and Qt4 terminal are disabled during compilation, the default terminal after gnuplot start is "unknown", meaning it's not functional (and a terminal has to be selected first). This makes the PDL::Graphics::Gnuplot tests fail:

make -j3 test TEST_VERBOSE=0
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/manifest.t .. skipped: Author tests not required for installation
t/plot.t ...... 1/185
#   Failed test 'Constructor created a plotting object'
#   at t/plot.t line 23.
#
# P::G::G v2.011, gnuplot v5.0, Perl v5.026000, /usr/bin/perl on linux #

#   Failed test 'basic plotting succeeded without error'
#   at t/plot.t line 41.
# plot() died with 'PDL::Graphics::Gnuplot: Your gnuplot has terminal 'unknown' but it is not supported.
#         unknown: Unknown term (gnuplot final default)   [NS: not a terminal]
#
# You can use the 'terminfo' method for a list of available terminals.
#
#  at /var/tmp/portage/dev-perl/PDL-Graphics-Gnuplot-2.11.0/work/PDL-Graphics-Gnuplot-2.011/blib/lib/PDL/Graphics/Gnuplot.pm line 2312.
#       PDL::Graphics::Gnuplot::output(undef) called at /var/tmp/portage/dev-perl/PDL-Graphics-Gnuplot-2.11.0/work/PDL-Graphics-Gnuplot-2.011/blib/lib/PDL/Graphics/Gnuplot.pm line 2165
#       PDL::Graphics::Gnuplot::new("PDL::Graphics::Gnuplot") called at /var/tmp/portage/dev-perl/PDL-Graphics-Gnuplot-2.11.0/work/PDL-Graphics-Gnuplot-2.011/blib/lib/PDL/Graphics/Gnuplot.pm line 7934
#       PDL::Graphics::Gnuplot::_obj_or_global(ARRAY(0x32f6e50)) called at /var/tmp/portage/dev-perl/PDL-Graphics-Gnuplot-2.11.0/work/PDL-Graphics-Gnuplot-2.011/blib/lib/PDL/Graphics/Gnuplot.pm line 2600
#       PDL::Graphics::Gnuplot::plot(HASH(0x3414fc0), PDL=SCALAR(0x3508a80)) called at t/plot.t line 38
#       eval {...} called at t/plot.t line 38
# '

#   Failed test 'basic plotting created a reasonably-sized file'
#   at t/plot.t line 49.
# resulting output file should be ascii 79x24, but only contains 0 bytes
PDL::Graphics::Gnuplot: Your gnuplot has terminal 'unknown' but it is not supported.
        unknown: Unknown term (gnuplot final default)   [NS: not a terminal]

You can use the 'terminfo' method for a list of available terminals.

 at /var/tmp/portage/dev-perl/PDL-Graphics-Gnuplot-2.11.0/work/PDL-Graphics-Gnuplot-2.011/blib/lib/PDL/Graphics/Gnuplot.pm line 2312.
        PDL::Graphics::Gnuplot::output(undef) called at /var/tmp/portage/dev-perl/PDL-Graphics-Gnuplot-2.11.0/work/PDL-Graphics-Gnuplot-2.011/blib/lib/PDL/Graphics/Gnuplot.pm line 2165
        PDL::Graphics::Gnuplot::new("PDL::Graphics::Gnuplot") called at /var/tmp/portage/dev-perl/PDL-Graphics-Gnuplot-2.11.0/work/PDL-Graphics-Gnuplot-2.011/blib/lib/PDL/Graphics/Gnuplot.pm line 7934
        PDL::Graphics::Gnuplot::_obj_or_global(ARRAY(0x329c308)) called at /var/tmp/portage/dev-perl/PDL-Graphics-Gnuplot-2.11.0/work/PDL-Graphics-Gnuplot-2.011/blib/lib/PDL/Graphics/Gnuplot.pm line 2433
        PDL::Graphics::Gnuplot::restart() called at t/plot.t line 52
# Looks like you planned 185 tests but ran 7.
# Looks like you failed 3 tests of 7 run.
t/plot.t ...... Dubious, test returned 3 (wstat 768, 0x300)
Failed 181/185 subtests

Test Summary Report
-------------------
t/plot.t    (Wstat: 768 Tests: 7 Failed: 3)
  Failed tests:  3, 5, 7
  Non-zero exit status: 3
  Parse errors: Bad plan.  You planned 185 tests but ran 7.

See also https://bugs.gentoo.org/show_bug.cgi?id=622586

aballier pushed a commit to aballier/gentoo that referenced this issue Jun 26, 2017
…622586

Depending on the Gnuplot compilation options, differents sets of terminals are available. When (on Linux) either X or Qt4 terminals are enabled, one
of these automatically becomes default terminal after program start. This can be verified with "show terminal", and in this case also
PDL::Graphics::Gnuplot works fine.

However, if both X and Qt4 terminal are disabled during compilation, the default terminal after gnuplot start is "unknown", meaning it's not
functional (and a terminal has to be selected first). This makes the PDL::Graphics::Gnuplot tests fail, and probably also its functionality.

See also PDLPorters/PDL-Graphics-Gnuplot#66

Package-Manager: Portage-2.3.6, Repoman-2.3.2
@zmughal zmughal self-assigned this Dec 28, 2021
@mohawk2
Copy link
Member

mohawk2 commented Apr 13, 2024

Much later: thank you for the report! The next version will use dumb if probing shows unknown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants