[compiler-rt] [compiler-rt] Make sure `memprof` and `ctx_profile` unittests run (PR #89814)

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 24 12:07:33 PDT 2024


================
@@ -0,0 +1,22 @@
+ at LIT_SITE_CFG_IN_HEADER@
+
+import os
+import platform
+import re
+import shlex
+
+# Load common config for all compiler-rt unit tests.
+lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/unittests/lit.common.unit.configured")
+
+# Setup config name.
+config.name = 'CtxProfile-Unit'
+config.target_arch = "@arch@"
+assert config.target_arch == 'x86_64'
+
+config.test_exec_root = os.path.join("@COMPILER_RT_BINARY_DIR@",
+                                     "lib", "ctx_profile", "tests")
+
+config.test_source_root = config.test_exec_root
+
+if config.enable_per_target_runtime_dir and config.target_arch != config.host_arch:
----------------
mtrofin wrote:

I'm actually not even sure this is needed - i386 tests won't run because neither memprof nor ctx_profile are enabled for i386. Maybe I can make this an assert.

https://github.com/llvm/llvm-project/pull/89814


More information about the llvm-commits mailing list