Skip to content

fix passing command as list of strings to run_shell_cmd#4977

Merged
smoors merged 2 commits intoeasybuilders:developfrom
boegel:run_shell_cmd_cmd_list
Sep 3, 2025
Merged

fix passing command as list of strings to run_shell_cmd#4977
smoors merged 2 commits intoeasybuilders:developfrom
boegel:run_shell_cmd_cmd_list

Conversation

@boegel
Copy link
Copy Markdown
Member

@boegel boegel commented Aug 12, 2025

Draft PR, because the test fails, signaling a problem with run_shell_cmd...

@boegel boegel added this to the next release (5.1.2) milestone Aug 12, 2025
@boegel boegel added the bug fix label Aug 12, 2025
@boegel boegel force-pushed the run_shell_cmd_cmd_list branch from 68ef167 to 4b3ab88 Compare August 12, 2025 16:03
@boegel boegel marked this pull request as ready for review September 3, 2025 17:36
@boegel boegel changed the title add test for passing command as list of strings to run_shell_cmd (WIP) add test for passing command as list of strings to run_shell_cmd Sep 3, 2025
@boegel
Copy link
Copy Markdown
Member Author

boegel commented Sep 3, 2025

Without the fix in run_shell_cmd, the test fail with:

FAIL: test_run_shell_cmd_list (__main__.RunTest.test_run_shell_cmd_list)
Test run_shell_cmd with command specified as a list rather than a string
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Volumes/work/easybuild-framework/test/framework/run.py", line 1616, in test_run_shell_cmd_list
    self.assertEqual(res.output, "hello\n")
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/Volumes/work/easybuild-framework/easybuild/base/testing.py", line 89, in assertEqual
    super().assertEqual(a, b, msg=msg)
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
AssertionError: '' != 'hello\n'
+ hello

@boegel boegel changed the title add test for passing command as list of strings to run_shell_cmd fix passing command as list of strings to run_shell_cmd Sep 3, 2025
Copy link
Copy Markdown
Contributor

@smoors smoors left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@smoors smoors merged commit e694785 into easybuilders:develop Sep 3, 2025
37 checks passed
@boegel boegel deleted the run_shell_cmd_cmd_list branch September 3, 2025 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants