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:
+1
-1
@@ -702,7 +702,6 @@ class TestAppveyorDetectContext(unittest.TestCase):
|
|||||||
|
|
||||||
class TestSetupForBuild(unittest.TestCase):
|
class TestSetupForBuild(unittest.TestCase):
|
||||||
args = Namespace(paths=[])
|
args = Namespace(paths=[])
|
||||||
cue.building_base = True
|
|
||||||
if ci_os == 'windows':
|
if ci_os == 'windows':
|
||||||
choco_installs = ['make']
|
choco_installs = ['make']
|
||||||
if ci_service != 'appveyor':
|
if ci_service != 'appveyor':
|
||||||
@@ -710,6 +709,7 @@ class TestSetupForBuild(unittest.TestCase):
|
|||||||
sp.check_call(['choco', 'install', '-ry'] + choco_installs)
|
sp.check_call(['choco', 'install', '-ry'] + choco_installs)
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
cue.building_base = True
|
||||||
if ci_service == 'appveyor':
|
if ci_service == 'appveyor':
|
||||||
os.environ['CONFIGURATION'] = 'default'
|
os.environ['CONFIGURATION'] = 'default'
|
||||||
cue.detect_context()
|
cue.detect_context()
|
||||||
|
|||||||
@@ -163,6 +163,7 @@ modules_to_compile = []
|
|||||||
setup = {}
|
setup = {}
|
||||||
places = {}
|
places = {}
|
||||||
extra_makeargs = []
|
extra_makeargs = []
|
||||||
|
make_timeout = 0.
|
||||||
|
|
||||||
is_base314 = False
|
is_base314 = False
|
||||||
is_make3 = False
|
is_make3 = False
|
||||||
@@ -185,6 +186,8 @@ def clear_lists():
|
|||||||
has_test_results = False
|
has_test_results = False
|
||||||
silent_dep_builds = True
|
silent_dep_builds = True
|
||||||
do_recompile = False
|
do_recompile = False
|
||||||
|
building_base = False
|
||||||
|
_modified_files = set()
|
||||||
ci['service'] = '<none>'
|
ci['service'] = '<none>'
|
||||||
ci['os'] = '<unknown>'
|
ci['os'] = '<unknown>'
|
||||||
ci['platform'] = '<unknown>'
|
ci['platform'] = '<unknown>'
|
||||||
@@ -205,8 +208,6 @@ clear_lists()
|
|||||||
if 'BASE' in os.environ and os.environ['BASE'] == 'SELF':
|
if 'BASE' in os.environ and os.environ['BASE'] == 'SELF':
|
||||||
building_base = True
|
building_base = True
|
||||||
places['EPICS_BASE'] = curdir
|
places['EPICS_BASE'] = curdir
|
||||||
else:
|
|
||||||
building_base = False
|
|
||||||
|
|
||||||
# Setup ANSI Colors
|
# Setup ANSI Colors
|
||||||
ANSI_RED = "\033[31;1m"
|
ANSI_RED = "\033[31;1m"
|
||||||
|
|||||||
Reference in New Issue
Block a user