Fix Toy Ch3 testing with CMake

Mainly a missing dependency caused the tests to pass if one already built
    the repo, but not from a clean (or incremental) build.

--

PiperOrigin-RevId: 241852313
This commit is contained in:
Mehdi Amini 2019-04-03 19:16:32 -07:00 committed by Mehdi Amini
parent f0a328b6d5
commit 092f3facad
3 changed files with 4 additions and 0 deletions

View File

@ -30,6 +30,7 @@ if(LLVM_BUILD_EXAMPLES)
list(APPEND MLIR_TEST_DEPENDS
toyc-ch1
toyc-ch2
toyc-ch3
)
endif()

View File

@ -1,3 +1,5 @@
# RUN: toyc-ch3 %s -emit=mlir 2>&1 | FileCheck %s
def main() {
var a<2, 2> = 5.5;
print(a);

View File

@ -59,6 +59,7 @@ tools = [
tools.extend([
ToolSubst('toy-ch1', unresolved='ignore'),
ToolSubst('toy-ch2', unresolved='ignore'),
ToolSubst('toy-ch3', unresolved='ignore'),
])
llvm_config.add_tool_substitutions(tools, tool_dirs)