Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions test/framework/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
|-- ConfigureMake
| |-- MakeCp
|-- EB_binutils
|-- EB_BLIS
|-- EB_bzip2
|-- EB_CMake
|-- EB_EasyBuildMeta
Expand Down Expand Up @@ -111,6 +112,7 @@
|-- ConfigureMake (easybuild.easyblocks.generic.configuremake @ %(topdir)s/generic/configuremake.py)
| |-- MakeCp (easybuild.easyblocks.generic.makecp @ %(topdir)s/generic/makecp.py)
|-- EB_binutils (easybuild.easyblocks.binutils @ %(topdir)s/b/binutils.py)
|-- EB_BLIS (easybuild.easyblocks.blis @ %(topdir)s/b/blis.py)
|-- EB_bzip2 (easybuild.easyblocks.bzip2 @ %(topdir)s/b/bzip2.py)
|-- EB_CMake (easybuild.easyblocks.cmake @ %(topdir)s/c/cmake.py)
|-- EB_EasyBuildMeta (easybuild.easyblocks.easybuildmeta @ %(topdir)s/e/easybuildmeta.py)
Expand Down Expand Up @@ -176,6 +178,7 @@
* MakeCp

* EB_binutils
* EB_BLIS
* EB_bzip2
* EB_CMake
* EB_EasyBuildMeta
Expand Down Expand Up @@ -266,6 +269,7 @@
* MakeCp (easybuild.easyblocks.generic.makecp @ %(topdir)s/generic/makecp.py)

* EB_binutils (easybuild.easyblocks.binutils @ %(topdir)s/b/binutils.py)
* EB_BLIS (easybuild.easyblocks.blis @ %(topdir)s/b/blis.py)
* EB_bzip2 (easybuild.easyblocks.bzip2 @ %(topdir)s/b/bzip2.py)
* EB_CMake (easybuild.easyblocks.cmake @ %(topdir)s/c/cmake.py)
* EB_EasyBuildMeta (easybuild.easyblocks.easybuildmeta @ %(topdir)s/e/easybuildmeta.py)
Expand Down Expand Up @@ -353,6 +357,7 @@
- ConfigureMake
- MakeCp
- EB_binutils
- EB_BLIS
- EB_bzip2
- EB_CMake
- EB_EasyBuildMeta
Expand Down Expand Up @@ -415,6 +420,7 @@
- ConfigureMake (easybuild.easyblocks.generic.configuremake @ %(topdir)s/generic/configuremake.py)
- MakeCp (easybuild.easyblocks.generic.makecp @ %(topdir)s/generic/makecp.py)
- EB_binutils (easybuild.easyblocks.binutils @ %(topdir)s/b/binutils.py)
- EB_BLIS (easybuild.easyblocks.blis @ %(topdir)s/b/blis.py)
- EB_bzip2 (easybuild.easyblocks.bzip2 @ %(topdir)s/b/bzip2.py)
- EB_CMake (easybuild.easyblocks.cmake @ %(topdir)s/c/cmake.py)
- EB_EasyBuildMeta (easybuild.easyblocks.easybuildmeta @ %(topdir)s/e/easybuildmeta.py)
Expand Down
4 changes: 2 additions & 2 deletions test/framework/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,11 @@ def test_github_add_pr_labels(self):

self.mock_stdout(True)
self.mock_stderr(True)
gh.add_pr_labels(22380)
gh.add_pr_labels(21465)
stdout = self.get_stdout()
self.mock_stdout(False)
self.mock_stderr(False)
self.assertIn("Could not determine any missing labels for PR #22380", stdout)
self.assertIn("Could not determine any missing labels for PR #21465", stdout)

self.mock_stdout(True)
self.mock_stderr(True)
Expand Down
23 changes: 14 additions & 9 deletions test/framework/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -1542,13 +1542,13 @@ def test_github_copy_ec_from_pr(self):

# test with only one ec in the PR (final argument is taken as a filename)
test_ec = os.path.join(self.test_prefix, 'test.eb')
args = ['--copy-ec', '--from-pr', '22380', test_ec]
ec_pr22380 = "PySide2-5.14.2.3-GCCcore-10.2.0.eb"
args = ['--copy-ec', '--from-pr', '21465', test_ec]
ec_pr21465 = "EasyBuild-4.9.4.eb"
stdout = self.mocked_main(args)
regex = re.compile(r'.*/%s copied to %s' % (ec_pr22380, test_ec))
regex = re.compile(r'.*/%s copied to %s' % (ec_pr21465, test_ec))
self.assertTrue(regex.search(stdout), "Pattern '%s' found in: %s" % (regex.pattern, stdout))
self.assertExists(test_ec)
self.assertIn("name = 'PySide2'", read_file(test_ec))
self.assertIn("name = 'EasyBuild'", read_file(test_ec))
remove_file(test_ec)

def test_copy_ec_from_commit(self):
Expand Down Expand Up @@ -4726,6 +4726,7 @@ def test_update_branch_github(self):
'--github-user=boegel', # used to determine account to grab branch from (no GitHub token needed)
toy_ec,
'--pr-commit-msg="this is just a test"',
'--force', # force required because we're using --pr-commit-msg when only adding new easyconfigs
'-D',
]
txt, _ = self._run_mock_eb(args, do_build=True, raise_error=True, testing=False)
Expand Down Expand Up @@ -4877,19 +4878,22 @@ def test_github_new_update_pr(self):
regex = re.compile(regex, re.M)
self.assertTrue(regex.search(txt), "Pattern '%s' found in: %s" % (regex.pattern, txt))

# modifying an existing easyconfig requires a custom PR title
# modifying an existing easyconfig requires a custom PR title;
# we need to use a sufficiently recent GCC version, since easyconfigs for old versions have been archived
gcc_ec = os.path.join(test_ecs, 'g', 'GCC', 'GCC-10.2.0.eb')
self.assertExists(gcc_ec)
gcc_new_ec = os.path.join(self.test_prefix, 'GCC-14.3.0.eb')
gcc_new_txt = read_file(gcc_ec).replace('10.2.0', '14.3.0')
write_file(gcc_new_ec, gcc_new_txt)

args = [
'--new-pr',
'--github-user=%s' % GITHUB_TEST_ACCOUNT,
toy_ec,
gcc_ec,
gcc_new_ec,
'-D',
]
error_msg = "A meaningful commit message must be specified via --pr-commit-msg.*\n"
error_msg += "Modified: " + os.path.basename(gcc_ec)
error_msg += "Modified: " + os.path.basename(gcc_new_ec)
self.mock_stdout(True)
self.assertErrorRegex(EasyBuildError, error_msg, self.eb_main, args, raise_error=True)
self.mock_stdout(False)
Expand Down Expand Up @@ -4917,7 +4921,8 @@ def test_github_new_update_pr(self):
self.assertErrorRegex(EasyBuildError, error_msg, self.eb_main, args, raise_error=True)
self.mock_stdout(False)

args.append('--pr-commit-msg="just a test"')
# force required because we're using --pr-commit-msg when only adding new easyconfigs
args.extend(['--pr-commit-msg="just a test"', '--force'])
txt, _ = self._run_mock_eb(args, do_build=True, raise_error=True, testing=False)

regexs = [
Expand Down
34 changes: 34 additions & 0 deletions test/framework/sandbox/easybuild/easyblocks/b/blis.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
##
# Copyright 2009-2025 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (FWO) (http://www.fwo.be/en)
# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en).
#
# https://github.com/easybuilders/easybuild
#
# EasyBuild is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation v2.
#
# EasyBuild is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with EasyBuild. If not, see <http://www.gnu.org/licenses/>.
##
"""
Dummy easyblock for BLIS

@author: Kenneth Hoste (Ghent University)
"""
from easybuild.framework.easyblock import EasyBlock


class EB_BLIS(EasyBlock):
pass