From 332b10640905369669142a8934eda28b604694ad Mon Sep 17 00:00:00 2001 From: John Alex Date: Sun, 26 Feb 2023 17:37:10 +0000 Subject: [PATCH] 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: https://github.com/ESMCI/manage_externals/commit/3009801362ac2337baeba05e1558f037897e3b37 It never mattered since this command line is only for debugging. --- test/test_sys_checkout.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test/test_sys_checkout.py b/test/test_sys_checkout.py index 806f0d8c6..e9f14dede 100644 --- a/test/test_sys_checkout.py +++ b/test/test_sys_checkout.py @@ -502,14 +502,16 @@ def _execute_checkout_in_dir(dirname, args, debug_env=''): """ cwd = os.getcwd() - # Construct a command line for reproducibility; this command is not actually - # executed in the test. - checkout_path = os.path.abspath('{0}/../../checkout_externals') + # Construct a command line for reproducibility; this command is not + # actually executed in the test. os.chdir(dirname) cmdline = ['--externals', CFG_NAME, ] cmdline += args - manual_cmd = ('Test cmd:\npushd {cwd}; {env} {checkout} {args}'.format( - cwd=dirname, checkout=checkout_path, env=debug_env, args=' '.join(cmdline))) + manual_cmd = ('Running equivalent of:\n' + 'pushd {dirname}; ' + '{debug_env} /path/to/checkout_externals {args}'.format( + dirname=dirname, debug_env=debug_env, + args=' '.join(cmdline))) printlog(manual_cmd) options = checkout.commandline_arguments(cmdline) overall_status, tree_status = checkout.main(options)