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::filesystem::path& cmake_cache()
const noexcept
54 std::filesystem::path m_Root{}, m_Executable{}, m_CMakeCache{};
56 discoverable_paths(std::filesystem::path rt, std::filesystem::path exec, std::filesystem::path cmakeCache);
69 main_paths(std::filesystem::path file, std::filesystem::path commonIncludes);
71 explicit main_paths(std::filesystem::path file);
74 const std::filesystem::path& file()
const noexcept {
return m_File; }
77 const std::filesystem::path& dir()
const noexcept {
return m_Dir; }
80 const std::filesystem::path& common_includes()
const noexcept {
return m_CommonIncludes; }
83 std::filesystem::path cmake_lists()
const;
86 static std::filesystem::path default_main_cpp_from_root();
89 static std::filesystem::path default_cmake_from_root();
94 std::filesystem::path m_File{}, m_Dir{}, m_CommonIncludes{};
104 explicit source_paths(
const std::filesystem::path& projectRoot,
const std::optional<std::filesystem::path>& folderName = {});
107 const std::filesystem::path& project()
const noexcept
113 const std::filesystem::path& repo()
const noexcept
119 std::filesystem::path cmake_lists()
const;
124 std::filesystem::path m_Repo, m_Project;
127 static std::filesystem::path repo(std::filesystem::path projectRoot);
137 explicit tests_paths(std::filesystem::path projectRoot);
140 const std::filesystem::path& repo()
const noexcept
146 std::filesystem::path project_root()
const;
151 std::filesystem::path m_Repo;
164 const std::filesystem::path& repo()
const noexcept
170 std::filesystem::path project_root()
const;
173 std::filesystem::path sequoia_root()
const;
178 std::filesystem::path m_Repo;
191 const std::filesystem::path& repo()
const noexcept
199 std::filesystem::path m_Repo;
212 const std::filesystem::path& repo()
const noexcept
220 std::filesystem::path m_Repo;
230 build_paths(std::filesystem::path projectRoot, std::filesystem::path executableDir, std::filesystem::path cmakeCacheDir);
233 const std::filesystem::path& dir()
const {
return m_Dir; }
236 const std::filesystem::path& executable_dir()
const noexcept
238 return m_ExecutableDir;
242 const std::filesystem::path& cmake_cache_dir()
const noexcept
244 return m_CMakeCacheDir;
250 std::filesystem::path m_Dir{}, m_ExecutableDir{}, m_CMakeCacheDir{};
263 const std::filesystem::path& repo()
const noexcept
269 static std::filesystem::path repo(
const std::filesystem::path& projectRoot);
272 const std::filesystem::path& test_templates()
const noexcept
274 return m_TestTemplates;
278 static std::filesystem::path test_templates(
const std::filesystem::path& projectRoot);
281 const std::filesystem::path& source_templates()
const noexcept
283 return m_SourceTemplates;
287 static std::filesystem::path source_templates(
const std::filesystem::path& projectRoot);
290 const std::filesystem::path& project_template()
const noexcept
292 return m_ProjectTemplate;
296 static std::filesystem::path project_template(
const std::filesystem::path& projectRoot);
301 std::filesystem::path
321 const std::filesystem::path& dir()
const noexcept
327 static std::filesystem::path dir(std::filesystem::path outputDir);
330 std::filesystem::path recovery_file()
const;
333 std::filesystem::path dump_file()
const;
338 std::filesystem::path m_Dir{};
348 prune_paths(std::filesystem::path outputDir,
const std::filesystem::path& buildRoot,
const std::filesystem::path& buildDir);
351 const std::filesystem::path& dir()
const noexcept
357 std::filesystem::path stamp()
const;
360 std::filesystem::path failures(std::optional<std::size_t>
id)
const;
363 std::filesystem::path selected_passes(std::optional<std::size_t>
id)
const;
366 std::filesystem::path external_dependencies()
const;
369 std::filesystem::path instability_analysis()
const;
374 std::filesystem::path m_Dir{}, m_Stem{};
377 static std::filesystem::path make_stem(
const std::filesystem::path& buildDir);
380 std::filesystem::path make_path(std::optional<std::size_t>
id, std::string_view extension)
const;
391 explicit output_paths(
const std::filesystem::path& projectRoot);
394 const std::filesystem::path& dir()
const noexcept
400 static std::filesystem::path dir(std::filesystem::path projectRoot);
403 const std::filesystem::path& tests_temporary_data()
const noexcept
405 return m_TestsTemporaryData;
409 static std::filesystem::path tests_temporary_data(std::filesystem::path projectRoot);
412 const std::filesystem::path& diagnostics()
const noexcept
414 return m_Diagnostics;
418 static std::filesystem::path diagnostics(std::filesystem::path projectRoot);
421 const std::filesystem::path& test_summaries()
const noexcept
423 return m_TestSummaries;
427 static std::filesystem::path test_summaries(std::filesystem::path projectRoot);
430 const std::filesystem::path& instability_analysis()
const noexcept
432 return m_InstabilityAnalysis;
436 static std::filesystem::path instability_analysis_file(std::filesystem::path projectRoot, std::filesystem::path source, std::string_view name, std::size_t index);
439 static std::filesystem::path instability_analysis(std::filesystem::path projectRoot);
448 prune_paths prune(
const std::filesystem::path& buildRoot,
const std::filesystem::path& buildDir)
const
450 return {dir(), buildRoot, buildDir};
456 std::filesystem::path
458 m_TestsTemporaryData{},
461 m_InstabilityAnalysis{};
471 std::optional<std::filesystem::path> source_folder{};
473 std::vector<std::filesystem::path> additional_dependency_analysis_paths{};
475 std::filesystem::path main_cpp{main_paths::default_main_cpp_from_root()};
477 std::vector<std::filesystem::path> ancillary_main_cpps{};
479 std::filesystem::path common_includes{main_paths::default_main_cpp_from_root()};
487 const std::filesystem::path& project_root() const noexcept
489 return m_Discovered.root();
493 const std::filesystem::path& executable() const noexcept
495 return m_Discovered.executable();
499 const source_paths& source() const noexcept
505 const dependencies_paths& dependencies() const noexcept
507 return m_Dependencies;
511 const tests_paths& tests() const noexcept
517 const test_materials_paths& test_materials() const noexcept
523 const build_paths& build() const noexcept
529 const build_system_paths& build_system() const noexcept
531 return m_BuildSystem;
535 const auxiliary_paths& aux_paths() const noexcept
541 const output_paths& output() const noexcept
547 const main_paths& main() const noexcept
553 const std::vector<main_paths>& ancillary_main_cpps() const noexcept
555 return m_AncillaryMainCpps;
559 const discoverable_paths& discovered() const noexcept
565 std::span<const std::filesystem::path> additional_dependency_analysis_paths() const noexcept {
return m_AdditionalDependencyAnalysisPaths; }
568 prune_paths prune()
const;
571 friend bool operator==(
const project_paths&,
const project_paths&)
noexcept =
default;
573 discoverable_paths m_Discovered;
575 source_paths m_Source;
577 auxiliary_paths m_Auxiliary;
578 output_paths m_Output;
579 dependencies_paths m_Dependencies;
581 test_materials_paths m_Materials;
582 build_system_paths m_BuildSystem;
584 std::vector<main_paths> m_AncillaryMainCpps{};
585 std::vector<std::filesystem::path> m_AdditionalDependencyAnalysisPaths{};
Paths for auxiliary materials, used in creating projects/tests.
Definition: ProjectPaths.hpp:256
Paths relating to the build directory.
Definition: ProjectPaths.hpp:226
Paths relating to the build_system directory.
Definition: ProjectPaths.hpp:205
Paths relating to the dependencies directory.
Definition: ProjectPaths.hpp:157
Paths which are potentially discoverable from the commandline arguments.
Definition: ProjectPaths.hpp:27
Paths relating to the main cpp.
Definition: ProjectPaths.hpp:65
Paths in the output directory.
Definition: ProjectPaths.hpp:387
Paths used by the project.
Definition: ProjectPaths.hpp:467
Paths used when using dependencies to prune the number of tests.
Definition: ProjectPaths.hpp:344
Holds details of the file to which the last successfully completed test is registered.
Definition: ProjectPaths.hpp:314
Paths relating to the source directory.
Definition: ProjectPaths.hpp:100
Paths relating to the TestMaterials directory.
Definition: ProjectPaths.hpp:184
Paths relating to the Tests directory.
Definition: ProjectPaths.hpp:133
Definition: ProjectPaths.hpp:470