AZTEC: workaround MSVC optimizer deciding not to emit code for

inner top/right/bottom/left loops of `az_populate_map()` by
  jiggling them around a bit, ticket #317, props Andre Maute
frontend/tests: clean up any directories created in `test_input()`,
  ticket #316, props Andre Maute
This commit is contained in:
gitlost 2024-05-27 03:06:27 +01:00
parent c8bb299908
commit 3960dfdbfc
2 changed files with 31 additions and 27 deletions

View file

@ -552,6 +552,7 @@ static void test_input(const testCtx *const p_ctx) {
for (i = 0; i < data_size; i++) {
int j;
char *slash;
if (testContinue(p_ctx, i)) continue;
#ifdef _WIN32
@ -591,8 +592,14 @@ static void test_input(const testCtx *const p_ctx) {
}
assert_zero(testUtilRemove(input_filename), "i:%d testUtilRemove(%s) != 0 (%d: %s)\n", i, input_filename, errno, strerror(errno));
if (data[i].batch && data[i].mirror && data[i].outfile && data[i].outfile[0] && strcmp(data[i].outfile, TEST_MIRRORED_DIR_TOO_LONG) != 0) {
assert_zero(testUtilRmDir(data[i].outfile), "i:%d testUtilRmDir(%s) != 0 (%d: %s)\n", i, data[i].outfile, errno, strerror(errno));
/* Remove directory if any */
if (data[i].outfile && (slash = strrchr(data[i].outfile, '/')) != NULL && strcmp(data[i].outfile, TEST_MIRRORED_DIR_TOO_LONG) != 0) {
char dirpath[256];
assert_nonzero((size_t) (slash - data[i].outfile) < sizeof(dirpath), "i: %d output directory too long\n", i);
strncpy(dirpath, data[i].outfile, slash - data[i].outfile);
dirpath[slash - data[i].outfile] = '\0';
assert_zero(testUtilRmDir(dirpath), "i:%d testUtilRmDir(%s) != 0 (%d: %s)\n", i, dirpath, errno, strerror(errno));
}
}