-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
fix(build): Fix event tests, improve buildDeps
#6773
Merged
Merged
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
- Fix actual syntax errors in imports in event_marker_move_test.js and event_selected.test.js, which were preventing those tests from being run. - Remove suite.only directives in those tests that would prevent all the other tests from running.
- Run closure-make-deps only once, instead of separately for core/ and tests/. - Specify a larger exec maxBuffer size, to ensure output and diagnostics are not truncated. - Change stderr filtering in buildDeps to filter out bounded generics messages and blank lines. - Attempt to suppress warnings in stderr output when closure-make-deps returns a non-zero exit code. Unfortunately, there seems to be a race condition which usually the stderr argument to the exec callback not to contain the complete output, so in that case print a helpful message. - Have buildDeps just return a Promise instead of using a callback.
NeilFraser
reviewed
Jan 20, 2023
scripts/gulpfiles/build_tasks.js
Outdated
/** | ||
* Log unexpected diagnostics, after removing expected warnings. | ||
* | ||
* @param {string} test Standard error output from closure-make-deps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/test/text
NeilFraser
approved these changes
Jan 20, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the @param typo, LGTM.
maribethb
changed the title
fix(builld): Fix event tests, improve
fix(build): Fix event tests, improve Jan 25, 2023
buildDeps
buildDeps
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.
The basics
npm run format
andnpm run lint
The details
Resolves
npm test
output had become increasingly cluttered with miscellaneous WARNINGs fromclosure-make-deps
. Investigating this, it turned out that two recently-added test files were not being run at all.Proposed Changes
Fix actual syntax errors in
import
s inevent_marker_move_test.js
andevent_selected.test.js
, which were preventing those tests from being run.Remove
suite.only
directives in those tests that would prevent all the other tests from running.Run
closure-make-deps
only once, instead of separately forcore/
andtests/
.Specify a larger
exec
maxBuffer
size, to ensure output and diagnostics are not truncated.Change
stderr
filtering inbuildDeps
to filter out bounded generics messages and blank lines.Attempt to suppress warnings in
stderr
output whenclosure-make-deps
returns a non-zero exit code.Unfortunately, there seems to be a race condition which usually causes the
stderr
argument to the exec callback not to contain the complete output, so in that case print a helpful message.Have
buildDeps
just return aPromise
instead of using a callback.Behaviour Before Change
Two of the tests were not being run.
Behaviour After Change
All tests are run;
buildDeps
runs about twice as fast as before.Test Coverage
Improved.