MCPcopy Create free account
hub / github.com/boostorg/build / reset

Function reset

v2/tools/common.py:25–68  ·  view source on GitHub ↗

Clear the module state. This is mainly for testing purposes. Note that this must be called _after_ resetting the module 'feature'.

()

Source from the content-addressed store, hash-verified

23__re__before_first_dash = re.compile ('([^-]*)-')
24
25def reset ():
26 """ Clear the module state. This is mainly for testing purposes.
27 Note that this must be called _after_ resetting the module 'feature'.
28 """
29 global __had_unspecified_value, __had_value, __declared_subfeature
30 global __init_loc
31 global __all_signatures, __debug_configuration, __show_configuration
32
33 # Stores toolsets without specified initialization values.
34 __had_unspecified_value = {}
35
36 # Stores toolsets with specified initialization values.
37 __had_value = {}
38
39 # Stores toolsets with declared subfeatures.
40 __declared_subfeature = {}
41
42 # Stores all signatures of the toolsets.
43 __all_signatures = {}
44
45 # Stores the initialization locations of each toolset
46 __init_loc = {}
47
48 __debug_configuration = '--debug-configuration' in bjam.variable('ARGV')
49 __show_configuration = '--show-configuration' in bjam.variable('ARGV')
50
51 global __executable_path_variable
52 OS = bjam.call("peek", [], "OS")[0]
53 if OS == "NT":
54 # On Windows the case and capitalization of PATH is not always predictable, so
55 # let's find out what variable name was really set.
56 for n in os.environ:
57 if n.lower() == "path":
58 __executable_path_variable = n
59 break
60 else:
61 __executable_path_variable = "PATH"
62
63 m = {"NT": __executable_path_variable,
64 "CYGWIN": "PATH",
65 "MACOSX": "DYLD_LIBRARY_PATH",
66 "AIX": "LIBPATH"}
67 global __shared_library_path_variable
68 __shared_library_path_variable = m.get(OS, "LD_LIBRARY_PATH")
69
70reset()
71

Callers 1

common.pyFile · 0.70

Calls 1

getMethod · 0.80

Tested by

no test coverage detected