class_docstr: Unit test for Google Test's XML output functionality.
class_docstr_tok: ["Unit","test","for","Google","Test","'s","XML","output","functionality","."]
docstr: Returns the XML output generated by running the program gtest_prog_name.
  
  Furthermore, the program's exit code must be expected_exit_code.
  
  Args:
    gtest_prog_name: Program to run.
    extra_args: Optional arguments to pass to program.
    extra_env: Optional environment variables to set.
    expected_exit_code: Expected exit code from running gtest_prog_name.
docstr_tok: ["Returns","the","XML","output","generated","by","running","the","program","gtest_prog_name",".","Furthermore",",","the","program","'s","exit","code","must","be","expected_exit_code",".","Args",":","gtest_prog_name",":","Program","to","run",".","extra_args",":","Optional","arguments","to","pass","to","program",".","extra_env",":","Optional","environment","variables","to","set",".","expected_exit_code",":","Expected","exit","code","from","running","gtest_prog_name","."]
code: def _GetXmlOutput(
      self, gtest_prog_name, extra_args, extra_env, expected_exit_code
  ):
      """Returns the XML output generated by running the program gtest_prog_name.
  
      Furthermore, the program's exit code must be expected_exit_code.
  
      Args:
        gtest_prog_name: Program to run.
        extra_args: Optional arguments to pass to program.
        extra_env: Optional environment variables to set.
        expected_exit_code: Expected exit code from running gtest_prog_name.
      """
      xml_path = os.path.join(
          gtest_test_utils.GetTempDir(), gtest_prog_name + "out.xml"
      )
      gtest_prog_path = gtest_test_utils.GetTestExecutablePath(
          gtest_prog_name
      )
  
      command = [
          gtest_prog_path,
          "%s=xml:%s" % (GTEST_OUTPUT_FLAG, xml_path),
      ] + extra_args
      environ_copy = os.environ.copy()
      if extra_env:
          environ_copy.update(extra_env)
      p = gtest_test_utils.Subprocess(command, env=environ_copy)
  
      if p.terminated_by_signal:
          self.assertTrue(
              False,
              "%s was killed by signal %d"
              % (gtest_prog_name, p.signal),
          )
      else:
          self.assertTrue(p.exited)
          self.assertEqual(
              expected_exit_code,
              p.exit_code,
              "'%s' exited with code %s, which doesn't match "
              "the expected exit code %s."
              % (command, p.exit_code, expected_exit_code),
          )
      actual = minidom.parse(xml_path)
      return actual
  
file_path: open-asset-importer/contrib/googletest/googletest/test/gtest_xml_output_unittest.py
imports: import datetime
  import errno
  import os
  import re
  import sys
  from xml.dom import minidom, Node
  from googletest.test import gtest_test_utils
  from googletest.test import gtest_xml_test_utils
label_desc: Use image node_id 7 for calling the GTestXMLOutputUnitTest obj's underlying member method code with example usage: obj._GetXmlOutput(gtest_prog_name, extra_args, extra_env, expected_exit_code) and returns: actual