[Orc][examples] Add lit ToolSubst for LLJITWithRemoteDebugging example
authorStefan Gränitz <stefan.graenitz@gmail.com>
Wed, 7 Apr 2021 07:44:18 +0000 (09:44 +0200)
committerStefan Gränitz <stefan.graenitz@gmail.com>
Wed, 7 Apr 2021 07:47:04 +0000 (09:47 +0200)
The test case added in 258f055ed936 was lacking two important details for the test infrastructure. ae217bf1f327 added the executable to LLVM_TEST_DEPENDS in CMake to make sure the exectubale gets built before we run the test suite. This patch adds a ToolSubst for the executable in LIT, which replaces the tool invokation in the RUN line with an absolute path. It makes sure we don't run accidentally run some other tool from the user's PATH. The test works without it in case LLVM's main binary directory happens to be the working directory (which is default apparently). Configurations that don't build the examples ignore failures for this ToolSubst (and won't run the test).

Reviewed By: echristo

Differential Revision: https://reviews.llvm.org/D99931

llvm/test/lit.cfg.py

index 2a1ccc2..32793d3 100644 (file)
@@ -177,7 +177,8 @@ tools.extend([
     ToolSubst('Kaleidoscope-Ch6', unresolved='ignore'),
     ToolSubst('Kaleidoscope-Ch7', unresolved='ignore'),
     ToolSubst('Kaleidoscope-Ch8', unresolved='ignore'),
-    ToolSubst('LLJITWithThinLTOSummaries', unresolved='ignore')])
+    ToolSubst('LLJITWithThinLTOSummaries', unresolved='ignore'),
+    ToolSubst('LLJITWithRemoteDebugging', unresolved='ignore')])
 
 llvm_config.add_tool_substitutions(tools, config.llvm_tools_dir)