Skip to content

Commit 6acc8f3

Browse files
authored
Fix status source code location logic. (#9440)
1 parent 12e77e7 commit 6acc8f3

File tree

9 files changed

+333
-263
lines changed

9 files changed

+333
-263
lines changed

.github/scripts/run_tests.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ function run_torch_xla_cpp_tests() {
5757
#"test_xla_backend_intf"
5858
"test_xla_sharding"
5959
"test_runtime"
60-
"test_status"
6160
"test_status_dont_show_cpp_error_context"
6261
"test_status_show_cpp_error_context"
6362
"test_debug_macros")

BUILD

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ test_suite(
7878
"//test/cpp:test_tensor",
7979
"//test/cpp:test_xla_sharding",
8080
"//test/cpp:test_runtime",
81-
"//test/cpp:test_status",
8281
"//test/cpp:test_status_dont_show_cpp_error_context",
8382
"//test/cpp:test_status_show_cpp_error_context",
8483
"//test/cpp:test_debug_macros",

test/cpp/BUILD

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -159,21 +159,22 @@ ptxla_cc_test(
159159
],
160160
)
161161

162-
ptxla_cc_test(
163-
name = "test_status",
164-
srcs = ["test_status.cpp"],
162+
cc_library(
163+
name = "test_status_common",
164+
hdrs = ["test_status_common.h"],
165165
deps = [
166166
"//torch_xla/csrc:status",
167-
"@com_google_googletest//:gtest_main",
167+
"//torch_xla/csrc/runtime:env_vars",
168+
"@com_google_absl//absl/status:statusor",
169+
"@com_google_googletest//:gtest",
168170
],
169171
)
170172

171173
ptxla_cc_test(
172174
name = "test_status_dont_show_cpp_error_context",
173175
srcs = ["test_status_dont_show_cpp_error_context.cpp"],
174176
deps = [
175-
"//torch_xla/csrc:status",
176-
"//torch_xla/csrc/runtime:env_vars",
177+
":test_status_common",
177178
"@com_google_googletest//:gtest_main",
178179
],
179180
)
@@ -182,8 +183,7 @@ ptxla_cc_test(
182183
name = "test_status_show_cpp_error_context",
183184
srcs = ["test_status_show_cpp_error_context.cpp"],
184185
deps = [
185-
"//torch_xla/csrc:status",
186-
"//torch_xla/csrc/runtime:env_vars",
186+
":test_status_common",
187187
"@com_google_googletest//:gtest_main",
188188
],
189189
)

test/cpp/run_tests.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ if [[ "$RUN_CPP_TESTS" == "cpp_tests" ]]; then
101101
#"test_xla_backend_intf"
102102
"test_xla_sharding"
103103
"test_runtime"
104-
"test_status"
105104
"test_status_dont_show_cpp_error_context"
106105
"test_status_show_cpp_error_context"
107106
"test_debug_macros")

test/cpp/test_status.cpp

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)