Skip to content

Conversation

EuphoricThinking
Copy link
Contributor

@EuphoricThinking EuphoricThinking commented Sep 2, 2024

The PR is a part of a major fix, which will be provided in multiple files.

Ref. #569

canQuery*(...) are changed to void. The success, failure or the need to skip the tests are determined in the function body using GTEST asserts, which set the appropriate flags for the current test. The flags are checked then in the fixture. The solution is inspired by GTEST docs..

The condition using ::memspaceGetTest::IsSkipped() in memspaceProviderTest is replaced due to its ineffectiveness: it has used the method from superclass for itself, before skipping any tests.

EXPECT_* and ADD_FAILURE() interefere with GTEST_SKIP() when used in a non-void helper function - tests are run in spite of labelling as ,,skipped" by the fixture.

Description

Checklist

  • Code compiles without errors locally
  • All tests pass locally
  • CI workflows execute properly
  • CI workflows, not executed per PR (e.g. Nightly), execute properly
  • New tests added, especially if they will fail without my changes
  • Added/extended example(s) to cover this functionality
  • Extended the README/documentation
  • All newly added source files have a license
  • All newly added source files are referenced in CMake files
  • Logger (with debug/info/... messages) is used

@EuphoricThinking EuphoricThinking requested a review from a team as a code owner September 2, 2024 17:40
@EuphoricThinking EuphoricThinking marked this pull request as draft September 2, 2024 18:05
@EuphoricThinking EuphoricThinking force-pushed the assertspr8 branch 6 times, most recently from 67331e3 to af13501 Compare September 18, 2024 15:17
@EuphoricThinking EuphoricThinking marked this pull request as ready for review September 19, 2024 15:38
canQuery*(...) are changed to void,
since EXPECT_* and ADD_FAILURE() interefere with GTEST_SKIP()
when used in a non-void helper function -
tests are run in spite of labelling as skipped by the fixture.
The success, failure or the need to skip the tests
are determined in the function body using GTEST asserts,
which set the appropriate flags for the current test.
Then the flags are checked in the fixture.

Ref. oneapi-src#569
@bratpiorka bratpiorka requested a review from PatKamin October 7, 2024 09:23
@bratpiorka bratpiorka merged commit 371a6f5 into oneapi-src:main Oct 7, 2024
72 checks passed
@EuphoricThinking EuphoricThinking deleted the assertspr8 branch January 3, 2025 14:55
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.

4 participants