Skip to content

Commit

Permalink
Fix handling of some global variables and clear them properly
Browse files Browse the repository at this point in the history
- 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().
  • Loading branch information
ralphlange committed Jul 22, 2022
1 parent d36800b commit 22b2e3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cue-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,14 +702,14 @@ def test_MisspelledConfigurationGetsWarning(self):

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

def setUp(self):
cue.building_base = True
if ci_service == 'appveyor':
os.environ['CONFIGURATION'] = 'default'
cue.detect_context()
Expand Down
5 changes: 3 additions & 2 deletions cue.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ def detect_context():
setup = {}
places = {}
extra_makeargs = []
make_timeout = 0.

is_base314 = False
is_make3 = False
Expand All @@ -185,6 +186,8 @@ def clear_lists():
has_test_results = False
silent_dep_builds = True
do_recompile = False
building_base = False
_modified_files = set()
ci['service'] = '<none>'
ci['os'] = '<unknown>'
ci['platform'] = '<unknown>'
Expand All @@ -205,8 +208,6 @@ def clear_lists():
if 'BASE' in os.environ and os.environ['BASE'] == 'SELF':
building_base = True
places['EPICS_BASE'] = curdir
else:
building_base = False

# Setup ANSI Colors
ANSI_RED = "\033[31;1m"
Expand Down

0 comments on commit 22b2e3f

Please sign in to comment.