tools/fuchsia/comparative_tester/comparative_tester.py
def RunGnForDirectory(dir_name: str, target_os: str, is_debug: bool) -> None:
  """Create the output directory for test builds for an operating system.

  Args:
    dir_name (str): The name to use for the output directory. This will be
        created if it does not exist.
    target_os (str): The operating system to initialize this directory for.
    is_debug (bool): Whether or not this is a debug build of the tests in
        question.

  Returns:
    None: It has a side effect of replacing args.gn
  """

  if not os.path.exists(dir_name):
    os.makedirs(dir_name)

  debug_str = str(is_debug).lower()

  with open("{}/{}".format(dir_name, "args.gn"), "w") as args_file:
    args_file.write("is_debug = {}\n".format(debug_str))
    args_file.write("dcheck_always_on = false\n")
    args_file.write("is_component_build = false\n")
    args_file.write("use_goma = true\n")
    args_file.write("target_os = \"{}\"\n".format(target_os))

  subprocess.run(["gn", "gen", dir_name]).check_returncode()
Create the output directory for test builds for an operating system.

  Args:
    dir_name (str): The name to use for the output directory. This will be
        created if it does not exist.
    target_os (str): The operating system to initialize this directory for.
    is_debug (bool): Whether or not this is a debug build of the tests in
        question.

  Returns:
    None: It has a side effect of replacing args.gn
  
Create the output directory for test builds for an operating system.
Create the output directory for test builds for an operating system .
def RunGnForDirectory(dir_name: str, target_os: str, is_debug: bool) -> None:
  if not os.path.exists(dir_name):
    os.makedirs(dir_name)
  debug_str = str(is_debug).lower()
  with open("{}/{}".format(dir_name, "args.gn"), "w") as args_file:
    args_file.write("is_debug = {}\n".format(debug_str))
    args_file.write("dcheck_always_on = false\n")
    args_file.write("is_component_build = false\n")
    args_file.write("use_goma = true\n")
    args_file.write("target_os = \"{}\"\n".format(target_os))
  subprocess.run(["gn", "gen", dir_name]).check_returncode()
def RunGnForDirectory ( dir_name : str , target_os : str , is_debug : bool ) -> None : if not os . path . exists ( dir_name ) : os . makedirs ( dir_name ) debug_str = str ( is_debug ) . lower ( ) with open ( "{}/{}" . format ( dir_name , "args.gn" ) , "w" ) as args_file : args_file . write ( "is_debug = {}\n" . format ( debug_str ) ) args_file . write ( "dcheck_always_on = false\n" ) args_file . write ( "is_component_build = false\n" ) args_file . write ( "use_goma = true\n" ) args_file . write ( "target_os = \"{}\"\n" . format ( target_os ) ) subprocess . run ( [ "gn" , "gen" , dir_name ] ) . check_returncode ( )
Create the output directory for test builds for an operating system.
Create the output directory for test builds for an operating system .
"""Create the output directory for test builds for an operating system.

  Args:
    dir_name (str): The name to use for the output directory. This will be
        created if it does not exist.
    target_os (str): The operating system to initialize this directory for.
    is_debug (bool): Whether or not this is a debug build of the tests in
        question.

  Returns:
    None: It has a side effect of replacing args.gn
  """
It has a side effect of replacing args.gn
It has a side effect of replacing args . gn
None
dir_name
str
The name to use for the output directory. This will be
created if it does not exist.
The name to use for the output directory . This will be created if it does not exist .
target_os
str
The operating system to initialize this directory for.
The operating system to initialize this directory for .
is_debug
bool
Whether or not this is a debug build of the tests in
question.
Whether or not this is a debug build of the tests in question .