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

migrate t/ from custom TAP generation #12724

Closed
p5pRT opened this issue Jan 21, 2013 · 15 comments
Closed

migrate t/ from custom TAP generation #12724

p5pRT opened this issue Jan 21, 2013 · 15 comments

Comments

@p5pRT
Copy link

p5pRT commented Jan 21, 2013

Migrated from rt.perl.org#116483 (status was 'resolved')

Searchable as RT116483$

@p5pRT
Copy link
Author

p5pRT commented Jan 21, 2013

From @rjbs

Many tests below ./t still generate TAP by "hand", rather than using library
functions. As explained in perlhack/TESTING, tests in ./t are written in a
particular way to test that more complex constructions actually work before
using them routinely. Hence they don't use Test​::More, but instead there is an
intentionally simpler library, ./t/test.pl. However, quite a few tests in ./t
have not been refactored to use it. Refactoring any of these tests, one at a
time, is a useful thing TODO.

The subdirectories base, cmd and comp, which contain the most basic tests,
**must** be excluded from this task.

@p5pRT
Copy link
Author

p5pRT commented Jan 21, 2013

From @jkeenan

On Mon Jan 21 08​:10​:36 2013, rjbs wrote​:

Many tests below ./t still generate TAP by "hand", rather than using
library
functions. As explained in perlhack/TESTING, tests in ./t are written
in a
particular way to test that more complex constructions actually work
before
using them routinely. Hence they don't use Test​::More, but instead
there is an
intentionally simpler library, ./t/test.pl. However, quite a few tests
in ./t
have not been refactored to use it. Refactoring any of these tests,
one at a
time, is a useful thing TODO.

The subdirectories base, cmd and comp, which contain the most basic
tests,
**must** be excluded from this task.

Also, we have determined that certain tests formerly in t/op use
functionality presumed to work by t/test.pl. A couple of months back,
we moved them to t/opbasic, so they, too, are excluded from this task.

I would be happy to assist anyone who takes on part of this task with
the associated task of writing of descriptions for tests lacking them --
something we began at the St Louis Perl Hackathon in November and have
been plugging away at since.

Thank you very much.
Jim Keenan

@p5pRT
Copy link
Author

p5pRT commented Jan 21, 2013

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jan 22, 2013

From @nicomen

On Man. 21. Jan. 2013 12​:50​:51, jkeenan wrote​:

On Mon Jan 21 08​:10​:36 2013, rjbs wrote​:

Many tests below ./t still generate TAP by "hand", rather than using
library
functions. As explained in perlhack/TESTING, tests in ./t are
written
in a
particular way to test that more complex constructions actually work
before
using them routinely. Hence they don't use Test​::More, but instead
there is an
intentionally simpler library, ./t/test.pl. However, quite a few
tests
in ./t
have not been refactored to use it. Refactoring any of these tests,
one at a
time, is a useful thing TODO.

The subdirectories base, cmd and comp, which contain the most basic
tests,
**must** be excluded from this task.

Also, we have determined that certain tests formerly in t/op use
functionality presumed to work by t/test.pl. A couple of months back,
we moved them to t/opbasic, so they, too, are excluded from this task.

I would be happy to assist anyone who takes on part of this task with
the associated task of writing of descriptions for tests lacking them
--
something we began at the St Louis Perl Hackathon in November and have
been plugging away at since.

Thank you very much.
Jim Keenan

This is something I would like to help with.

@p5pRT
Copy link
Author

p5pRT commented Jan 22, 2013

From @demerphq

On 21 January 2013 17​:10, Ricardo SIGNES <perlbug-followup@​perl.org> wrote​:

# New Ticket Created by Ricardo SIGNES
# Please include the string​: [perl #116483]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=116483 >

Many tests below ./t still generate TAP by "hand", rather than using library
functions. As explained in perlhack/TESTING, tests in ./t are written in a
particular way to test that more complex constructions actually work before
using them routinely. Hence they don't use Test​::More, but instead there is an
intentionally simpler library, ./t/test.pl. However, quite a few tests in ./t
have not been refactored to use it. Refactoring any of these tests, one at a
time, is a useful thing TODO.

The subdirectories base, cmd and comp, which contain the most basic tests,
**must** be excluded from this task.

Also probably tests in t/re.

A lot of the test infrastructure uses regexes to do its tests. At one
point we were really anal about this for regexps.

Yves

--
perl -Mre=debug -e "/just|another|perl|hacker/"

@p5pRT
Copy link
Author

p5pRT commented Jan 22, 2013

From hanekomu@gmail.com

Hi nicomen,

I've already started to work on this. There aren't that many files to change, as far as I can see.

To get all files that don't require test.pl but do print something and are not in the directories-to-
be-excluded as mentioned above​:

$ ack -G '\.t$' -L 'require.*test.pl' | xargs ack -l print | ack -v '^(base|cmd|comp|opbasic|re)/'

  op/sprintf.t
  porting/maintainers.t
  porting/podcheck.t
  run/switchF1.t
  run/switchp.t
  win32/system.t

I've already worked on op/sprintf.t and porting/maintainers.t (and changed
Porting/Maintainers.pm to output results in a deterministic order).

Also, I'm going to - as discussed with rjbs on IRC - make the "chdir/@​INC/require test.pl" code
at the top of each test more consistent across all tests.

So if you don't mind I'd like to continue working on this bug.

@p5pRT
Copy link
Author

p5pRT commented Jan 22, 2013

From @doughera88

On Tue, 22 Jan 2013, demerphq wrote​:

On 21 January 2013 17​:10, Ricardo SIGNES <perlbug-followup@​perl.org> wrote​:

# New Ticket Created by Ricardo SIGNES
# Please include the string​: [perl #116483]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=116483 >

Many tests below ./t still generate TAP by "hand", rather than using library
functions. As explained in perlhack/TESTING, tests in ./t are written in a
particular way to test that more complex constructions actually work before
using them routinely. Hence they don't use Test​::More, but instead there is an
intentionally simpler library, ./t/test.pl. However, quite a few tests in ./t
have not been refactored to use it. Refactoring any of these tests, one at a
time, is a useful thing TODO.

The subdirectories base, cmd and comp, which contain the most basic tests,
**must** be excluded from this task.

Also probably tests in t/re.

A lot of the test infrastructure uses regexes to do its tests. At one
point we were really anal about this for regexps.

My recollection is that regex files were often the ones most likely to run
into compiler or optimization problems, and the minitest results on the
regexp tests were often quite helpful in diagnosing and avoiding the
problem.

--
  Andy Dougherty doughera@​lafayette.edu
 

@p5pRT
Copy link
Author

p5pRT commented Jan 23, 2013

From @nicomen

On Tir. 22. Jan. 2013 10​:31​:03, hanekomu wrote​:

Hi nicomen,

I've already started to work on this. There aren't that many files to
change, as far as I can see.

To get all files that don't require test.pl but do print something and
are not in the directories-to-
be-excluded as mentioned above​:

$ ack -G '\.t$' -L 'require.*test.pl' | xargs ack -l print | ack -v
'^(base|cmd|comp|opbasic|re)/'

op/sprintf.t
porting/maintainers.t
porting/podcheck.t
run/switchF1.t
run/switchp.t
win32/system.t

I've already worked on op/sprintf.t and porting/maintainers.t (and
changed
Porting/Maintainers.pm to output results in a deterministic order).

Also, I'm going to - as discussed with rjbs on IRC - make the
"chdir/@​INC/require test.pl" code
at the top of each test more consistent across all tests.

So if you don't mind I'd like to continue working on this bug.

Sure, no problem. just thought it was unassigned ;)

@p5pRT
Copy link
Author

p5pRT commented May 29, 2013

From doherty@cs.dal.ca

On Tue Jan 22 10​:31​:03 2013, hanekomu wrote​:

So if you don't mind I'd like to continue working on this bug.

Is this still on your plate? I'd open to helping, if you want it.

-Mike

@p5pRT
Copy link
Author

p5pRT commented Feb 28, 2014

From @jkeenan

On Tue Jan 22 10​:31​:03 2013, hanekomu wrote​:

Hi nicomen,

I've already started to work on this. There aren't that many files to
change, as far as I can see.

To get all files that don't require test.pl but do print something and
are not in the directories-to-
be-excluded as mentioned above​:

$ ack -G '\.t$' -L 'require.*test.pl' | xargs ack -l print | ack -v
'^(base|cmd|comp|opbasic|re)/'

op/sprintf.t
porting/maintainers.t
porting/podcheck.t
run/switchF1.t
run/switchp.t
win32/system.t

The 6 files above all appear to have been "handled", i.e., they were either converted to using t/test.pl or a comment was added stating why they were specifically not converted to t/test.pl.

Hence, I don't see anything more to be done on this ticket.

If you disagree with that judgment, please speak up. Otherwise, I will close the ticket within 7 days.

Thank you very much.
Jim Keenan

I've already worked on op/sprintf.t and porting/maintainers.t (and
changed
Porting/Maintainers.pm to output results in a deterministic order).

Also, I'm going to - as discussed with rjbs on IRC - make the
"chdir/@​INC/require test.pl" code
at the top of each test more consistent across all tests.

So if you don't mind I'd like to continue working on this bug.

@p5pRT
Copy link
Author

p5pRT commented Mar 1, 2014

From jeffrey.black@yahoo.com

On Thu Feb 27 18​:43​:20 2014, jkeenan wrote​:

On Tue Jan 22 10​:31​:03 2013, hanekomu wrote​:

Hi nicomen,

I've already started to work on this. There aren't that many files to
change, as far as I can see.

To get all files that don't require test.pl but do print something
and
are not in the directories-to-
be-excluded as mentioned above​:

$ ack -G '\.t$' -L 'require.*test.pl' | xargs ack -l print | ack -v
'^(base|cmd|comp|opbasic|re)/'

op/sprintf.t
porting/maintainers.t
porting/podcheck.t
run/switchF1.t
run/switchp.t
win32/system.t

The 6 files above all appear to have been "handled", i.e., they were
either converted to using t/test.pl or a comment was added stating why
they were specifically not converted to t/test.pl.

Hence, I don't see anything more to be done on this ticket.

If you disagree with that judgment, please speak up. Otherwise, I
will close the ticket within 7 days.

Thank you very much.
Jim Keenan

I've already worked on op/sprintf.t and porting/maintainers.t (and
changed
Porting/Maintainers.pm to output results in a deterministic order).

Also, I'm going to - as discussed with rjbs on IRC - make the
"chdir/@​INC/require test.pl" code
at the top of each test more consistent across all tests.

So if you don't mind I'd like to continue working on this bug.

James,

I noticed you have "taken" this ticket. Have you begun working on it yet? If not I'd like to take it from you.

Jeff

@p5pRT
Copy link
Author

p5pRT commented Mar 1, 2014

From @jkeenan

On 3/1/14 9​:01 AM, JB via RT wrote​:

On Thu Feb 27 18​:43​:20 2014, jkeenan wrote​:

On Tue Jan 22 10​:31​:03 2013, hanekomu wrote​:

Hi nicomen,

I've already started to work on this. There aren't that many files to
change, as far as I can see.

To get all files that don't require test.pl but do print something
and
are not in the directories-to-
be-excluded as mentioned above​:

$ ack -G '\.t$' -L 'require.*test.pl' | xargs ack -l print | ack -v
'^(base|cmd|comp|opbasic|re)/'

op/sprintf.t
porting/maintainers.t
porting/podcheck.t
run/switchF1.t
run/switchp.t
win32/system.t

The 6 files above all appear to have been "handled", i.e., they were
either converted to using t/test.pl or a comment was added stating why
they were specifically not converted to t/test.pl.

Hence, I don't see anything more to be done on this ticket.

If you disagree with that judgment, please speak up. Otherwise, I
will close the ticket within 7 days.

Thank you very much.
Jim Keenan

I've already worked on op/sprintf.t and porting/maintainers.t (and
changed
Porting/Maintainers.pm to output results in a deterministic order).

Also, I'm going to - as discussed with rjbs on IRC - make the
"chdir/@​INC/require test.pl" code
at the top of each test more consistent across all tests.

So if you don't mind I'd like to continue working on this bug.

James,

I noticed you have "taken" this ticket. Have you begun working on it yet? If not I'd like to take it from you.

Jeff

On IRC, rjbs asked me to review the status of this ticket. I didn't
think anything more needed to be done, so I "took" it mainly so that I
would see it on my list of tickets and close it on the promised schedule.

However, if you think there are other files needing the sort of
migration away from hand-rolled tests which was the original request,
please feel free to list those files and then work on them. If you have
an RT account, you can "take" the ticket as well.

Thank you very much.
Jim Keenan

@p5pRT
Copy link
Author

p5pRT commented Mar 2, 2014

From jeffrey.black@yahoo.com

On Sat Mar 01 15​:27​:10 2014, jkeen@​verizon.net wrote​:

On 3/1/14 9​:01 AM, JB via RT wrote​:

On Thu Feb 27 18​:43​:20 2014, jkeenan wrote​:

On Tue Jan 22 10​:31​:03 2013, hanekomu wrote​:

Hi nicomen,

I've already started to work on this. There aren't that many files
to
change, as far as I can see.

To get all files that don't require test.pl but do print something
and
are not in the directories-to-
be-excluded as mentioned above​:

$ ack -G '\.t$' -L 'require.*test.pl' | xargs ack -l print | ack -v
'^(base|cmd|comp|opbasic|re)/'

op/sprintf.t
porting/maintainers.t
porting/podcheck.t
run/switchF1.t
run/switchp.t
win32/system.t

The 6 files above all appear to have been "handled", i.e., they were
either converted to using t/test.pl or a comment was added stating
why
they were specifically not converted to t/test.pl.

Hence, I don't see anything more to be done on this ticket.

If you disagree with that judgment, please speak up. Otherwise, I
will close the ticket within 7 days.

Thank you very much.
Jim Keenan

I've already worked on op/sprintf.t and porting/maintainers.t (and
changed
Porting/Maintainers.pm to output results in a deterministic order).

Also, I'm going to - as discussed with rjbs on IRC - make the
"chdir/@​INC/require test.pl" code
at the top of each test more consistent across all tests.

So if you don't mind I'd like to continue working on this bug.

James,

I noticed you have "taken" this ticket. Have you begun working on it
yet? If not I'd like to take it from you.

Jeff

On IRC, rjbs asked me to review the status of this ticket. I didn't
think anything more needed to be done, so I "took" it mainly so that I
would see it on my list of tickets and close it on the promised
schedule.

However, if you think there are other files needing the sort of
migration away from hand-rolled tests which was the original request,
please feel free to list those files and then work on them. If you
have
an RT account, you can "take" the ticket as well.

Thank you very much.
Jim Keenan

Jim,

Sorry for the confusion. I believe I may have misinterpreted something I read in perltodo.

"Tasks that only need Perl knowledge
  Migrate t/ from custom TAP generation
  Many tests below t/ still generate TAP by "hand", rather than using library functions. As explained in "TESTING" in perlhack, tests in t/ are written in a particular way to test that more complex constructions actually work before using them routinely. Hence they don't use "Test​::More", but instead there is an intentionally simpler library, t/test.pl. However, quite a few tests in t/ have not been refactored to use it. Refactoring any of these tests, one at a time, is a useful thing TODO."

I thought the following statement meant swapping t/test.pl out for Test​::More. After reading it again I understand.

"Hence they don't use "Test​::More", but instead there is an intentionally simpler library, t/test.pl. However, quite a few tests in t/ have not been refactored to use it."

Jeff

@p5pRT
Copy link
Author

p5pRT commented Mar 4, 2014

From @jkeenan

On Thu Feb 27 18​:43​:20 2014, jkeenan wrote​:

The 6 files above all appear to have been "handled", i.e., they were
either converted to using t/test.pl or a comment was added stating why
they were specifically not converted to t/test.pl.

Hence, I don't see anything more to be done on this ticket.

If you disagree with that judgment, please speak up. Otherwise, I
will close the ticket within 7 days.

Closing as per schedule. If we find any other files using hand-rolled print statements for testing that could reasonably be converted to using t/test.pl, we'll JFDI.

Thank you very much.
Jim Keenan

@p5pRT
Copy link
Author

p5pRT commented Mar 4, 2014

@jkeenan - Status changed from 'open' to 'resolved'

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

1 participant