code: def test_update_file_link(params1, params2):
      """Tests the behavior of updates when changing the link mode.
      The link needs to be updated iff the original was a copy."""
      t = BoostBuild.Tester()
  
      t.write(
          "jamroot.jam",
          """\
      import link ;
      import project ;
      import property-set ;
      import modules ;
  
      if --no-symlinks in [ modules.peek : ARGV ]
      {
          modules.poke link : .can-symlink : false ;
      }
  
      if --no-hardlinks in [ modules.peek : ARGV ]
      {
          modules.poke link : .can-hardlink : false ;
      }
  
      .project = [ project.current ] ;
      .has-files = [ glob include/file1.h ] ;
  
      rule can-link ( properties * ) {
          if ( ! [ link.can-symlink $(.project) ] ) &&
             ( ! [ link.can-hardlink $(.project) ] )
          {
              ECHO links unsupported ;
          }
      }
  
      # Use two directories so that we link to individual files.
      link-directory dir1-link : src/dir1/include : <location>. ;
      link-directory dir2-link : src/dir2/include : <location>. ;
      alias check-linking : : <conditional>@can-link ;
      """,
      )
      t.write("src/dir1/include/file1.h", "file1")
      t.write("src/dir2/include/file2.h", "file2")
  
      t.run_build_system(params1)
      ignore_config(t)
      t.expect_addition("include/file1.h")
      t.expect_addition("include/file2.h")
      t.expect_nothing_more()
  
      using_links = "links unsupported" not in t.stdout()
  
      t.touch("src/dir1/include/file1.h")
  
      t.run_build_system(params2)
      if not using_links:
          t.expect_touch("include/file1.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 11 for calling a global function with example usage: test_update_file_link(params1, params2) without return types