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

Provide author/release testing targets. #348

Open
FGasper opened this issue Jan 31, 2020 · 9 comments
Open

Provide author/release testing targets. #348

FGasper opened this issue Jan 31, 2020 · 9 comments

Comments

@FGasper
Copy link
Contributor

FGasper commented Jan 31, 2020

It’d be nice to have make authortest set AUTHOR_TESTING=1 then run the tests.

And would it be sensible to change make disttest to set RELEASE_TESTING=1?

@mohawk2
Copy link
Member

mohawk2 commented Jan 31, 2020

I've wanted to make an xtest for a while, which I think would be the same thing as your proposed authortest - that might also be a better name!

@Leont
Copy link
Member

Leont commented Feb 1, 2020

I have been thinking the same actually (but in the context of Module::Build / Module::Build::Tiny). I wouldn't recommend separate targets, as one may want combinations of the several categories (author, release, automated)

@mohawk2
Copy link
Member

mohawk2 commented Feb 1, 2020

In make land, separate targets are how you would combine things - just run each of them.

@Leont
Copy link
Member

Leont commented Feb 2, 2020

In make land, separate targets are how you would combine things - just run each of them.

But they're not different things: they're overlapping things. a make authortest releasetest would run most tests twice.

@haarg
Copy link
Member

haarg commented Feb 4, 2020

For some prior art, Distar implements some simple EUMM extensions along these lines. "Author mode" is determined by checking if META.yml exists, since it is normally only generated inside the dist dir or tarball. In author mode, it automatically adds xt/*.t and xt/*/*.t to the test file list. It also adds a releasetest target, which is roughly equivalent to RELEASE_TESTING=1 make disttest.

I'm not suggesting those as something EUMM should implement, just for ideas.

Also, target names would have to be carefully chosen. Using releasetest would cause problems with what I'm doing in Distar, and there are many dists providing their own authortest target.

@FGasper
Copy link
Contributor Author

FGasper commented Feb 4, 2020

What about alltests, as an expedient to run all tests?

@mohawk2
Copy link
Member

mohawk2 commented Feb 4, 2020

Perhaps xtest gains new life as it doesn't clash with prior art, as far as I know.

make authortest releasetest would run most tests twice.

Not if each of those depended on targets that were the subcomponents. Then those subcomponents would only be run once.

@Leont
Copy link
Member

Leont commented Feb 4, 2020

Not if each of those depended on targets that were the subcomponents. Then those subcomponents would only be run once.

That would involve running the harness separately for each of those subcomponents, IMO that is unnecessarily confusing to the user.

It also assumes that the different categories can be found in different places, which is not necessarily true (author and release tests can also live under t/, protected by an environmental variable check like with Test::Is or Test::DescribeMe)

@haarg
Copy link
Member

haarg commented Feb 4, 2020

Perhaps xtest gains new life as it doesn't clash with prior art, as far as I know.

Prior art

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

4 participants