def _add_stats(self, test_stats): """Add the statistics found in a document returned by the Evergreen test_stats/ endpoint.""" test_file = testname.normalize_test_file(test_stats["test_file"]) duration = test_stats["avg_duration_pass"] num_run = test_stats["num_pass"] is_hook = testname.is_resmoke_hook(test_file) if is_hook: self._add_test_hook_stats(test_file, duration, num_run) else: self._add_test_stats(test_file, duration, num_run)
def _add_stats(self, test_stats): """Add the statistics found in a document returned by the Evergreen test_stats/ endpoint.""" test_file = testname.normalize_test_file(test_stats["test_file"]) duration = test_stats["avg_duration_pass"] num_run = test_stats["num_pass"] is_hook = testname.is_resmoke_hook(test_file) if is_hook: self._add_test_hook_stats(test_file, duration, num_run) else: self._add_test_stats(test_file, duration, num_run)
def test_windows_file_with_non_exe_ext(self): windows_file = "test\\found\\under\\windows.sh" self.assertEqual( testname_utils.normalize_test_file(windows_file), "test/found/under/windows.sh")
def test_unix_files_are_not_changed(self): unix_file = "test/found/under/unix" self.assertEqual(testname_utils.normalize_test_file(unix_file), unix_file)
def test_windows_file_is_normalized(self): windows_file = "test\\found\\under\\windows.exe" self.assertEqual( testname_utils.normalize_test_file(windows_file), "test/found/under/windows")