File tree 2 files changed +8
-2
lines changed
rules/proto_descriptor_set
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,12 @@ namespace {
33
33
34
34
std::string GetRlocation (const std::string& file) {
35
35
static std::unique_ptr<Runfiles> runfiles (Runfiles::CreateForTest ());
36
- return runfiles->Rlocation (file);
36
+ std::string path = runfiles->Rlocation (rulesproto::kWorkspaceRlocation + file);
37
+ std::ifstream input (path, std::ifstream::binary);
38
+ if (!input) {
39
+ path = runfiles->Rlocation (rulesproto::kWorkspaceRlocationBzlmod + file);
40
+ }
41
+ return path;
37
42
}
38
43
39
44
template <typename T, typename K>
@@ -66,7 +71,7 @@ void AssertFileDescriptorSetContains(
66
71
const std::vector<std::string>& expected_proto_files) {
67
72
std::vector<std::string> actual_proto_files =
68
73
ReadFileDescriptorSet (
69
- GetRlocation (rulesproto:: kWorkspaceRlocation + path));
74
+ GetRlocation (path));
70
75
EXPECT_EQ (expected_proto_files, actual_proto_files);
71
76
}
72
77
Original file line number Diff line number Diff line change 22
22
namespace rulesproto {
23
23
24
24
constexpr char kWorkspaceRlocation [] = " rules_proto/" ;
25
+ constexpr char kWorkspaceRlocationBzlmod [] = " __main__/" ;
25
26
26
27
} // namespace rulesproto
You can’t perform that action at this time.
0 commit comments