Skip to content

add unit test to catch bug in EB v1.11.0 related to $LMOD_CMD and spider#873

Merged
boegel merged 3 commits intoeasybuilders:v1.11.xfrom
boegel:lmod_cmd_test
Feb 27, 2014
Merged

add unit test to catch bug in EB v1.11.0 related to $LMOD_CMD and spider#873
boegel merged 3 commits intoeasybuilders:v1.11.xfrom
boegel:lmod_cmd_test

Conversation

@boegel
Copy link
Copy Markdown
Member

@boegel boegel commented Feb 27, 2014

this is a missing unit test for the bug fixed in #861

this test was added to catch issue with path to lmod binary being specified using $LMOD_CMD, but spider not being available in $PATH, which manifests itself in EasyBuild v1.11.0 as follows:

Traceback (most recent call last):
  File "test/framework/modulestool.py", line 141, in test_lmod_specific
    self.assertTrue(lmod.update(fake=True), "Updated local Lmod spider cache is non-empty")
  File "/Users/kehoste/work/easybuild-framework/easybuild/tools/modules.py", line 653, in update
    proc = subprocess.Popen(cmd, stdout=PIPE, stderr=PIPE, env=os.environ)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 672, in __init__
    errread, errwrite)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1202, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

…ed using $LMOD_CMD, but 'spider' not being available in $PATH
@boegel
Copy link
Copy Markdown
Member Author

boegel commented Feb 27, 2014

@stdweird: OK to go now?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i would call it cache_only or something like that, to better reflect what it is doing (keep the comment though)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

the caching bit is very Lmod specific, and naming it testing allows it to be reused for other purposes?

@stdweird
Copy link
Copy Markdown
Contributor

@boegel just a tiny remark about the name

Comment thread test/framework/modulestool.py Outdated
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

what does this do?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

copy-paste shizzle, I'll clean it up, thx

boegel added a commit that referenced this pull request Feb 27, 2014
add unit test to catch bug in EB v1.11.0 related to $LMOD_CMD and spider
@boegel boegel merged commit 6b8ed76 into easybuilders:v1.11.x Feb 27, 2014
@boegel boegel deleted the lmod_cmd_test branch February 27, 2014 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants