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

[test][GWP-ASan] Only add check-gwp_asan when its dependencies are built #89164

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

yingcong-wu
Copy link
Contributor

Currently, check-gwp_asan is added no matter its dependencies are built or not, this is wrong and will cause cmake error when scudo is not built. This patch includes the target in the dependencies check.

@yingcong-wu yingcong-wu changed the title [GWP-ASan] Only add check-gwp_asan when its dependencies are built [test][GWP-ASan] Only add check-gwp_asan when its dependencies are built Apr 18, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Apr 18, 2024

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: Wu Yingcong (yingcong-wu)

Changes

Currently, check-gwp_asan is added no matter its dependencies are built or not, this is wrong and will cause cmake error when scudo is not built. This patch includes the target in the dependencies check.


Full diff: https://github.com/llvm/llvm-project/pull/89164.diff

1 Files Affected:

  • (modified) compiler-rt/test/gwp_asan/CMakeLists.txt (+5-5)
diff --git a/compiler-rt/test/gwp_asan/CMakeLists.txt b/compiler-rt/test/gwp_asan/CMakeLists.txt
index 86260027426feb..eda23cd93d6c37 100644
--- a/compiler-rt/test/gwp_asan/CMakeLists.txt
+++ b/compiler-rt/test/gwp_asan/CMakeLists.txt
@@ -35,9 +35,9 @@ if (COMPILER_RT_INCLUDE_TESTS AND COMPILER_RT_HAS_SCUDO_STANDALONE AND COMPILER_
       ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg.py)
     list(APPEND GWP_ASAN_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME})
   endforeach()
-endif()
 
-add_lit_testsuite(check-gwp_asan "Running the GWP-ASan tests"
-  ${GWP_ASAN_TESTSUITES}
-  DEPENDS ${GWP_ASAN_TEST_DEPS})
-set_target_properties(check-gwp_asan PROPERTIES FOLDER "Compiler-RT Misc")
+  add_lit_testsuite(check-gwp_asan "Running the GWP-ASan tests"
+    ${GWP_ASAN_TESTSUITES}
+    DEPENDS ${GWP_ASAN_TEST_DEPS})
+  set_target_properties(check-gwp_asan PROPERTIES FOLDER "Compiler-RT Misc")
+endif()

@yingcong-wu
Copy link
Contributor Author

Hi @vitalybuka, could you please review this patch? Thanks.

@vitalybuka vitalybuka requested a review from hctim April 18, 2024 19:27
@vitalybuka
Copy link
Collaborator

vitalybuka commented Apr 18, 2024

LGTM, lets give @hctim a chance take a look, and I'll merge tomorrow

@yingcong-wu
Copy link
Contributor Author

Kindly ping @vitalybuka , please remember to merge this.

@vitalybuka vitalybuka merged commit 6884c1f into llvm:main Apr 22, 2024
7 checks passed
@yingcong-wu yingcong-wu deleted the yc/0418-scudo-gwp-asan-test-cmake branch April 23, 2024 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants