Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Language Testing

5 views
Skip to first unread message

Klaas-Jan Stol

unread,
Jan 30, 2007, 5:03:18 AM1/30/07
to perl6-i...@perl.org
hello,

I'm trying to set up a test harness for languages/PIR

I did the following:
1. added a file lib\Parrot\Test\PIR.pm
(there are others, like Punie.pm).
I changed this file a bit, so it uses pir.pbc as compiler (I copied
the file from Punie.pm, and changed the compiler from punie.pbc to pir.pbc)

2. I added a file languages\PIR\t\harness containing:

#! perl -w

use Parrot::Test::Harness language => 'PIR';

3. I added 1 test file "sub.t"

Now, if I run it with a deliberate error in the test file, I see that:
[...]
# '.\parrot.exe "C:\parrot\languages\PIR\t\sub_1.pir"' failed with
exit code 1
[...]

which obviously means that languages\pir.pbc is not even used.
In other words, it seems that this module PIR.pm is not used.

I could not find docs on how to set this up. Help would greatly be
appreciated.
(and I could provide a patch after that for compiler FAQ, right below
"Languages" explaining this)

Thanks,
Klaas-Jan


Will Coleda

unread,
Jan 30, 2007, 7:24:45 AM1/30/07
to Klaas-Jan Stol, perl6-i...@perl.org
I just tried this setup in my sandbox as well.

Turns out you have an unfortunately named language, as
language=>"PIR" forces the usage of output_is(), as the author
assumed PIR was reserved for internal testing.

This will require either an update to lib/Parrot/Test.pm, or that you
use a different language name for the language arg and module. I
recommend the latter, e.g. "PIR_PGE". You won't need to change the
language DIR or the compiled .pbc you're using.

Regards.

--
Will "Coke" Coleda
wi...@coleda.com


Klaas-Jan Stol

unread,
Jan 30, 2007, 7:32:02 AM1/30/07
to Will Coleda, perl6-i...@perl.org
Thanks a bunch!
It's working :-)

kjs

0 new messages