Keep warning-flood regression within one fixture build
Native and manual checks / native (ubuntu-24.04) (push) Failing after 36s
Native and manual checks / manual (push) Successful in 26s
Windows editor and software Vulkan / windows-graphics (push) Canceled after 0s
Native and manual checks / native (windows-2025) (push) Canceled after 0s

This commit is contained in:
Emil
2026-09-24 03:53:05 +03:00
parent 822b44f1d7
commit 798aa0e550
2 changed files with 8 additions and 20 deletions
+7 -14
View File
@@ -224,24 +224,17 @@ int test_main(int argc, char** argv) {
const auto previous_manifest = read_text(directory / "manifest.json");
atomic_write(config.project_root / "emit-clang-error-and-fail-build", "fixture\n");
const auto compile_failed = builds.wait(builds.start_build());
bool retained_compile_error = false;
for (const auto& diagnostic : compile_failed.diagnostics)
retained_compile_error |= diagnostic.value("severity", "") == "error" &&
diagnostic.value("file", "") == "Scripts/Gameplay.cpp";
check(compile_failed.state == "failed" &&
read_text(last_build) == previous_pointer &&
compile_failed.json().at("diagnostics").size() == 1 &&
compile_failed.json().at("diagnostics")[0].at("file") ==
"Scripts/Gameplay.cpp" &&
compile_failed.diagnostics.size() == 200 && retained_compile_error &&
compile_failed.log.find("dependency warning 249") != std::string::npos &&
compile_failed.log.find("fixture compile failure") != std::string::npos,
"Failed compiler output retains raw log and structured source location");
"Error after 250 warnings keeps raw log and structured source location");
fs::remove(config.project_root / "emit-clang-error-and-fail-build");
atomic_write(config.project_root / "flood-warnings-and-fail-build", "fixture\n");
const auto flooded = builds.wait(builds.start_build());
bool retained_error = false;
for (const auto& diagnostic : flooded.diagnostics)
retained_error |= diagnostic.value("severity", "") == "error" &&
diagnostic.value("file", "") == "Scripts/Gameplay.cpp";
check(flooded.state == "failed" && flooded.diagnostics.size() <= 200 &&
retained_error && read_text(last_build) == previous_pointer,
"Compiler errors survive bounded third-party warning floods");
fs::remove(config.project_root / "flood-warnings-and-fail-build");
atomic_write(config.project_root / "fail-unparseable-build", "fixture\n");
const auto generic_failed = builds.wait(builds.start_build());
check(generic_failed.state == "failed" &&
+1 -6
View File
@@ -40,15 +40,10 @@ int tool_main(int argc, char** argv) {
return 0;
}
if (argc > 2 && std::string_view(argv[1]) == "--build") {
if (fs::exists("flood-warnings-and-fail-build")) {
if (fs::exists("emit-clang-error-and-fail-build")) {
for (int index = 0; index < 250; ++index)
std::cerr << "/external/library.cpp:1:1: warning: dependency warning "
<< index << '\n';
std::cerr << path_to_utf8(fs::current_path() / "Scripts/Gameplay.cpp")
<< ":7:3: error: gameplay error after warnings\n";
return 1;
}
if (fs::exists("emit-clang-error-and-fail-build")) {
std::cerr << path_to_utf8(fs::current_path() / "Scripts/Gameplay.cpp")
<< ":7:3: error: fixture compile failure\n";
return 1;