[llvm] 9762f12 - [Orc] Run the examples as part of the tests

Valentin Churavy via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 30 12:45:39 PDT 2021


Author: Valentin Churavy
Date: 2021-06-30T21:45:16+02:00
New Revision: 9762f12c6c60d7306040dd1717b708763cc803a4

URL: https://github.com/llvm/llvm-project/commit/9762f12c6c60d7306040dd1717b708763cc803a4
DIFF: https://github.com/llvm/llvm-project/commit/9762f12c6c60d7306040dd1717b708763cc803a4.diff

LOG: [Orc] Run the examples as part of the tests

Enable the Orc C-Bindings for testing.

Reviewed By: lhames

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

Added: 
    llvm/test/Examples/OrcV2Examples/orcv2-cbindings-add-object-file.test
    llvm/test/Examples/OrcV2Examples/orcv2-cbindings-basic-usage.test
    llvm/test/Examples/OrcV2Examples/orcv2-cbindings-reflect-process-symbols.test
    llvm/test/Examples/OrcV2Examples/orcv2-cbindings-removable-code.test

Modified: 
    llvm/test/CMakeLists.txt
    llvm/test/lit.cfg.py

Removed: 
    


################################################################################
diff  --git a/llvm/test/CMakeLists.txt b/llvm/test/CMakeLists.txt
index 84be4dd3b3292..7fd52d207df46 100644
--- a/llvm/test/CMakeLists.txt
+++ b/llvm/test/CMakeLists.txt
@@ -162,6 +162,10 @@ if(LLVM_BUILD_EXAMPLES)
     Kaleidoscope-Ch6
     Kaleidoscope-Ch7
     LLJITWithThinLTOSummaries
+    OrcV2CBindingsBasicUsage
+    OrcV2CBindingsAddObjectFile
+    OrcV2CBindingsRemovableCode
+    OrcV2CBindingsReflectProcessSymbols
     )
   if(CMAKE_HOST_UNIX)
     list(APPEND LLVM_TEST_DEPENDS

diff  --git a/llvm/test/Examples/OrcV2Examples/orcv2-cbindings-add-object-file.test b/llvm/test/Examples/OrcV2Examples/orcv2-cbindings-add-object-file.test
new file mode 100644
index 0000000000000..95cb1109e209c
--- /dev/null
+++ b/llvm/test/Examples/OrcV2Examples/orcv2-cbindings-add-object-file.test
@@ -0,0 +1,3 @@
+# RUN: OrcV2CBindingsAddObjectFile 2>&1 | FileCheck %s
+
+# CHECK: 1 + 2 = 3

diff  --git a/llvm/test/Examples/OrcV2Examples/orcv2-cbindings-basic-usage.test b/llvm/test/Examples/OrcV2Examples/orcv2-cbindings-basic-usage.test
new file mode 100644
index 0000000000000..3e7ce3f3b724d
--- /dev/null
+++ b/llvm/test/Examples/OrcV2Examples/orcv2-cbindings-basic-usage.test
@@ -0,0 +1,3 @@
+# RUN: OrcV2CBindingsBasicUsage 2>&1 | FileCheck %s
+
+# CHECK: 1 + 2 = 3

diff  --git a/llvm/test/Examples/OrcV2Examples/orcv2-cbindings-reflect-process-symbols.test b/llvm/test/Examples/OrcV2Examples/orcv2-cbindings-reflect-process-symbols.test
new file mode 100644
index 0000000000000..f52e0325fc80b
--- /dev/null
+++ b/llvm/test/Examples/OrcV2Examples/orcv2-cbindings-reflect-process-symbols.test
@@ -0,0 +1,3 @@
+# RUN: OrcV2CBindingsReflectProcessSymbols 2>&1 | FileCheck %s
+
+# CHECK: 3 * 4 + 5 = 17

diff  --git a/llvm/test/Examples/OrcV2Examples/orcv2-cbindings-removable-code.test b/llvm/test/Examples/OrcV2Examples/orcv2-cbindings-removable-code.test
new file mode 100644
index 0000000000000..fbbb380c9084c
--- /dev/null
+++ b/llvm/test/Examples/OrcV2Examples/orcv2-cbindings-removable-code.test
@@ -0,0 +1,3 @@
+# RUN: OrcV2CBindingsRemovableCode 2>&1 | FileCheck %s
+
+# CHECK: 1 + 2 = 3

diff  --git a/llvm/test/lit.cfg.py b/llvm/test/lit.cfg.py
index b5b8ee9f4d265..e8de805eae715 100644
--- a/llvm/test/lit.cfg.py
+++ b/llvm/test/lit.cfg.py
@@ -182,7 +182,11 @@ def get_asan_rtlib():
     ToolSubst('Kaleidoscope-Ch7', unresolved='ignore'),
     ToolSubst('Kaleidoscope-Ch8', unresolved='ignore'),
     ToolSubst('LLJITWithThinLTOSummaries', unresolved='ignore'),
-    ToolSubst('LLJITWithRemoteDebugging', unresolved='ignore')])
+    ToolSubst('LLJITWithRemoteDebugging', unresolved='ignore'),
+    ToolSubst('OrcV2CBindingsBasicUsage', unresolved='ignore'),
+    ToolSubst('OrcV2CBindingsAddObjectFile', unresolved='ignore'),
+    ToolSubst('OrcV2CBindingsRemovableCode', unresolved='ignore'),
+    ToolSubst('OrcV2CBindingsReflectProcessSymbols', unresolved='ignore')])
 
 llvm_config.add_tool_substitutions(tools, config.llvm_tools_dir)
 


        


More information about the llvm-commits mailing list