Introduce artifact_path() for rust
This makes it so that rust tests inside of AOS do not have to care about
whether the repository is named "aos", "org_frc971", etc. This also
takes the opportunity to fix up the C++ equivalent to not even have the
repo name hard-coded in the library.
Change-Id: Ie3114c6a420fa46c1cc0f7acfe8115232b10eae3
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
diff --git a/aos/testing/path.cc b/aos/testing/path.cc
index cb17c73..b8c4336 100644
--- a/aos/testing/path.cc
+++ b/aos/testing/path.cc
@@ -7,9 +7,7 @@
// Returns the path to the provided artifact which works when built both as an
// external target and in the repo.
std::string ArtifactPath(std::string_view path) {
- // TODO(austin): Don't hard-code the repo name here since it likely will
- // change.
- return absl::StrCat("../org_frc971/", path);
+ return absl::StrCat("../" AOS_REPO_NAME "/", path);
}
} // namespace aos::testing