mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-08 01:36:47 +08:00
Fix libyuv_tests.py to handle recent Chromium changes.
This CL contains the same changes as in WebRTC revision 4957 and r4959. This will make the tests run properly on the memcheck and tsan bots again. TEST=compiled and successfully ran from the parent dir of trunk: trunk/tools/valgrind-libyuv/libyuv_tests.sh --test libyuv_unittest --tool memcheck --target Release --build-dir trunk/out TBR=fbarchard@google.com Review URL: https://webrtc-codereview.appspot.com/4049004 git-svn-id: http://libyuv.googlecode.com/svn/trunk@860 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
parent
a1b5a27f79
commit
3d34bd6f71
@ -73,9 +73,10 @@ class LibyuvTest(chrome_tests.ChromeTests):
|
||||
def main(_):
|
||||
parser = optparse.OptionParser('usage: %prog -b <dir> -t <test> <test args>')
|
||||
parser.disable_interspersed_args()
|
||||
parser.add_option('-b', '--build_dir',
|
||||
parser.add_option('-b', '--build-dir',
|
||||
help=('Location of the compiler output. Can only be used '
|
||||
'when the test argument does not contain this path.'))
|
||||
parser.add_option("--target", help="Debug or Release")
|
||||
parser.add_option('-t', '--test', help='Test to run.')
|
||||
parser.add_option('', '--baseline', action='store_true', default=False,
|
||||
help='Generate baseline data instead of validating')
|
||||
@ -104,6 +105,11 @@ def main(_):
|
||||
if not options.test:
|
||||
parser.error('--test not specified')
|
||||
|
||||
# Support build dir both with and without the target.
|
||||
if (options.target and options.build_dir and
|
||||
not options.build_dir.endswith(options.target)):
|
||||
options.build_dir = os.path.join(options.build_dir, options.target)
|
||||
|
||||
# If --build_dir is provided, prepend it to the test executable if needed.
|
||||
test_executable = options.test
|
||||
if options.build_dir and not test_executable.startswith(options.build_dir):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user