-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
test: enable marking of failing coverage tests #25671
Changes from 3 commits
2a45db5
58013ef
9d0c898
c27dd17
a48bc9f
f7b5b67
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -226,7 +226,8 @@ coverage-test: coverage-build | |
$(RM) out/$(BUILDTYPE)/obj.target/node_lib/gen/*.gcda | ||
$(RM) out/$(BUILDTYPE)/obj.target/node_lib/src/*.gcda | ||
$(RM) out/$(BUILDTYPE)/obj.target/node_lib/src/tracing/*.gcda | ||
-NODE_V8_COVERAGE=out/$(BUILDTYPE)/.coverage $(MAKE) $(COVTESTS) | ||
-NODE_V8_COVERAGE=out/$(BUILDTYPE)/.coverage FLAKY_TESTS="dontcare" \ | ||
TEST_CI_ARGS="$(TEST_CI_ARGS) --type=coverage" $(MAKE) $(COVTESTS) | ||
$(MAKE) coverage-report-js | ||
-(cd out && "../gcovr/scripts/gcovr" --gcov-exclude='.*deps' \ | ||
--gcov-exclude='.*usr' -v -r Release/obj.target \ | ||
|
@@ -277,7 +278,7 @@ coverage-run-js: | |
$(RM) -r out/$(BUILDTYPE)/.coverage | ||
$(MAKE) coverage-build-js | ||
-NODE_V8_COVERAGE=out/$(BUILDTYPE)/.coverage CI_SKIP_TESTS=$(COV_SKIP_TESTS) \ | ||
$(MAKE) jstest | ||
TEST_CI_ARGS="$(TEST_CI_ARGS) --type=coverage" $(MAKE) jstest | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it would probably make sense to also specify:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. k will add. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. based on @refack's comment I'll leave out setting dontcare completely for now. |
||
$(MAKE) coverage-report-js | ||
|
||
.PHONY: test | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
prefix js-native-api | ||
|
||
# To mark a test as flaky, list the test name in the appropriate section | ||
# below, without ".js", followed by ": PASS,FLAKY". Example: | ||
# sample-test : PASS,FLAKY | ||
|
||
[true] # This section applies to all platforms | ||
|
||
[$system==win32] | ||
|
||
[$system==linux] | ||
|
||
[$system==macos] | ||
|
||
[$arch==arm || $arch==arm64] | ||
|
||
[$system==solaris] # Also applies to SmartOS | ||
|
||
[$system==freebsd] | ||
|
||
[$system==aix] | ||
|
||
[$type==coverage] | ||
test_function/test: PASS,FAIL,CRASH | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like this approach to isolating flaky tests a lot 👍 first saw it in the blink codebase. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You might consider putting this in https://github.com/nodejs/node/blob/master/test/root.status There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You learn something new every day. I was not aware of that option. I like having the list in one place so will move there. |
||
test_general/testFinalizer: PASS,FAIL,CRASH |
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.
is this just to prevent
FLAKY_TESTS
from being overridden by an environment variable, so thatjs-native-api.status
is used?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.
by default it is "run" which means it will fail if the tests crashes, this means if the test is marked flaky it will still not be marked as failed.
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.
Can you double check that... Since you are not marking the tests
FLAKY
? Maybe we should keep this consistent with other CI target and just usedontcare
as an override-able default?Can we now remove the
-
prefix?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.
I was on the fence on overriding the dontcare. I think I'll remove for now.
In terms of removing - I don't want to do that until we have a job running (similar to the linter) in the main regression job. I want to avoid the case were a test goes in that breaks coverage and then somebody else (people keeing coverage going) are expected to fix it. As soon as we get the coverage check as part of the regression PR then we will remove it.
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.
On the dontcare. To clarify I added that when I marked them as FLAKY but that did not actually work because the builds would then always be yellow which I don't think we wanted. Given that we'd probably we probably have to use FAIL or CRASH I removed the setting of dontcare.