@@ -1542,13 +1542,13 @@ def test_github_copy_ec_from_pr(self):
1542
1542
1543
1543
# test with only one ec in the PR (final argument is taken as a filename)
1544
1544
test_ec = os .path .join (self .test_prefix , 'test.eb' )
1545
- args = ['--copy-ec' , '--from-pr' , '22380 ' , test_ec ]
1546
- ec_pr22380 = "PySide2-5.14.2.3-GCCcore-10.2.0 .eb"
1545
+ args = ['--copy-ec' , '--from-pr' , '21465 ' , test_ec ]
1546
+ ec_pr21465 = "EasyBuild-4.9.4 .eb"
1547
1547
stdout = self .mocked_main (args )
1548
- regex = re .compile (r'.*/%s copied to %s' % (ec_pr22380 , test_ec ))
1548
+ regex = re .compile (r'.*/%s copied to %s' % (ec_pr21465 , test_ec ))
1549
1549
self .assertTrue (regex .search (stdout ), "Pattern '%s' found in: %s" % (regex .pattern , stdout ))
1550
1550
self .assertExists (test_ec )
1551
- self .assertIn ("name = 'PySide2 '" , read_file (test_ec ))
1551
+ self .assertIn ("name = 'EasyBuild '" , read_file (test_ec ))
1552
1552
remove_file (test_ec )
1553
1553
1554
1554
def test_copy_ec_from_commit (self ):
@@ -4726,6 +4726,7 @@ def test_update_branch_github(self):
4726
4726
'--github-user=boegel' , # used to determine account to grab branch from (no GitHub token needed)
4727
4727
toy_ec ,
4728
4728
'--pr-commit-msg="this is just a test"' ,
4729
+ '--force' , # force required because we're using --pr-commit-msg when only adding new easyconfigs
4729
4730
'-D' ,
4730
4731
]
4731
4732
txt , _ = self ._run_mock_eb (args , do_build = True , raise_error = True , testing = False )
@@ -4877,19 +4878,22 @@ def test_github_new_update_pr(self):
4877
4878
regex = re .compile (regex , re .M )
4878
4879
self .assertTrue (regex .search (txt ), "Pattern '%s' found in: %s" % (regex .pattern , txt ))
4879
4880
4880
- # modifying an existing easyconfig requires a custom PR title
4881
+ # modifying an existing easyconfig requires a custom PR title;
4882
+ # we need to use a sufficiently recent GCC version, since easyconfigs for old versions have been archived
4881
4883
gcc_ec = os .path .join (test_ecs , 'g' , 'GCC' , 'GCC-10.2.0.eb' )
4882
- self .assertExists (gcc_ec )
4884
+ gcc_new_ec = os .path .join (self .test_prefix , 'GCC-14.3.0.eb' )
4885
+ gcc_new_txt = read_file (gcc_ec ).replace ('10.2.0' , '14.3.0' )
4886
+ write_file (gcc_new_ec , gcc_new_txt )
4883
4887
4884
4888
args = [
4885
4889
'--new-pr' ,
4886
4890
'--github-user=%s' % GITHUB_TEST_ACCOUNT ,
4887
4891
toy_ec ,
4888
- gcc_ec ,
4892
+ gcc_new_ec ,
4889
4893
'-D' ,
4890
4894
]
4891
4895
error_msg = "A meaningful commit message must be specified via --pr-commit-msg.*\n "
4892
- error_msg += "Modified: " + os .path .basename (gcc_ec )
4896
+ error_msg += "Modified: " + os .path .basename (gcc_new_ec )
4893
4897
self .mock_stdout (True )
4894
4898
self .assertErrorRegex (EasyBuildError , error_msg , self .eb_main , args , raise_error = True )
4895
4899
self .mock_stdout (False )
@@ -4917,7 +4921,8 @@ def test_github_new_update_pr(self):
4917
4921
self .assertErrorRegex (EasyBuildError , error_msg , self .eb_main , args , raise_error = True )
4918
4922
self .mock_stdout (False )
4919
4923
4920
- args .append ('--pr-commit-msg="just a test"' )
4924
+ # force required because we're using --pr-commit-msg when only adding new easyconfigs
4925
+ args .extend (['--pr-commit-msg="just a test"' , '--force' ])
4921
4926
txt , _ = self ._run_mock_eb (args , do_build = True , raise_error = True , testing = False )
4922
4927
4923
4928
regexs = [
0 commit comments