-
Notifications
You must be signed in to change notification settings - Fork 218
fix checking for new easyconfigs in copy_easyconfigs, pick up specified commit message as PR title if none was provided #2259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
a3c378c
fix checking whether copied easyconfigs are new, check *before* copyi…
boegel 0aac21c
pick up commit msg as PR title if none was specified, rather than enf…
boegel 3935c70
enhance test for copy_easyconfigs
boegel 3b65eb7
enhance test for --new-pr
boegel 7103379
fix refs to hpcugent in test_download_repo
boegel bddcd12
remove irrelevant commnent in Travis config
boegel e9ec8a3
fix broken test
boegel 076a64a
give custom commit msg priority for PR title over auto-derived title
boegel f9475f3
clarify comment in test_copy_easyconfigs, drop duplicate check
boegel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1802,13 +1802,20 @@ def test_copy_easyconfigs(self): | |
| ('g/GCC/GCC-4.6.3.eb', 'GCC.eb'), | ||
| ('o/OpenMPI/OpenMPI-1.6.4-GCC-4.6.4.eb', 'openmpi164.eb'), | ||
| ('t/toy/toy-0.0-gompi-1.3.12-test.eb', 'foo.eb'), | ||
| ('t/toy/toy-0.0.eb', 'TOY.eb'), | ||
| ] | ||
| ecs_to_copy = [] | ||
| for (src_ec, target_ec) in test_ecs: | ||
| ecs_to_copy.append(os.path.join(self.test_prefix, target_ec)) | ||
| shutil.copy2(os.path.join(test_ecs_dir, src_ec), ecs_to_copy[-1]) | ||
|
|
||
| copy_easyconfigs(ecs_to_copy, target_dir) | ||
| res = copy_easyconfigs(ecs_to_copy, target_dir) | ||
| self.assertEqual(sorted(res.keys()), ['ecs', 'new', 'paths_in_repo']) | ||
| self.assertEqual(len(res['ecs']), len(test_ecs)) | ||
| self.assertTrue(all(isinstance(ec, EasyConfig) for ec in res['ecs'])) | ||
| self.assertTrue(all(res['new'])) | ||
| expected = os.path.join(target_dir, 'easybuild', 'easyconfigs', 'g', 'GCC', 'GCC-4.6.3.eb') | ||
| self.assertTrue(os.path.samefile(res['paths_in_repo'][0], expected)) | ||
|
|
||
| # check whether easyconfigs were copied (unmodified) to correct location | ||
| for orig_ec, src_ec in test_ecs: | ||
|
|
@@ -1833,8 +1840,19 @@ def test_copy_easyconfigs(self): | |
| write_file(toy_ec, toy_ec_txt) | ||
|
|
||
| # verify whether copied easyconfig gets cleaned up | ||
| copy_easyconfigs([toy_ec], target_dir) | ||
| res = copy_easyconfigs([toy_ec], target_dir) | ||
|
|
||
| self.assertEqual([len(x) for x in res.values()], [1, 1, 1]) | ||
|
|
||
| self.assertTrue(isinstance(res['ecs'][0], EasyConfig)) | ||
|
||
| self.assertEqual(res['ecs'][0].full_mod_name, 'toy/0.0') | ||
|
|
||
| # toy-0.0.eb was already copied into target_dir, so should not be marked as new anymore | ||
| self.assertFalse(res['new'][0]) | ||
|
|
||
| copied_toy_ec = os.path.join(ecs_target_dir, 't', 'toy', 'toy-0.0.eb') | ||
| self.assertTrue(os.path.samefile(res['paths_in_repo'][0], copied_toy_ec)) | ||
|
|
||
|
|
||
| txt = read_file(copied_toy_ec) | ||
| regexs = [ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this comment accurate? I don't think so
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it sort of is, but the actual check is deeper down...