def test_add_local_ctc(tmpdir):
    ctc = tmpdir.mkdir("ctc")
    toolchain_xml = ctc.join("toolchain.xml")
    toolchain_xml.write("""
<toolchain>
  <package name="ctc"
           directory="."
  />
  <package name="boost" directory="boost" />
</toolchain>
""")
    toolchain = qitoolchain.toolchain.Toolchain("bar")
    package_xml = ctc.join("package.xml")
    package_xml.write("""
<package name="ctc"
         cross_gdb="cross/bin/i686-linux-gnu-gdb"
         sysroot="sysroot"
         toolchain_file="cross-config.cmake"
/>
""")
    toolchain.update(toolchain_xml.strpath)
    tc_contents = get_tc_file_contents(toolchain)
    ctc_path = toolchain.db.get_package_path("ctc")
    config_cmake = os.path.join(ctc_path, "cross-config.cmake")
    assert (config_cmake % 'include("%s")') in tc_contents
    toolchain2 = qitoolchain.toolchain.Toolchain("bar")
    tc_contents = get_tc_file_contents(toolchain2)
    assert ('include("%s")' % config_cmake) in tc_contents
dataset/ETHPy150Open aldebaran/qibuild/python/qitoolchain/test/test_toolchain.py/test_add_local_ctc/swapped operands of `%`