Skip to content

Commit af1ecba

Browse files
committed
Add skip_dep_builds flag to suppress dependency builds
To allow unit tests suppressing the build of dependencies when using the prepare() function.
1 parent 22b2e3f commit af1ecba

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

cue-test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ def getStringIO():
6767
# we're working with tags (detached heads) a lot: suppress advice
6868
cue.call_git(['config', '--global', 'advice.detachedHead', 'false'])
6969

70+
# Don't build dependencies when running unit tests
71+
cue.skip_dep_builds = True
7072

7173
class TestSourceSet(unittest.TestCase):
7274

cue.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ def detect_context():
169169
is_make3 = False
170170
has_test_results = False
171171
silent_dep_builds = True
172+
skip_dep_builds = False
172173
do_recompile = False
173174
installed_7z = False
174175

@@ -207,6 +208,7 @@ def clear_lists():
207208

208209
if 'BASE' in os.environ and os.environ['BASE'] == 'SELF':
209210
building_base = True
211+
skip_dep_builds = True
210212
places['EPICS_BASE'] = curdir
211213

212214
# Setup ANSI Colors
@@ -1245,7 +1247,7 @@ def prepare(args):
12451247
if logging.getLogger().isEnabledFor(logging.DEBUG):
12461248
log_modified()
12471249

1248-
if not building_base:
1250+
if not skip_dep_builds:
12491251
fold_start('build.dependencies', 'Build missing/outdated dependencies')
12501252
for mod in modules_to_compile:
12511253
place = places[setup[mod + "_VARNAME"]]

0 commit comments

Comments
 (0)