Skip to content

Commit

Permalink
Change SKIP code value to reduce the chance of clashing (#1055)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfod authored Aug 31, 2023
1 parent 4dcc41c commit e627dac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cmake/AwsTestHarness.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ define_property(GLOBAL PROPERTY AWS_TEST_CASES BRIEF_DOCS "Test Cases" FULL_DOCS
set(AWS_TEST_CASES "" CACHE INTERNAL "Test cases valid for this configuration")

# The return value for the skipped test cases. Refer to the return code defined in aws_test_harness.h:
# #define SKIP (1)
set(SKIP_RETURN_CODE_VALUE 1)
# #define SKIP (103)
set(SKIP_RETURN_CODE_VALUE 103)

# Registers a test case by name (the first argument to the AWS_TEST_CASE macro in aws_test_harness.h)
macro(add_test_case name)
Expand Down
8 changes: 5 additions & 3 deletions include/aws/testing/aws_test_harness.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,11 @@ static int total_skip;

#define SUCCESS (0)
#define FAILURE (-1)
/* The skip code returned to ctest to indicate the test is skipped. Refer to cmake doc:
* https://cmake.org/cmake/help/latest/prop_test/SKIP_RETURN_CODE.html */
#define SKIP (1)
/* The exit code returned to ctest to indicate the test is skipped. Refer to cmake doc:
* https://cmake.org/cmake/help/latest/prop_test/SKIP_RETURN_CODE.html
* The value has no special meaning, it's just an arbitrary exit code reducing the chance of clashing with exit codes
* that may be returned from various tools (e.g. sanitizer). */
#define SKIP (103)

#define POSTSKIP_INTERNAL() \
do { \
Expand Down

0 comments on commit e627dac

Please sign in to comment.