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

Make *prove scripts/tests" work. #87

Closed
bschmalhofer opened this issue Jun 14, 2020 · 3 comments
Closed

Make *prove scripts/tests" work. #87

bschmalhofer opened this issue Jun 14, 2020 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@bschmalhofer
Copy link
Contributor

Why can't I simply call prove scripts/tests for running the tests?

@bschmalhofer
Copy link
Contributor Author

This works somewhat now. However there are still strange effects, deep recursion during global destruction, when calling
perl -I . -I Kernel/cpan-lib/ scripts/test/LayoutTicket.t .
Other scripts
perl -I . -I Kernel/cpan-lib/ scripts/test/LayoutTicket.t .
seem to work without much recursion.

bschmalhofer added a commit that referenced this issue Jun 30, 2020
A script that does not use Kernel::System::UnitTest.
Currently not getting along with Dev::UnitTest::Run
bschmalhofer added a commit that referenced this issue Jun 30, 2020
bschmalhofer added a commit that referenced this issue Jun 30, 2020
at least when Kernel::System::UnitTest::Helper is used
bschmalhofer added a commit that referenced this issue Jun 30, 2020
The leading space does not conform to TAP.
bschmalhofer added a commit that referenced this issue Jun 30, 2020
whoever is running the test scripts is responsible for setting up @inc
I suppose this is the most flexible approach.
bschmalhofer added a commit that referenced this issue Jun 30, 2020
bschmalhofer added a commit that referenced this issue Jun 30, 2020
For those scripts that don't have a Helper object.
bschmalhofer added a commit that referenced this issue Jun 30, 2020
Trying to simplify.
bschmalhofer added a commit that referenced this issue Jun 30, 2020
This happened when no DateTime object could be created during global destruction.
bschmalhofer added a commit that referenced this issue Jun 30, 2020
Trying to replicate the behavior in Dev::UnitTest::Run
bschmalhofer added a commit that referenced this issue Jun 30, 2020
as $Helper is usually a lexical var in the test scripts
bschmalhofer added a commit that referenced this issue Jun 30, 2020
No need to turn it back on with 'use strict'
bschmalhofer added a commit that referenced this issue Jun 30, 2020
bschmalhofer added a commit that referenced this issue Jun 30, 2020
This is nasty, as there is no problem with Dev::UnitTest::Run
bschmalhofer added a commit that referenced this issue Jun 30, 2020
This should satisfy scripts/test/AsynchronousExecutor.t
bschmalhofer added a commit that referenced this issue Jun 30, 2020
Less action at a distance.
bschmalhofer added a commit that referenced this issue Jul 1, 2020
A script that does not use Kernel::System::UnitTest.
Currently not getting along with Dev::UnitTest::Run
bschmalhofer added a commit that referenced this issue Jul 1, 2020
bschmalhofer added a commit that referenced this issue Jul 1, 2020
at least when Kernel::System::UnitTest::Helper is used
bschmalhofer added a commit that referenced this issue Jul 1, 2020
The leading space does not conform to TAP.
bschmalhofer added a commit that referenced this issue Jul 1, 2020
whoever is running the test scripts is responsible for setting up @inc
I suppose this is the most flexible approach.
bschmalhofer added a commit that referenced this issue Jul 1, 2020
bschmalhofer added a commit that referenced this issue Jul 1, 2020
For those scripts that don't have a Helper object.
bschmalhofer added a commit that referenced this issue Jul 1, 2020
Trying to simplify.
bschmalhofer added a commit that referenced this issue Jul 1, 2020
This happened when no DateTime object could be created during global destruction.
bschmalhofer added a commit that referenced this issue Jul 1, 2020
Trying to replicate the behavior in Dev::UnitTest::Run
bschmalhofer added a commit that referenced this issue Jul 1, 2020
as $Helper is usually a lexical var in the test scripts
bschmalhofer added a commit that referenced this issue Jul 1, 2020
No need to turn it back on with 'use strict'
bschmalhofer added a commit that referenced this issue Jul 1, 2020
bschmalhofer added a commit that referenced this issue Jul 1, 2020
This is nasty, as there is no problem with Dev::UnitTest::Run
bschmalhofer added a commit that referenced this issue Jul 1, 2020
This should satisfy scripts/test/AsynchronousExecutor.t
bschmalhofer added a commit that referenced this issue Jul 1, 2020
Less action at a distance.
@bschmalhofer bschmalhofer added this to the OTOBO 10.0 milestone Jul 2, 2020
@bschmalhofer bschmalhofer added the enhancement New feature or request label Jul 2, 2020
@bschmalhofer
Copy link
Contributor Author

bschmalhofer commented Jul 7, 2020

Note: For testing in the otobo_web_1 container the Elasticsearch webservice needs to be deactivated.

Testing can be done with:

prove -I . -I Kernel/cpan-lib -r --verbose scripts/test/ > prove_verbose.out 2>&1

TODO:

  • Check whether tests outcome get better or faster when the Daemon is not running

  • Still some instances of: Can't return outside a subroutine

@bschmalhofer
Copy link
Contributor Author

It looks like shutting down the Daemon has no large effect.
Closing the issue now. Specific failures can be handled in dedicated issues.

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

No branches or pull requests

1 participant