[mlir] Add test to check if standalone dialect is registered
authorMarius Brehler <marius.brehler@iml.fraunhofer.de>
Thu, 28 May 2020 22:31:28 +0000 (00:31 +0200)
committerJean-Michel Gorius <jean-michel.gorius@ens-rennes.fr>
Thu, 28 May 2020 22:34:34 +0000 (00:34 +0200)
Summary: Add a test to check if the standalone dialect is registered within standalone-opt. Similar to the mlir-opt commandline.mlir test.

Reviewers: Kayjukh, stephenneuendorffer

Reviewed By: Kayjukh

Subscribers: mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, Joonsoo, grosul1, frgossen, jurahul, llvm-commits

Tags: #llvm

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

mlir/examples/standalone/test/Standalone/standalone-opt.mlir [new file with mode: 0644]
mlir/test/Examples/standalone/test.toy

diff --git a/mlir/examples/standalone/test/Standalone/standalone-opt.mlir b/mlir/examples/standalone/test/Standalone/standalone-opt.mlir
new file mode 100644 (file)
index 0000000..fac0814
--- /dev/null
@@ -0,0 +1,3 @@
+// RUN: standalone-opt --show-dialects | FileCheck %s
+// CHECK: Registered Dialects:
+// CHECK: standalone
index 034fd93..1614279 100644 (file)
@@ -1,4 +1,4 @@
 # RUN: %cmake %mlir_src_root/examples/standalone -DCMAKE_CXX_COMPILER=%host_cxx -DCMAKE_C_COMPILER=%host_cc -DMLIR_DIR=%llvm_lib_dir/cmake/mlir ; %cmake --build . --target check-standalone | tee %t | FileCheck %s
 
-# CHECK: Expected Passes: 2
+# CHECK: Expected Passes: 3
 # UNSUPPORTED: windows, android