code: def test_merge_recursive_existing(group1, group2):
      "Test merging several directories including common prefixes."
      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>. ;
      link-directory dir3-link : src/dir3/include : <location>. ;
      link-directory dir4-link : src/dir4/include : <location>. ;
      link-directory dir5-link : src/dir5/include : <location>. ;
      """,
      )
  
      t.write("src/dir1/include/file1.h", "file1")
      t.write("src/dir2/include/nested/file2.h", "file2")
      t.write("src/dir3/include/nested/file3.h", "file3")
      t.write("src/dir4/include/nested/xxx/yyy/file4.h", "file4")
      t.write("src/dir5/include/nested/xxx/yyy/file5.h", "file5")
  
      t.run_build_system(group1)
      t.run_build_system(group2 + ["-d+12"])
  
      def check_file(target, file):
          if target in group2:
              if target in group1:
                  t.ignore_touch(file)
              else:
                  t.expect_addition(file)
  
      check_file("dir1-link", "include/file1.h")
      check_file("dir2-link", "include/nested/file2.h")
      check_file("dir3-link", "include/nested/file3.h")
      check_file("dir4-link", "include/nested/xxx/yyy/file4.h")
      check_file("dir5-link", "include/nested/xxx/yyy/file5.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 7 for calling a global function with example usage: test_merge_recursive_existing(group1, group2) without return types