Skip to content

Commit 332b106

Browse files
committed
Fix incorrect logged path of checkout_externals in test_sys_checkout: it was basically the parent of the current directory, which varies throughout the test. (it called abspath with '{0}/../../', which adds arbitrary and not-interpolated subdir '{0}' to the path, then removes it and removes one more level).
This change dates back to 6 years ago: ESMCI/manage_externals@3009801 It never mattered since this command line is only for debugging.
1 parent 932a749 commit 332b106

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

test/test_sys_checkout.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -502,14 +502,16 @@ def _execute_checkout_in_dir(dirname, args, debug_env=''):
502502
"""
503503
cwd = os.getcwd()
504504

505-
# Construct a command line for reproducibility; this command is not actually
506-
# executed in the test.
507-
checkout_path = os.path.abspath('{0}/../../checkout_externals')
505+
# Construct a command line for reproducibility; this command is not
506+
# actually executed in the test.
508507
os.chdir(dirname)
509508
cmdline = ['--externals', CFG_NAME, ]
510509
cmdline += args
511-
manual_cmd = ('Test cmd:\npushd {cwd}; {env} {checkout} {args}'.format(
512-
cwd=dirname, checkout=checkout_path, env=debug_env, args=' '.join(cmdline)))
510+
manual_cmd = ('Running equivalent of:\n'
511+
'pushd {dirname}; '
512+
'{debug_env} /path/to/checkout_externals {args}'.format(
513+
dirname=dirname, debug_env=debug_env,
514+
args=' '.join(cmdline)))
513515
printlog(manual_cmd)
514516
options = checkout.commandline_arguments(cmdline)
515517
overall_status, tree_status = checkout.main(options)

0 commit comments

Comments
 (0)