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

More perl test script cleanups #10861

Closed
wants to merge 15 commits into from
Closed

More perl test script cleanups #10861

wants to merge 15 commits into from

Conversation

dfandrich
Copy link
Contributor

This is in preparation for additional refactoring.

This PR series is built on top of PR #10833, so only the most recent 4 commits
are unique to this PR.

Also, add other features that were missing.
These functions scan through the entire test file every time to find the
right section, so they can be slow for large test files.

Ref: #10818
Unlike some other languages that just copy a pointer, perl copies the
entire array contents which takes time for a large array.

Ref: #10818
Namely:
- Verify that this test case should be run
- Start the servers needed to run this test case
- Check that test environment is fine to run this test case
- Prepare the test environment to run this test case
- Run the test command
- Clean up after test command
- Verify test succeeded

Ref: #10818
This takes it from a 1200 line behemoth into something more manageable.
The content and order of the functions is taken almost directly from
singletest() so the diff sans whitespace is quite short.

Ref: #10818
This simplifies error handling in the test verification code and makes
it more consistent.

Ref: #10818
Use the feature map stored in the hash table instead. Most of the
variables were only used only once, to set the value in the hash table.

Ref: #10818
The refactored code calls these functions with the same arguments more
often, so this prevents redundant test case file parsing.

Approved-by: Daniel Stenberg
Ref: #10818
Closes #10833
It's actually been this way since at least 2012 (when a 3-argument open
was added to runtests.pl). Given the lack of complaints in the interim,
it's safe to call this 23 year old perl version the minimum.
Not all warnings are fixed; many are as much stylistic suggestions than
anything and IMHO don't do much to actually improve the code.

Ref: #10818
Closes #10861
The perl 2-argument open has been considered not-quite-deprecated since
the 3-argument form was introduced almost a quarter century ago.
It hadn't been updated in 9 years; it's time.
@github-actions github-actions bot added the tests label Mar 29, 2023
dfandrich added a commit that referenced this pull request Mar 29, 2023
Not all warnings are fixed; many are as much stylistic suggestions than
anything and IMHO don't do much to actually improve the code.

Ref: #10818
Closes #10861
dfandrich added a commit that referenced this pull request Mar 29, 2023
Not all warnings are fixed; many are as much stylistic suggestions than
anything and IMHO don't do much to actually improve the code.

Ref: #10818
Closes #10861
@dfandrich dfandrich closed this in b133f70 Mar 30, 2023
@dfandrich dfandrich deleted the dfandrich/pr10861 branch March 30, 2023 17:00
bch pushed a commit to bch/curl that referenced this pull request Jul 19, 2023
Not all warnings are fixed; many are as much stylistic suggestions than
anything and IMHO don't do much to actually improve the code.

Ref: curl#10818
Closes curl#10861
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

1 participant