OSDN Git Service

Replace use of ro.monkey with ro.test_harness.
authorBrett Chabot <brettchabot@android.com>
Sun, 9 Jan 2011 21:44:25 +0000 (13:44 -0800)
committerBrett Chabot <brettchabot@android.com>
Sun, 9 Jan 2011 22:11:50 +0000 (14:11 -0800)
Bug 3329873

Change-Id: Ia681803c3d0b0afeceb178b8314c9d7227d99355

cmds/monkey/src/com/android/commands/monkey/Monkey.java
testrunner/adb_interface.py
tools/labpretest/labpretest.sh

index 2f14a26..18cf19d 100644 (file)
@@ -452,9 +452,6 @@ public class Monkey {
      * @param args The command-line arguments
      */
     public static void main(String[] args) {
-        // Set ro.monkey if it's not set yet.
-        SystemProperties.set("ro.monkey", "true");
-
         // Set the process name showing in "ps" or "top"
         Process.setArgV0("com.android.commands.monkey");
 
@@ -551,13 +548,13 @@ public class Monkey {
             mCountEvents = false;
         } else if (mScriptFileNames != null && mScriptFileNames.size() > 1) {
             if (mSetupFileName != null) {
-                mEventSource = new MonkeySourceRandomScript(mSetupFileName, 
+                mEventSource = new MonkeySourceRandomScript(mSetupFileName,
                         mScriptFileNames, mThrottle, mRandomizeThrottle, mRandom,
                         mProfileWaitTime, mDeviceSleepTime, mRandomizeScript);
                 mCount++;
             } else {
                 mEventSource = new MonkeySourceRandomScript(mScriptFileNames,
-                        mThrottle, mRandomizeThrottle, mRandom, 
+                        mThrottle, mRandomizeThrottle, mRandom,
                         mProfileWaitTime, mDeviceSleepTime, mRandomizeScript);
             }
             mEventSource.setVerbose(mVerbose);
index 1928c73..3bd4396 100755 (executable)
@@ -465,7 +465,7 @@ class AdbInterface:
     output = ""
     error = None
     if runtime_restart:
-      self.SendShellCommand("setprop ro.monkey 1", retry_count=retry_count)
+      self.SendShellCommand("setprop ro.test_harness 1", retry_count=retry_count)
       # manual rest bootcomplete flag
       self.SendShellCommand("setprop dev.bootcomplete 0",
                             retry_count=retry_count)
index 62238f0..5db7960 100755 (executable)
@@ -531,8 +531,8 @@ for ((loop=1 ; loop <= $COUNT ; loop++ )) ; do
   #preping device for monkey run
   log_print "setting adb root"
   adb_command root
-  log_print "setting ro.monkey property"
-  adb_command shell setprop ro.monkey 1
+  log_print "setting ro.test_harness property"
+  adb_command shell setprop ro.test_harness 1
 
   log_print "waiting for device to finish booting"
   result=$($ADB -s $device shell getprop dev.bootcomplete)