[infra] Add debug mode support to pub_integration_test.

This is follow-up to https://dart-review.googlesource.com/c/sdk/+/87921.

Change-Id: I32eca90b5b4f708b9238f1aa475b967fd5c242fd
Reviewed-on: https://dart-review.googlesource.com/c/87984
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
This commit is contained in:
Alexander Aprelev 2018-12-21 23:47:23 +00:00 committed by commit-bot@chromium.org
parent 0b22689f21
commit 0a0ee50501
2 changed files with 15 additions and 2 deletions

View file

@ -3,6 +3,7 @@
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
import optparse
import os
import subprocess
import sys
@ -16,10 +17,19 @@ dependencies:
"""
def Main():
parser = optparse.OptionParser()
parser.add_option('--mode', action='store', dest='mode', type='string',
default='release')
(options, args) = parser.parse_args()
out_dir_subfolder = 'DebugX64' if options.mode == 'debug' else 'ReleaseX64'
out_dir = 'xcodebuild' if sys.platform == 'darwin' else 'out'
extension = '' if not sys.platform == 'win32' else '.bat'
pub = os.path.abspath(
'%s/ReleaseX64/dart-sdk/bin/pub%s' % (out_dir, extension))
'%s/%s/dart-sdk/bin/pub%s' % (out_dir, out_dir_subfolder, extension))
print(pub)
working_dir = tempfile.mkdtemp()
try:

View file

@ -1657,7 +1657,10 @@
},
{
"name": "pub integration tests",
"script": "tools/bots/pub_integration_test.py"
"script": "tools/bots/pub_integration_test.py",
"arguments": [
"--mode=${mode}"
]
}
]
},