Use relative paths instead of full paths in the vmbase test
Soong deploys data files into the same folder as the test binary, so the
relative paths should be sufficient and make the test less brittle.
Filepaths for writeable files are affected - they are written into the specific test folder
instead of the parent:
- before: /data/local/tmp/vmbase_example.integration_test/empty_disk.img
- after: /data/local/tmp/vmbase_example.integration_test/arm64/empty_disk.img
This should not affect the test.
Bug: 350479879
Test: v2/android-kvm-team/avf_presubmit_tests
Change-Id: Ib877d9fc893e36cab7ebce4111a3a27ca02deb12
diff --git a/vmbase/example/tests/test.rs b/vmbase/example/tests/test.rs
index 4dc6aec..8f9fafc 100644
--- a/vmbase/example/tests/test.rs
+++ b/vmbase/example/tests/test.rs
@@ -31,11 +31,9 @@
};
use vmclient::{DeathReason, VmInstance};
-const VMBASE_EXAMPLE_PATH: &str =
- "/data/local/tmp/vmbase_example.integration_test/arm64/vmbase_example.bin";
-const TEST_DISK_IMAGE_PATH: &str = "/data/local/tmp/vmbase_example.integration_test/test_disk.img";
-const EMPTY_DISK_IMAGE_PATH: &str =
- "/data/local/tmp/vmbase_example.integration_test/empty_disk.img";
+const VMBASE_EXAMPLE_PATH: &str = "vmbase_example.bin";
+const TEST_DISK_IMAGE_PATH: &str = "test_disk.img";
+const EMPTY_DISK_IMAGE_PATH: &str = "empty_disk.img";
/// Runs the vmbase_example VM as an unprotected VM via VirtualizationService.
#[test]