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

Function _init

v2/test/collect_debug_info.py:269–309  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

267
268
269def _init():
270 toolsetName = "__myDummyToolset__"
271
272 t = BoostBuild.Tester(["toolset=%s" % toolsetName], pass_toolset=False,
273 use_test_config=False)
274
275 # Prepare a dummy toolset so we do not get errors in case the default one
276 # is not found.
277 t.write(toolsetName + ".jam", """\
278import feature ;
279feature.extend toolset : %s ;
280rule init ( ) { }
281""" % toolsetName )
282
283 # Python version of the same dummy toolset.
284 t.write(toolsetName + ".py", """\
285from b2.build import feature
286feature.extend('toolset', ['%s'])
287def init(): pass
288""" % toolsetName )
289
290 t.write("jamroot.jam", """\
291import os ;
292.argv = [ modules.peek : ARGV ] ;
293local names = [ MATCH ^---var-name=(.*) : $(.argv) ] ;
294for x in $(names)
295{
296 value = [ os.environ $(x) ] ;
297 ECHO ***ENV*** $(x): '$(value)' *** ;
298}
299if ---version in $(.argv)
300{
301 for x in JAMVERSION JAM_VERSION JAMUNAME JAM_TIMESTAMP_RESOLUTION OS
302 {
303 v = [ modules.peek : $(x) ] ;
304 ECHO ***VAR*** $(x): "$(v:J=%s)" *** ;
305 }
306}
307""" % varSeparator)
308
309 return t
310
311
312def _info(*values):

Callers 1

collectDebugInfoFunction · 0.85

Calls 1

writeMethod · 0.95

Tested by

no test coverage detected