OSDN Git Service

Make test work when running ndebug.
authorAlex Light <allight@google.com>
Fri, 12 Aug 2016 21:43:48 +0000 (14:43 -0700)
committerAlex Light <allight@google.com>
Fri, 12 Aug 2016 21:43:48 +0000 (14:43 -0700)
Change-Id: Iea58ccef51fddaeae4b1fb7084a7956400a81dfe
Test: ART_TEST_RUN_TEST_NDEBUG=true mma -j40 test-art-host-run-test-900-hello-plugin

test/900-hello-plugin/run
test/etc/run-test-jar
test/run-test

index bb9b415..35b0871 100755 (executable)
 # 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}
index 0ea5d52..d12bd79 100755 (executable)
@@ -60,6 +60,9 @@ while true; do
     if [ "x$1" = "x--quiet" ]; then
         QUIET="y"
         shift
+    elif [ "x$1" = "x-O" ]; then
+        # Ignore this option.
+        shift
     elif [ "x$1" = "x--lib" ]; then
         shift
         if [ "x$1" = "x" ]; then
index edee4ae..621fc24 100755 (executable)
@@ -165,6 +165,7 @@ while true; do
     elif [ "x$1" = "x-O" ]; then
         lib="libart.so"
         testlib="arttest"
+        run_args="${run_args} -O"
         shift
     elif [ "x$1" = "x--dalvik" ]; then
         lib="libdvm.so"