Create ArtifactPath function to abstract test paths
When AOS is included as an external repo and renamed, paths have to be
updated. Make a function to handle all this.
Change-Id: If1dfbfb3191809d86da1dca92981b7a0b851c51f
diff --git a/aos/testing/path.cc b/aos/testing/path.cc
new file mode 100644
index 0000000..f999e58
--- /dev/null
+++ b/aos/testing/path.cc
@@ -0,0 +1,16 @@
+#include "aos/testing/path.h"
+#include "absl/strings/str_cat.h"
+
+namespace aos {
+namespace testing {
+
+// 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);
+}
+
+} // namespace testing
+} // namespace aos