summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2023-01-10 01:34:26 +0000
committerTom Lane2023-01-10 01:34:26 +0000
commitbd8d453e9b5f8b632a400a9e796fc041aed76d82 (patch)
tree79dc2baf094ee39431652cd2209c656cf7a9f3e5
parent09d517773f606baef7958aa5bad25d3b3c30303e (diff)
Remove pg_regress' never-documented "ignore" feature.
We aren't using this anymore in the wake of commit 09d517773, so delete it. We can always revert this if some future use emerges, but I think our standards for test quality are now high enough that that will never happen. Discussion: https://postgr.es/m/[email protected]
-rw-r--r--src/test/regress/pg_regress.c60
1 files changed, 5 insertions, 55 deletions
diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c
index 40e6c231a3..6cd5998b9d 100644
--- a/src/test/regress/pg_regress.c
+++ b/src/test/regress/pg_regress.c
@@ -111,7 +111,6 @@ static bool postmaster_running = false;
static int success_count = 0;
static int fail_count = 0;
-static int fail_ignore_count = 0;
static bool directory_exists(const char *dir);
static void make_directory(const char *dir);
@@ -1529,7 +1528,6 @@ run_schedule(const char *schedule, test_start_function startfunc,
instr_time starttimes[MAX_PARALLEL_TESTS];
instr_time stoptimes[MAX_PARALLEL_TESTS];
int statuses[MAX_PARALLEL_TESTS];
- _stringlist *ignorelist = NULL;
char scbuf[1024];
FILE *scf;
int line_num = 0;
@@ -1566,20 +1564,6 @@ run_schedule(const char *schedule, test_start_function startfunc,
continue;
if (strncmp(scbuf, "test: ", 6) == 0)
test = scbuf + 6;
- else if (strncmp(scbuf, "ignore: ", 8) == 0)
- {
- c = scbuf + 8;
- while (*c && isspace((unsigned char) *c))
- c++;
- add_stringlist_item(&ignorelist, c);
-
- /*
- * Note: ignore: lines do not run the test, they just say that
- * failure of this test when run later on is to be ignored. A bit
- * odd but that's how the shell-script version did it.
- */
- continue;
- }
else
{
fprintf(stderr, _("syntax error in schedule file \"%s\" line %d: %s\n"),
@@ -1715,27 +1699,8 @@ run_schedule(const char *schedule, test_start_function startfunc,
if (differ)
{
- bool ignore = false;
- _stringlist *sl;
-
- for (sl = ignorelist; sl != NULL; sl = sl->next)
- {
- if (strcmp(tests[i], sl->str) == 0)
- {
- ignore = true;
- break;
- }
- }
- if (ignore)
- {
- status(_("failed (ignored)"));
- fail_ignore_count++;
- }
- else
- {
- status(_("FAILED"));
- fail_count++;
- }
+ status(_("FAILED"));
+ fail_count++;
}
else
{
@@ -1762,8 +1727,6 @@ run_schedule(const char *schedule, test_start_function startfunc,
}
}
- free_stringlist(&ignorelist);
-
fclose(scf);
}
@@ -2516,7 +2479,7 @@ regression_main(int argc, char *argv[],
* conserve disk space. (If there were errors, we leave the instance in
* place for possible manual investigation.)
*/
- if (temp_instance && fail_count == 0 && fail_ignore_count == 0)
+ if (temp_instance && fail_count == 0)
{
header(_("removing temporary instance"));
if (!rmtree(temp_instance, true))
@@ -2529,28 +2492,15 @@ regression_main(int argc, char *argv[],
/*
* Emit nice-looking summary message
*/
- if (fail_count == 0 && fail_ignore_count == 0)
+ if (fail_count == 0)
snprintf(buf, sizeof(buf),
_(" All %d tests passed. "),
success_count);
- else if (fail_count == 0) /* fail_count=0, fail_ignore_count>0 */
- snprintf(buf, sizeof(buf),
- _(" %d of %d tests passed, %d failed test(s) ignored. "),
- success_count,
- success_count + fail_ignore_count,
- fail_ignore_count);
- else if (fail_ignore_count == 0) /* fail_count>0 && fail_ignore_count=0 */
+ else
snprintf(buf, sizeof(buf),
_(" %d of %d tests failed. "),
fail_count,
success_count + fail_count);
- else
- /* fail_count>0 && fail_ignore_count>0 */
- snprintf(buf, sizeof(buf),
- _(" %d of %d tests failed, %d of these failures ignored. "),
- fail_count + fail_ignore_count,
- success_count + fail_count + fail_ignore_count,
- fail_ignore_count);
putchar('\n');
for (i = strlen(buf); i > 0; i--)