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.rs b/aos/testing/path.rs
new file mode 100644
index 0000000..c8da1e9
--- /dev/null
+++ b/aos/testing/path.rs
@@ -0,0 +1,9 @@
+use std::path::{Path, PathBuf};
+
+/// Returns the correct path for a data file within AOS, accounting for whether AOS is
+/// imported as an external repository.
+pub fn artifact_path(path: &Path) -> PathBuf {
+    Path::new("..")
+        .join(Path::new(env!("AOS_REPO_NAME")))
+        .join(path)
+}