22namespace sequoia::testing
24 enum class prune_mode { passive, active };
28 using stamp_t = std::filesystem::file_time_type;
29 using duration_t = stamp_t::duration;
31 std::filesystem::path test_path;
34 friend std::ostream& operator<<(std::ostream& s,
const prune_record& record) {
35 return s << record.test_path.generic_string()
37 << std::format(
"{}", record.time_stamp.time_since_epoch().count());
43 friend std::istream& operator>>(std::istream& s,
prune_record& record) {
44 std::size_t duration{};
45 s >> record.test_path >> duration;
47 record.time_stamp = {stamp_t{} + duration_t{duration}};
53 std::vector<prune_record> read_tests(
const std::filesystem::path& file);
55 void write_tests(
const project_paths& projPaths,
const std::filesystem::path& file, std::span<const prune_record> tests);
58 std::optional<std::vector<std::filesystem::path>> tests_to_run(
const project_paths& projPaths, std::string_view cutoff);
61 std::span<const std::filesystem::path> failedTests,
62 std::filesystem::file_time_type updateTime,
63 std::optional<std::size_t>
id);
66 std::span<const std::filesystem::path> executedTests,
67 std::span<const std::filesystem::path> failedTests,
68 std::filesystem::file_time_type updateTime,
69 std::optional<std::size_t>
id);
71 void setup_instability_analysis_prune_folder(
const project_paths& projPaths);
73 void aggregate_instability_analysis_prune_files(
const project_paths& projPaths, prune_mode mode, std::filesystem::file_time_type timeStamp, std::size_t numReps);
File paths pertaining to a sequoia project.
Paths used by the project.
Definition: ProjectPaths.hpp:467
Definition: DependencyAnalyzer.hpp:27