Exemplo n.º 1
0
    def _setup(self):
        """
    Sets up output directories and the reporter

    :return:
    """
        self.directory_info = test_runner_helper.directory_setup(
            self.testfile, self.dynamic_config_module, self.master_config)
        self.reporter = self._get_reporter()
        runtime.set_active_tests(self.tests)
Exemplo n.º 2
0
  def _setup(self):
    """
    Sets up output directories and the reporter

    :return:
    """
    self.directory_info = test_runner_helper.directory_setup(self.testfile,
                                                             self.dynamic_config_module,
                                                             self.master_config)
    self.reporter = self._get_reporter()
    runtime.set_active_tests(self.tests)
Exemplo n.º 3
0
  def test_directory_setup_makes_correct_directories(self):
    """
    Tests that directory_setup makes the correct directories
    """
    perf_module = utils.load_module(os.path.join(self.FILE_LOCATION,
                                                 "samples/sample_perf.py"))
    dir_info = test_runner_helper.directory_setup(
        os.path.join(self.FILE_LOCATION, "samples/sample_input.py"),
        perf_module, configobj.Config("Master", {}))
    self.assertTrue(os.path.isdir(runtime.get_reports_dir()))
    self.assertTrue("sample_input" in dir_info["report_name"])
    self.assertTrue(os.path.isdir(dir_info["results_dir"]))
    self.assertTrue(os.path.isdir(dir_info["logs_dir"]))

    shutil.rmtree(dir_info["results_dir"])
    shutil.rmtree(dir_info["logs_dir"])
Exemplo n.º 4
0
  def test_directory_setup_makes_correct_directories(self):
    """
    Tests that directory_setup makes the correct directories
    """
    perf_module = utils.load_module(os.path.join(self.FILE_LOCATION,
                                                 "samples/sample_perf.py"))
    dir_info = test_runner_helper.directory_setup(
        os.path.join(self.FILE_LOCATION, "samples/sample_input.py"),
        perf_module, configobj.Config("Master", {}))
    self.assertTrue(os.path.isdir(runtime.get_reports_dir()))
    self.assertTrue("sample_input" in dir_info["report_name"])
    self.assertTrue(os.path.isdir(dir_info["results_dir"]))
    self.assertTrue(os.path.isdir(dir_info["logs_dir"]))

    shutil.rmtree(dir_info["results_dir"])
    shutil.rmtree(dir_info["logs_dir"])