Skip to content

Commit 22b2e3f

Browse files
committed
Fix handling of some global variables and clear them properly
- move make_timeout to global and add it to clear_lists() - add _modified_files and building_base to clear_lists() This is needed to run tests that include prepare().
1 parent d36800b commit 22b2e3f

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

cue-test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,14 +702,14 @@ def test_MisspelledConfigurationGetsWarning(self):
702702

703703
class TestSetupForBuild(unittest.TestCase):
704704
args = Namespace(paths=[])
705-
cue.building_base = True
706705
if ci_os == 'windows':
707706
choco_installs = ['make']
708707
if ci_service != 'appveyor':
709708
choco_installs.append('strawberryperl')
710709
sp.check_call(['choco', 'install', '-ry'] + choco_installs)
711710

712711
def setUp(self):
712+
cue.building_base = True
713713
if ci_service == 'appveyor':
714714
os.environ['CONFIGURATION'] = 'default'
715715
cue.detect_context()

cue.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ def detect_context():
163163
setup = {}
164164
places = {}
165165
extra_makeargs = []
166+
make_timeout = 0.
166167

167168
is_base314 = False
168169
is_make3 = False
@@ -185,6 +186,8 @@ def clear_lists():
185186
has_test_results = False
186187
silent_dep_builds = True
187188
do_recompile = False
189+
building_base = False
190+
_modified_files = set()
188191
ci['service'] = '<none>'
189192
ci['os'] = '<unknown>'
190193
ci['platform'] = '<unknown>'
@@ -205,8 +208,6 @@ def clear_lists():
205208
if 'BASE' in os.environ and os.environ['BASE'] == 'SELF':
206209
building_base = True
207210
places['EPICS_BASE'] = curdir
208-
else:
209-
building_base = False
210211

211212
# Setup ANSI Colors
212213
ANSI_RED = "\033[31;1m"

0 commit comments

Comments
 (0)