20namespace sequoia::testing
22 inline constexpr std::string_view seqpat{
".seqpat"};
34 const std::filesystem::path& root()
const noexcept
40 const std::filesystem::path& executable()
const noexcept
46 const std::optional<std::filesystem::path>& cmake_cache()
const noexcept
54 std::filesystem::path m_Root{}, m_Executable{};
55 std::optional<std::filesystem::path> m_CMakeCache{};
57 discoverable_paths(std::filesystem::path rt, std::filesystem::path exec, std::optional<std::filesystem::path> cmakeCache);
70 main_paths(std::filesystem::path file, std::filesystem::path commonIncludes);
72 explicit main_paths(std::filesystem::path file);
75 const std::filesystem::path& file()
const noexcept {
return m_File; }
78 const std::filesystem::path& dir()
const noexcept {
return m_Dir; }
81 const std::filesystem::path& common_includes()
const noexcept {
return m_CommonIncludes; }
84 std::filesystem::path cmake_lists()
const;
87 static std::filesystem::path default_main_cpp_from_root();
90 static std::filesystem::path default_cmake_from_root();
95 std::filesystem::path m_File{}, m_Dir{}, m_CommonIncludes{};
105 explicit source_paths(
const std::filesystem::path& projectRoot,
const std::optional<std::filesystem::path>& folderName = {});
108 const std::filesystem::path& project()
const noexcept
114 const std::filesystem::path& repo()
const noexcept
120 std::filesystem::path cmake_lists()
const;
125 std::filesystem::path m_Repo, m_Project;
128 static std::filesystem::path repo(std::filesystem::path projectRoot);
138 explicit tests_paths(std::filesystem::path projectRoot);
141 const std::filesystem::path& repo()
const noexcept
147 std::filesystem::path project_root()
const;
152 std::filesystem::path m_Repo;
165 const std::filesystem::path& repo()
const noexcept
171 std::filesystem::path project_root()
const;
174 std::filesystem::path sequoia_root()
const;
179 std::filesystem::path m_Repo;
192 const std::filesystem::path& repo()
const noexcept
200 std::filesystem::path m_Repo;
213 const std::filesystem::path& repo()
const noexcept
221 std::filesystem::path m_Repo;
231 build_paths(std::filesystem::path projectRoot,
const std::filesystem::path& executableDir, std::optional<std::filesystem::path> cmakeCache);
234 const std::filesystem::path& dir()
const {
return m_Dir; }
237 const std::filesystem::path& executable_dir()
const noexcept
239 return m_ExecutableDir;
243 const std::optional<std::filesystem::path>& cmake_cache()
const noexcept
251 std::filesystem::path m_Dir, m_ExecutableDir{};
252 std::optional<std::filesystem::path> m_CMakeCache{};
265 const std::filesystem::path& repo()
const noexcept
271 static std::filesystem::path repo(
const std::filesystem::path& projectRoot);
274 const std::filesystem::path& test_templates()
const noexcept
276 return m_TestTemplates;
280 static std::filesystem::path test_templates(
const std::filesystem::path& projectRoot);
283 const std::filesystem::path& source_templates()
const noexcept
285 return m_SourceTemplates;
289 static std::filesystem::path source_templates(
const std::filesystem::path& projectRoot);
292 const std::filesystem::path& project_template()
const noexcept
294 return m_ProjectTemplate;
298 static std::filesystem::path project_template(
const std::filesystem::path& projectRoot);
303 std::filesystem::path
323 const std::filesystem::path& dir()
const noexcept
329 static std::filesystem::path dir(std::filesystem::path outputDir);
332 std::filesystem::path recovery_file()
const;
335 std::filesystem::path dump_file()
const;
340 std::filesystem::path m_Dir{};
350 prune_paths(std::filesystem::path outputDir,
const std::filesystem::path& buildRoot,
const std::filesystem::path& buildDir);
353 const std::filesystem::path& dir()
const noexcept
359 std::filesystem::path stamp()
const;
362 std::filesystem::path failures(std::optional<std::size_t>
id)
const;
365 std::filesystem::path selected_passes(std::optional<std::size_t>
id)
const;
368 std::filesystem::path external_dependencies()
const;
371 std::filesystem::path instability_analysis()
const;
376 std::filesystem::path m_Dir{}, m_Stem{};
379 static std::filesystem::path make_stem(
const std::filesystem::path& buildDir);
382 std::filesystem::path make_path(std::optional<std::size_t>
id, std::string_view extension)
const;
393 explicit output_paths(
const std::filesystem::path& projectRoot);
396 const std::filesystem::path& dir()
const noexcept
402 static std::filesystem::path dir(std::filesystem::path projectRoot);
405 const std::filesystem::path& tests_temporary_data()
const noexcept
407 return m_TestsTemporaryData;
411 static std::filesystem::path tests_temporary_data(std::filesystem::path projectRoot);
414 const std::filesystem::path& diagnostics()
const noexcept
416 return m_Diagnostics;
420 static std::filesystem::path diagnostics(std::filesystem::path projectRoot);
423 const std::filesystem::path& test_summaries()
const noexcept
425 return m_TestSummaries;
429 static std::filesystem::path test_summaries(std::filesystem::path projectRoot);
432 const std::filesystem::path& instability_analysis()
const noexcept
434 return m_InstabilityAnalysis;
438 static std::filesystem::path instability_analysis_file(std::filesystem::path projectRoot, std::filesystem::path source, std::string_view name, std::size_t index);
441 static std::filesystem::path instability_analysis(std::filesystem::path projectRoot);
450 prune_paths prune(
const std::filesystem::path& buildRoot,
const std::filesystem::path& buildDir)
const
452 return {dir(), buildRoot, buildDir};
458 std::filesystem::path
460 m_TestsTemporaryData{},
463 m_InstabilityAnalysis{};
473 std::optional<std::filesystem::path> source_folder{};
475 std::vector<std::filesystem::path> additional_dependency_analysis_paths{};
477 std::filesystem::path main_cpp{main_paths::default_main_cpp_from_root()};
479 std::vector<std::filesystem::path> ancillary_main_cpps{};
481 std::filesystem::path common_includes{main_paths::default_main_cpp_from_root()};
489 const std::filesystem::path& project_root() const noexcept
491 return m_Discovered.root();
495 const std::filesystem::path& executable() const noexcept
497 return m_Discovered.executable();
501 const source_paths& source() const noexcept
507 const dependencies_paths& dependencies() const noexcept
509 return m_Dependencies;
513 const tests_paths& tests() const noexcept
519 const test_materials_paths& test_materials() const noexcept
525 const build_paths& build() const noexcept
531 const build_system_paths& build_system() const noexcept
533 return m_BuildSystem;
537 const auxiliary_paths& aux_paths() const noexcept
543 const output_paths& output() const noexcept
549 const main_paths& main() const noexcept
555 const std::vector<main_paths>& ancillary_main_cpps() const noexcept
557 return m_AncillaryMainCpps;
561 const discoverable_paths& discovered() const noexcept
567 std::span<const std::filesystem::path> additional_dependency_analysis_paths() const noexcept {
return m_AdditionalDependencyAnalysisPaths; }
570 prune_paths prune()
const;
573 friend bool operator==(
const project_paths&,
const project_paths&)
noexcept =
default;
575 discoverable_paths m_Discovered;
577 source_paths m_Source;
579 auxiliary_paths m_Auxiliary;
580 output_paths m_Output;
581 dependencies_paths m_Dependencies;
583 test_materials_paths m_Materials;
584 build_system_paths m_BuildSystem;
586 std::vector<main_paths> m_AncillaryMainCpps{};
587 std::vector<std::filesystem::path> m_AdditionalDependencyAnalysisPaths{};
Paths for auxiliary materials, used in creating projects/tests.
Definition: ProjectPaths.hpp:258
Paths relating to the build directory.
Definition: ProjectPaths.hpp:227
Paths relating to the build_system directory.
Definition: ProjectPaths.hpp:206
Paths relating to the dependencies directory.
Definition: ProjectPaths.hpp:158
Paths which are potentially discoverable from the commandline arguments.
Definition: ProjectPaths.hpp:27
Paths relating to the main cpp.
Definition: ProjectPaths.hpp:66
Paths in the output directory.
Definition: ProjectPaths.hpp:389
Paths used by the project.
Definition: ProjectPaths.hpp:469
Paths used when using dependencies to prune the number of tests.
Definition: ProjectPaths.hpp:346
Holds details of the file to which the last successfully completed test is registered.
Definition: ProjectPaths.hpp:316
Paths relating to the source directory.
Definition: ProjectPaths.hpp:101
Paths relating to the TestMaterials directory.
Definition: ProjectPaths.hpp:185
Paths relating to the Tests directory.
Definition: ProjectPaths.hpp:134
Definition: ProjectPaths.hpp:472