14 os.path.join(os.path.dirname(__file__),
15 '../../third_party/fuchsia/test_scripts/test/')))
17from common
import catch_sigterm, wait_for_sigterm
22 Execute the test-scripts with required environment variables. It acts like
23 /usr/bin/env, but provides some extra functionality to dynamically set up
24 the environment variables.
29 os.environ[
'SRC_ROOT'] = os.path.abspath(
30 os.path.join(os.path.dirname(__file__), os.pardir, os.pardir))
31 os.environ[
'FUCHSIA_IMAGES_ROOT'] = os.path.join(os.environ[
'SRC_ROOT'],
32 'third_party',
'fuchsia',
35 if platform.system() ==
'Linux':
37 elif platform.system() ==
'Darwin':
40 assert False,
'Unsupported OS'
41 os.environ[
'FUCHSIA_SDK_ROOT'] = os.path.join(os.environ[
'SRC_ROOT'],
42 'third_party',
'fuchsia',
45 os.environ[
'FUCHSIA_GN_SDK_ROOT'] = os.path.join(os.environ[
'SRC_ROOT'],
46 'third_party',
'fuchsia',
49 with subprocess.Popen(sys.argv[1:])
as proc:
55 return proc.returncode
58if __name__ ==
'__main__':