Skip to content

Commit f2e8506

Browse files
committed
tests: Add tests for pre CXX11 ABI
Signed-off-by: Naren Dasan <naren@narendasan.com> Signed-off-by: Naren Dasan <narens@nvidia.com>
1 parent 43039cd commit f2e8506

File tree

3 files changed

+29
-4
lines changed

3 files changed

+29
-4
lines changed

tests/BUILD

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,11 @@ test_suite(
1212
":tests",
1313
"//tests/accuracy:test_accuracy"
1414
]
15+
)
16+
17+
test_suite(
18+
name = "python_api_tests",
19+
tests = [
20+
"//tests/py:test_api"
21+
]
1522
)
Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
config_setting(
2+
name = "use_pre_cxx11_abi",
3+
values = {
4+
"define": "abi=pre_cxx11_abi",
5+
}
6+
)
7+
18
def converter_test(name, visibility=None):
29
native.cc_test(
310
name = name,
@@ -6,8 +13,10 @@ def converter_test(name, visibility=None):
613
deps = [
714
"//tests/util",
815
"//core",
9-
"@libtorch//:libtorch",
1016
"@googletest//:gtest_main",
11-
],
17+
] + select({
18+
":use_pre_cxx11_abi": ["@libtorch_pre_cxx11_abi//:libtorch"],
19+
"//conditions:default": ["@libtorch//:libtorch"],
20+
}),
1221
timeout="short"
1322
)

tests/modules/BUILD

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
config_setting(
2+
name = "use_pre_cxx11_abi",
3+
values = {
4+
"define": "abi=pre_cxx11_abi",
5+
}
6+
)
7+
18
filegroup(
29
name = "jit_models",
310
srcs = glob(["**/*.jit.pt"])
@@ -51,7 +58,9 @@ cc_library(
5158
deps = [
5259
"//cpp/api:trtorch",
5360
"//tests/util",
54-
"@libtorch//:libtorch",
5561
"@googletest//:gtest_main",
56-
],
62+
] + select({
63+
":use_pre_cxx11_abi": ["@libtorch_pre_cxx11_abi//:libtorch"],
64+
"//conditions:default": ["@libtorch//:libtorch"],
65+
}),
5766
)

0 commit comments

Comments
 (0)