Add new option build_type to packager_test.py
Change-Id: Ifb1109b48e2d93e81561c3e71c5512052851bb56
This commit is contained in:
parent
62a70e71ee
commit
43d5a9ef6e
|
@ -18,13 +18,12 @@ import test_env
|
|||
class PackagerApp(object):
|
||||
"""Main integration class for testing the packager binary."""
|
||||
|
||||
def __init__(self, build_type='Debug'):
|
||||
self.build_dir = os.path.join(test_env.SRC_DIR, 'out', build_type)
|
||||
def __init__(self):
|
||||
self.build_dir = os.path.join(test_env.SRC_DIR, 'out',
|
||||
test_env.options.build_type)
|
||||
self.binary = os.path.join(self.build_dir, 'packager')
|
||||
|
||||
def BuildSrc(self, clean=False):
|
||||
if clean:
|
||||
return subprocess.call(['ninja', '-C', self.build_dir, '-t', 'clean'])
|
||||
def BuildSrc(self):
|
||||
return subprocess.call(['ninja', '-C', self.build_dir])
|
||||
|
||||
def DumpStreamInfo(self, stream):
|
||||
|
|
|
@ -25,6 +25,10 @@ SRC_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../..')
|
|||
|
||||
# Parse arguments and calculate dynamic global objects and attributes.
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
parser.add_argument('--build_type', default='Debug')
|
||||
parser.add_argument('--test_update_golden_files', default=0, type=int)
|
||||
|
||||
aes = parser.add_argument_group(
|
||||
'aes flags',
|
||||
'These flags are required to enable AES signed encryption tests.')
|
||||
|
@ -34,7 +38,6 @@ rsa = parser.add_argument_group(
|
|||
'rsa flags',
|
||||
'These flags are required to enable RSA signed encryption tests.')
|
||||
rsa.add_argument('--rsa_signing_key_path')
|
||||
parser.add_argument('--test_update_golden_files', default=0, type=int)
|
||||
|
||||
options, args = parser.parse_known_args()
|
||||
sys.argv[1:] = args
|
||||
|
|
Loading…
Reference in New Issue