-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
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.
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.
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.