Skip to content

Commit

Permalink
Add skip_dep_builds flag to suppress dependency builds
Browse files Browse the repository at this point in the history
To allow unit tests suppressing the build of
dependencies when using the prepare() function.
  • Loading branch information
ralphlange committed Jul 22, 2022
1 parent 22b2e3f commit af1ecba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cue-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ def getStringIO():
# we're working with tags (detached heads) a lot: suppress advice
cue.call_git(['config', '--global', 'advice.detachedHead', 'false'])

# Don't build dependencies when running unit tests
cue.skip_dep_builds = True

class TestSourceSet(unittest.TestCase):

Expand Down
4 changes: 3 additions & 1 deletion cue.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ def detect_context():
is_make3 = False
has_test_results = False
silent_dep_builds = True
skip_dep_builds = False
do_recompile = False
installed_7z = False

Expand Down Expand Up @@ -207,6 +208,7 @@ def clear_lists():

if 'BASE' in os.environ and os.environ['BASE'] == 'SELF':
building_base = True
skip_dep_builds = True
places['EPICS_BASE'] = curdir

# Setup ANSI Colors
Expand Down Expand Up @@ -1245,7 +1247,7 @@ def prepare(args):
if logging.getLogger().isEnabledFor(logging.DEBUG):
log_modified()

if not building_base:
if not skip_dep_builds:
fold_start('build.dependencies', 'Build missing/outdated dependencies')
for mod in modules_to_compile:
place = places[setup[mod + "_VARNAME"]]
Expand Down

0 comments on commit af1ecba

Please sign in to comment.