code: def test_merge_existing(group1, group2):
      """Test adding a link when a different symlink already exists"""
      t = BoostBuild.Tester()
      t.write(
          "jamroot.jam",
          """\
      import link ;
      link-directory dir1-link : src/dir1/include : <location>. ;
      link-directory dir2-link : src/dir2/include : <location>. ;
      """,
      )
  
      t.write("src/dir1/include/file1.h", "file1")
      t.write("src/dir2/include/file2.h", "file2")
  
      t.run_build_system(group1)
  
      if "dir1-link" in group1:
          t.expect_addition("include/file1.h")
          t.expect_content("include/file1.h", "file1")
      if "dir2-link" in group1:
          t.expect_addition("include/file2.h")
          t.expect_content("include/file2.h", "file2")
      ignore_config(t)
      t.expect_nothing_more()
  
      t.run_build_system(group2)
  
      if "dir1-link" in group2:
          if "dir1-link" not in group1:
              t.expect_addition("include/file1.h")
          else:
              # When a directory is split the link needs to be recreated.
              # On Windows, the test system checks the mod time of the
              # link rather than the link target, so this may be seen as
              # an update.
              t.ignore_touch("include/file1.h")
          t.expect_content("include/file1.h", "file1")
      else:
          t.ignore_removal("include/file1.h")
  
      if "dir2-link" in group2:
          if "dir2-link" not in group1:
              t.expect_addition("include/file2.h")
          else:
              t.ignore_touch("include/file2.h")
          t.expect_content("include/file2.h", "file2")
      else:
          t.ignore_removal("include/file2.h")
      ignore_config(t)
      t.expect_nothing_more()
  
      t.cleanup()
  
file_path: turicreate/src/external/boost/boost_1_68_0/tools/build/test/link.py
imports: import BoostBuild
label_desc: Use image node_id 4 for calling a global function with example usage: test_merge_existing(group1, group2) without return types