From 033983efc6e0a571a5d3fee1a1588636a236e4b2 Mon Sep 17 00:00:00 2001 From: nakst <> Date: Fri, 31 Dec 2021 19:04:23 +0000 Subject: [PATCH] create log of failed tests --- util/build.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util/build.c b/util/build.c index 76ca0d0..1cfa6e2 100644 --- a/util/build.c +++ b/util/build.c @@ -1625,6 +1625,7 @@ void DoCommand(const char *l) { int successCount = 0, failureCount = 0; CallSystem("mkdir -p root/Essence/Settings/API\\ Tests"); + FILE *testFailures = fopen("bin/Logs/Test Failures.txt", "wb"); for (int optimisations = 0; optimisations <= 1; optimisations++) { for (uint32_t index = 0; index < sizeof(tests) / sizeof(tests[0]); index++) { @@ -1650,11 +1651,13 @@ void DoCommand(const char *l) { else failureCount++; free(log); if (!success) CallSystemF("mv bin/Logs/qemu_serial1.txt bin/Logs/test_%d_%d.txt", optimisations, index); + if (!success) fprintf(testFailures, "%d/%d %s\n", optimisations, index, tests[index].cName); } } stopTests:; fprintf(stderr, ColorHighlight "%d/%d tests succeeded." ColorNormal "\n", successCount, successCount + failureCount); + fclose(testFailures); if (failureCount && automatedBuild) exit(1); } else if (0 == strcmp(l, "setup-pre-built-toolchain")) { CallSystem("mv bin/source cross");