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

Function test_one

v2/test/generators_test.py:292–321  ·  view source on GitHub ↗
(t, rename1, rename2, rename3, status)

Source from the content-addressed store, hash-verified

290 t.write("_xxx._a", "")
291
292 def test_one(t, rename1, rename2, rename3, status):
293 def f(rename):
294 if rename: return "(%_x)"
295 return ""
296
297 jamfile = jamfile_template % (f(rename1), f(rename2), f(rename3))
298 t.write("jamroot.jam", jamfile, wait=False)
299
300 # Remove any preexisting targets left over from a previous test run
301 # so we do not have to be careful about tracking which files have been
302 # newly added and which preexisting ones have only been modified.
303 t.rm("bin")
304
305 t.run_build_system(status=status)
306
307 if status:
308 t.expect_output_lines("*.bbX-to-ccc: source targets have "
309 "different names: cannot determine target name")
310 else:
311 def suffix(rename):
312 if rename: return "_x"
313 return ""
314 name = "bin/$toolset/debug/_xxx"
315 e = t.expect_addition
316 e("%s%s._b1" % (name, suffix(rename1)))
317 e("%s%s._b2" % (name, suffix(rename2)))
318 e("%s%s._b3" % (name, suffix(rename3)))
319 e("%s%s._c" % (name, suffix(rename1 and rename2 and rename3)))
320 e("%s._d" % name)
321 t.expect_nothing_more()
322
323 test_one(t, False, False, False, status=0)
324 test_one(t, True , False, False, status=1)

Callers 1

Calls 7

suffixFunction · 0.85
rmMethod · 0.80
run_build_systemMethod · 0.80
expect_output_linesMethod · 0.80
expect_nothing_moreMethod · 0.80
fFunction · 0.70
writeMethod · 0.45

Tested by

no test coverage detected