mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-16 04:14:34 +00:00
code_size_compare: check --record-dir properly
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
This commit is contained in:
parent
a279ca9ff8
commit
9e8b671b1c
@ -815,11 +815,11 @@ def main():
|
||||
'optional arguments',
|
||||
'optional arguments to parse for running ' + os.path.basename(__file__))
|
||||
group_optional.add_argument(
|
||||
'--record_dir', type=str, default='code_size_records',
|
||||
'--record-dir', type=str, default='code_size_records',
|
||||
help='directory where code size record is stored. '
|
||||
'(Default: code_size_records)')
|
||||
group_optional.add_argument(
|
||||
'-r', '--comp-dir', type=str, default='comparison',
|
||||
'--comp-dir', type=str, default='comparison',
|
||||
help='directory where comparison result is stored. '
|
||||
'(Default: comparison)')
|
||||
group_optional.add_argument(
|
||||
@ -858,9 +858,14 @@ def main():
|
||||
else:
|
||||
logger.setLevel(logging.DEBUG if comp_args.verbose else logging.INFO)
|
||||
|
||||
if os.path.isfile(comp_args.record_dir):
|
||||
logger.error("record directory: {} is not a directory"
|
||||
.format(comp_args.record_dir))
|
||||
sys.exit(1)
|
||||
if os.path.isfile(comp_args.comp_dir):
|
||||
logger.error("{} is not a directory".format(comp_args.comp_dir))
|
||||
parser.exit()
|
||||
logger.error("comparison directory: {} is not a directory"
|
||||
.format(comp_args.comp_dir))
|
||||
sys.exit(1)
|
||||
|
||||
comp_args.old_rev = CodeSizeCalculator.validate_git_revision(
|
||||
comp_args.old_rev)
|
||||
|
Loading…
Reference in New Issue
Block a user