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

Add a way to skip a test #1012

Merged
merged 4 commits into from
Apr 14, 2023
Merged

Add a way to skip a test #1012

merged 4 commits into from
Apr 14, 2023

Conversation

xiazhvera
Copy link
Contributor

@xiazhvera xiazhvera commented Apr 7, 2023

Issue #, if available:

Description of changes:
The test case can be skipped if it returned AWS_OP_SKIP.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov-commenter
Copy link

codecov-commenter commented Apr 7, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.03 ⚠️

Comparison is base (cfaa904) 81.97% compared to head (43cf2f4) 81.95%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1012      +/-   ##
==========================================
- Coverage   81.97%   81.95%   -0.03%     
==========================================
  Files          52       52              
  Lines        5569     5568       -1     
==========================================
- Hits         4565     4563       -2     
- Misses       1004     1005       +1     

see 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -62,9 +62,24 @@ static int s_cunit_failure_message0(
s_cunit_failure_message0(FAIL_PREFIX, func, file, line, format, #__VA_ARGS__)

static int total_failures;
static int total_skip;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The value reserved to record the total skipped tests count. Current not in use.

include/aws/common/error.h Outdated Show resolved Hide resolved
include/aws/testing/aws_test_harness.h Outdated Show resolved Hide resolved
cmake/AwsTestHarness.cmake Show resolved Hide resolved

#define SUCCESS (0)
#define FAILURE (-1)
#define SKIP (1)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The skip code returned to cmake has to be in range [0,255]. Refer to cmake doc: https://cmake.org/cmake/help/latest/prop_test/SKIP_RETURN_CODE.html

@xiazhvera xiazhvera merged commit ffb14f9 into main Apr 14, 2023
@xiazhvera xiazhvera deleted the skip_test branch April 14, 2023 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants