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().
This commit is contained in:
@@ -702,7 +702,6 @@ class TestAppveyorDetectContext(unittest.TestCase):
|
||||
|
||||
class TestSetupForBuild(unittest.TestCase):
|
||||
args = Namespace(paths=[])
|
||||
cue.building_base = True
|
||||
if ci_os == 'windows':
|
||||
choco_installs = ['make']
|
||||
if ci_service != 'appveyor':
|
||||
@@ -710,6 +709,7 @@ class TestSetupForBuild(unittest.TestCase):
|
||||
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()
|
||||
|
||||
5
cue.py
5
cue.py
@@ -163,6 +163,7 @@ modules_to_compile = []
|
||||
setup = {}
|
||||
places = {}
|
||||
extra_makeargs = []
|
||||
make_timeout = 0.
|
||||
|
||||
is_base314 = False
|
||||
is_make3 = False
|
||||
@@ -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>'
|
||||
@@ -205,8 +208,6 @@ 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"
|
||||
|
||||
Reference in New Issue
Block a user