- Add README.md for resources in example
- Fix testWithNativePoc ASSUMPTION_FAILURE due to incorrect args
Bug: 431150957
Test: Run configuration "autorepro_nonroot_x86_64" on Android Studio Narwhal 2025.1.1
Change-Id: Ied6123ca3c1b2a8966a3ec192261b0b76e3adfcc
diff --git a/example/submission/hostTest/src/main/java/com/android/security/autorepro_placeholder/HostsideTest.java b/example/submission/hostTest/src/main/java/com/android/security/autorepro_placeholder/HostsideTest.java
index 3d936ae..6aa6d8b 100644
--- a/example/submission/hostTest/src/main/java/com/android/security/autorepro_placeholder/HostsideTest.java
+++ b/example/submission/hostTest/src/main/java/com/android/security/autorepro_placeholder/HostsideTest.java
@@ -68,13 +68,15 @@
*/
@Test
public void testWithNativePoc() throws Exception {
+ final String resourcePath = "AutoReproPlaceholder/res.txt";
+
NativePoc.builder()
// the name of the PoC
.pocName("ndkTest_AutoReproPlaceholder")
// extra files pushed to the device
- .resources("AutoReproPlaceholder/res.txt")
+ .resources(resourcePath)
// command-line arguments for the PoC
- .args("res.txt", "vulnerable")
+ .args(resourcePath, "vulnerable")
// other options allow different linker paths for library shims
.useDefaultLdLibraryPath(true)
// test ends with ASSUMPTION_FAILURE if not EXIT_OK
diff --git a/example/submission/hostTest/src/main/resources/AutoReproPlaceholder/README.md b/example/submission/hostTest/src/main/resources/AutoReproPlaceholder/README.md
new file mode 100644
index 0000000..8179c0d
--- /dev/null
+++ b/example/submission/hostTest/src/main/resources/AutoReproPlaceholder/README.md
@@ -0,0 +1 @@
+## All Hostside java resource files should be placed in this directory