Subject: | IO-Prompt fails to build in environments without /dev/tty |
Hi
In Debian we have on buildd with sbuild no /dev/tty in the
build-environment. Trying to build IO-Prompt in such an environment,
fails the tests:
# Failed test 'Output to /dev/tty'
# at t/01.dependencies.t line 4.
# Failed test 'Input from /dev/tty'
# at t/01.dependencies.t line 5.
# Looks like you failed 2 tests of 2.
t/01.dependencies.t ..
Trying to experiment with IO:Pty and adding the following patch:
---(patch)---------------------------------------------
+--- a/t/01.dependencies.t
++++ b/t/01.dependencies.t
+@@ -1,5 +1,8 @@
+ use Test::More tests => 2;
++use IO::Pty;
+
+-# Depends on hardcoded /dev/tty access
+-ok( open(my $OUT, ">/dev/tty"), "Output to /dev/tty");
+-ok( open(my $IN, "</dev/tty"), "Input from /dev/tty");
++$pty = new IO::Pty;
++$tty = $pty->ttyname();
++
++ok( open(my $OUT, ">$tty"), "Output to $tty");
++ok( open(my $IN, "<$tty"), "Input from $tty");
-------------------------------------------------------
now IO-Prompt builds, however there is still:
t/01.dependencies.t .. ok
Too late to run CHECK block at
/build/salvi-libio-prompt-perl_0.997-1-amd64-YbnibD/libio-prompt-perl-0.997-1/blib/lib/IO/Prompt.pm
line 319.
many thanks in advance considering looking into this,
Bests
Salvatore