twister: minor cleanups in main script
Move code around in the main script and cleanup some of the options. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
e5c2e797c9
commit
1084869634
1 changed files with 6 additions and 5 deletions
|
@ -805,6 +805,10 @@ structure in the main Zephyr tree: boards/<arch>/<board_name>/""")
|
||||||
if not options.coverage_platform:
|
if not options.coverage_platform:
|
||||||
options.coverage_platform = options.platform
|
options.coverage_platform = options.platform
|
||||||
|
|
||||||
|
if options.enable_valgrind and not shutil.which("valgrind"):
|
||||||
|
logger.error("valgrind enabled but valgrind executable not found")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
return options
|
return options
|
||||||
|
|
||||||
def setup_logging(outdir, log_file, verbose, timestamps):
|
def setup_logging(outdir, log_file, verbose, timestamps):
|
||||||
|
@ -885,8 +889,8 @@ def main():
|
||||||
setup_logging(options.outdir, options.log_file, VERBOSE, options.timestamps)
|
setup_logging(options.outdir, options.log_file, VERBOSE, options.timestamps)
|
||||||
|
|
||||||
if options.size:
|
if options.size:
|
||||||
|
from twister.size_calc import SizeCalculator
|
||||||
for fn in options.size:
|
for fn in options.size:
|
||||||
from twister.size_calc import SizeCalculator
|
|
||||||
size_report(SizeCalculator(fn, []))
|
size_report(SizeCalculator(fn, []))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -903,10 +907,6 @@ def main():
|
||||||
hwm.dump(connected_only=True)
|
hwm.dump(connected_only=True)
|
||||||
return
|
return
|
||||||
|
|
||||||
if options.enable_valgrind and not shutil.which("valgrind"):
|
|
||||||
logger.error("valgrind enabled but valgrind executable not found")
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
if options.subset:
|
if options.subset:
|
||||||
subset, sets = options.subset.split("/")
|
subset, sets = options.subset.split("/")
|
||||||
if int(subset) > 0 and int(sets) >= int(subset):
|
if int(subset) > 0 and int(sets) >= int(subset):
|
||||||
|
@ -917,6 +917,7 @@ def main():
|
||||||
|
|
||||||
env = TwisterEnv(options)
|
env = TwisterEnv(options)
|
||||||
env.discover()
|
env.discover()
|
||||||
|
|
||||||
tplan = TestPlan(options.board_root, options.testsuite_root, env, options.outdir)
|
tplan = TestPlan(options.board_root, options.testsuite_root, env, options.outdir)
|
||||||
|
|
||||||
# Set testplan options from command line.
|
# Set testplan options from command line.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue