Make test work when running ndebug.
Change-Id: Iea58ccef51fddaeae4b1fb7084a7956400a81dfe
Test: ART_TEST_RUN_TEST_NDEBUG=true mma -j40 test-art-host-run-test-900-hello-plugin
diff --git a/test/900-hello-plugin/run b/test/900-hello-plugin/run
index bb9b415..35b0871 100755
--- a/test/900-hello-plugin/run
+++ b/test/900-hello-plugin/run
@@ -14,7 +14,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+plugin=libartagentd.so
+if [[ "$@" == *"-O"* ]]; then
+ plugin=libartagent.so
+fi
./default-run "$@" --experimental agents \
--experimental runtime-plugins \
- --runtime-option -agentpath:libartagentd.so=test_900 \
- --android-runtime-option -Xplugin:libartagentd.so
+ --runtime-option -agentpath:${plugin}=test_900 \
+ --android-runtime-option -Xplugin:${plugin}