#include #include #include #include #include #include #include int main() { using namespace std::chrono_literals; const auto bin = std::filesystem::read_symlink("/proc/self/exe").parent_path(); struct Inventory { const char *target; std::size_t minimum; const char *witness; }; for (const auto &[target, minimum, witness] : { Inventory{"vls_unit_tests", 29, "ProtocolEncodingTests.default_depth_counts_empty_containers"}, Inventory{"vls_json_capabilities", 8, "JsonCapabilities.rounded_fractional_id_cannot_change_lifecycle"}, Inventory{"vls_process_tests", 18, "ProviderProcess.database_binds_the_physical_translation_unit"}, Inventory{"vls_document_tests", 37, "BoundInputs.empty_inventory_detects_a_new_unsaved_header"}, Inventory{ "vls_workspace_tests", 46, "SemanticLease.checked_compdb_command_and_selection_survive_unchanged_status"}, Inventory{ "vls_build_model_tests", 18, "BuildModel.selection_preserves_conflicting_commands_and_follows_precedence"}, Inventory{ "vls_diagnostic_tests", 29, "SourceCatalogTests.first_missing_directory_invalidates_deeper_optional_lookup"}, Inventory{"vls_module_tests", 22, "ModuleGraph.noninterface_named_provision_requires_a_partition"}, Inventory{"vls_dap_tests", 7, "DapReplay.deferred_launch_finishes_after_configuration_done"}, Inventory{"vls_provider_tests", 42, "CommandImport.physical_owners_follow_links_before_parent_components"}, Inventory{"vls_reflection_tests", 24, "Reflection.virtual_view_links_source_ranges"}, Inventory{"vls_trace_tests", 21, "RecordingTests.retains_values_and_source_across_overwrite_replacement_and_" "unlink"}, }) { auto listed = Void::Process::run(bin / target, {"--list", "--no-color"}, {}, 5s); if (!listed || listed->exit_code != 0 || !listed->err.empty()) { std::cerr << "Could not enumerate " << target << '\n'; return 1; } std::set names; std::istringstream lines{listed->out}; for (std::string name; std::getline(lines, name);) { if (name.empty() || !names.insert(name).second) { std::cerr << target << " returned an empty or duplicate case name\n"; return 1; } } if (names.size() < minimum || !names.contains(witness)) { std::cerr << target << " has an incomplete inventory (" << names.size() << " cases)\n"; return 1; } } auto ran = Void::Process::run(bin / "vls_unit_tests", {"--no-color", "--filter", "^FramingTests.exact_frame_limits$"}, {}, 5s); if (!ran || ran->exit_code != 0 || !ran->out.contains("1 tests:") || !ran->out.contains("exact_frame_limits")) { std::cerr << "The named framing regression did not execute successfully\n"; return 1; } return 0; }