def TestTargetOverideSharedLib():
  # The std output from nm and readelf is redirected to files, so we can't
  # expect their output to appear. Instead, check for the files they create to
  # see if they actually ran.
  expected = ['my_cc.py', 'my_cxx.py', 'FOO']

  # Check that CC, CXX, NM, READELF, set target compiler
  env = {'CC': 'python %s/my_cc.py FOO' % here,
         'CXX': 'python %s/my_cxx.py FOO' % here,
         'NM': 'python %s/my_nm.py' % here,
         'READELF': 'python %s/my_readelf.py' % here}

  with TestGyp.LocalEnv(env):
    CheckCompiler(test, 'compiler-shared-lib.gyp', expected, True)
    test.must_contain(test.built_file_path('RAN_MY_NM'), 'RAN_MY_NM')
    test.must_contain(test.built_file_path('RAN_MY_READELF'), 'RAN_MY_READELF')
    test.unlink(test.built_file_path('RAN_MY_NM'))
    test.unlink(test.built_file_path('RAN_MY_READELF'))

  # Run the same tests once the eviron has been restored.  The generated
  # projects should have embedded all the settings in the project files so the
  # results should be the same.
  CheckCompiler(test, 'compiler-shared-lib.gyp', expected, False)
  test.must_contain(test.built_file_path('RAN_MY_NM'), 'RAN_MY_NM')
  test.must_contain(test.built_file_path('RAN_MY_READELF'), 'RAN_MY_READELF')
dataset/ETHPy150Open adblockplus/gyp/test/compiler-override/gyptest-compiler-env-toolchain.py/TestTargetOverideSharedLib/original