skpbench: remove --path flag
authorcsmartdalton <csmartdalton@google.com>
Wed, 9 Nov 2016 21:34:53 +0000 (16:34 -0500)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Thu, 10 Nov 2016 12:52:14 +0000 (12:52 +0000)
Replaces the confusing --path flag with a positional argument that
gives the path to the skpbench binary.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4635

Change-Id: I2b5eeca61ec85e7fe45fd3370625eddf34a2fd0e
Reviewed-on: https://skia-review.googlesource.com/4635
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>

tools/skpbench/skpbench.py

index 372d66f..42263f0 100755 (executable)
@@ -29,13 +29,13 @@ unacceptable stddev.
 
 """)
 
+__argparse.add_argument('skpbench',
+    help="path to the skpbench binary")
 __argparse.add_argument('--adb',
     action='store_true', help="execute skpbench over adb")
 __argparse.add_argument('-s', '--device-serial',
     help="if using adb, ID of the specific device to target "
          "(only required if more than 1 device is attached)")
-__argparse.add_argument('-p', '--path',
-    help="directory to execute ./skpbench from")
 __argparse.add_argument('-m', '--max-stddev',
     type=float, default=4,
     help="initial max allowable relative standard deviation")
@@ -97,7 +97,7 @@ class SubprocessMonitor(Thread):
     self._queue.put(Message(Message.EXIT))
 
 class SKPBench:
-  ARGV = ['skpbench', '--verbosity', str(FLAGS.verbosity)]
+  ARGV = [FLAGS.skpbench, '--verbosity', str(FLAGS.verbosity)]
   if FLAGS.duration:
     ARGV.extend(['--duration', str(FLAGS.duration)])
   if FLAGS.sample_ms:
@@ -106,13 +106,11 @@ class SKPBench:
     ARGV.extend(['--gpuClock', 'true'])
   if FLAGS.fps:
     ARGV.extend(['--fps', 'true'])
-  if FLAGS.path:
-    ARGV[0] = _path.join(FLAGS.path, ARGV[0])
   if FLAGS.adb:
     if FLAGS.device_serial is None:
-      ARGV = ['adb', 'shell'] + ARGV
+      ARGV[:0] = ['adb', 'shell']
     else:
-      ARGV = ['adb', '-s', FLAGS.device_serial, 'shell'] + ARGV
+      ARGV[:0] = ['adb', '-s', FLAGS.device_serial, 'shell']
 
   @classmethod
   def print_header(cls):