Skip to content

Commit

Permalink
Add test_suites for downstream integrations (#8)
Browse files Browse the repository at this point in the history
This allows integrating TCP tests into Cruise monorepo. Also merge
`test/AotCompile/BUILD` into `test/BUILD`.
  • Loading branch information
sjain-stanford authored Oct 16, 2023
1 parent 0d42fc5 commit 004bcb9
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 22 deletions.
22 changes: 0 additions & 22 deletions test/AotCompile/BUILD

This file was deleted.

37 changes: 37 additions & 0 deletions test/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
load("@llvm-project//llvm:lit_test.bzl", "lit_test")
load("//tools/aot:aot_compile.bzl", "aot_compile")
load("@rules_cc//cc:defs.bzl", "cc_test")

expand_template(
name = "lit_site_cfg_py",
Expand Down Expand Up @@ -40,10 +42,45 @@ filegroup(
"//:tcp-opt",
"//test:lit_data",
],
tags = ["lit_tests"],
)
for src in glob([
"Conversion/**/*.mlir",
"Dialect/**/*.mlir",
"Pipeline/**/*.mlir",
])
]

aot_compile(
name = "basic_tcp_ops",
tcp_source = "AotCompile/basic_tcp_ops.mlir",
)

cc_test(
name = "AotCompile/test_aot_compiled_basic_tcp_ops",
srcs = ["AotCompile/test_aot_compiled_basic_tcp_ops.cpp"],
tags = ["aot_tests"],
deps = [
":aot_compiled_basic_tcp_ops",
"//tools/aot:abi",
"@googletest//:gtest_main",
],
)

test_suite(
name = "lit_tests",
tags = ["lit_tests"],
)

test_suite(
name = "aot_tests",
tags = ["aot_tests"],
)

test_suite(
name = "all_tests",
tests = [
"//test:aot_tests",
"//test:lit_tests",
],
)

0 comments on commit 004bcb9

Please sign in to comment.