Skip to content
Merged
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
9 changes: 9 additions & 0 deletions test/framework/easyconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@

import easybuild.tools.build_log
import easybuild.framework.easyconfig as easyconfig
import easybuild.tools.github as gh
import easybuild.tools.systemtools as st
from easybuild.framework.easyblock import EasyBlock
from easybuild.framework.easyconfig.constants import EXTERNAL_MODULE_MARKER
Expand Down Expand Up @@ -77,6 +78,7 @@
from easybuild.tools.systemtools import get_cpu_architecture, get_shared_lib_ext
from easybuild.tools.toolchain.utilities import search_toolchain
from easybuild.tools.utilities import quote_str, quote_py_str
from test.framework.github import GITHUB_TEST_ACCOUNT
from test.framework.utilities import find_full_path

try:
Expand Down Expand Up @@ -113,6 +115,9 @@ def setUp(self):
if os.path.exists(self.eb_file):
os.remove(self.eb_file)

github_token = gh.fetch_github_token(GITHUB_TEST_ACCOUNT)
self.skip_github_tests = github_token is None and os.getenv('FORCE_EB_GITHUB_TESTS') is None

def prep(self):
"""Prepare for test."""
# (re)cleanup last test file
Expand Down Expand Up @@ -4408,6 +4413,10 @@ def test_det_copy_ec_specs(self):
self.assertEqual(paths, args[:-1])
self.assertEqual(target_path, args[-1])

if self.skip_github_tests:
print("Skipping test_det_copy_ec_specs using --from-pr, no GitHub token available?")
return
Comment on lines +4417 to +4418
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
print("Skipping test_det_copy_ec_specs using --from-pr, no GitHub token available?")
return
self.skipTest("Not using --from-pr, no GitHub token available?")

See my longstanding work at #3790

Copy link
Member Author

Choose a reason for hiding this comment

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

I would rather change that across the board at once, so please update #3790 accordingly once this is merged.

I'm sorry for not getting to #3790 yet, we have to pick our battles (and this PR really should go in ASAP)

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed


# use fixed PR (speeds up the test due to caching in fetch_files_from_pr;
# see https://github.com/easybuilders/easybuild-easyconfigs/pull/8007
from_pr = 8007
Expand Down