blob: 99e78ca8350d7e8d31271fab00c056177e516a10 [file] [log] [blame]
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
Deprecated tool for preprocessing tests to determine their DEPENDENCIES.
import optparse, os, sys
import common
def parse_options():
"""Parse command line arguments."""
parser = optparse.OptionParser()
parser.add_option('-a', '--autotest_dir', dest='autotest_dir',
os.path.join(os.path.dirname(__file__), '..')),
help="Directory under which to search for tests."\
" (e.g. /usr/local/autotest). Defaults to '..'")
parser.add_option('-o', '--output_file', dest='output_file',
help='File into which to write collected test info.'\
' Defaults to stdout.')
parser.add_option('-e', '--extra_autotest_dirs',
dest='extra_autotest_dirs', default=None,
help="A list of directories under which to search for "
"extra Autotest tests. Defaults to None.")
options, _ = parser.parse_args()
return options
def main():
"""Main function."""
options = parse_options()
test_deps = {}
if options.output_file:
with open(options.output_file, 'w') as file_obj:
file_obj.write('%r' % test_deps)
print '%r' % test_deps
if __name__ == "__main__":