svn commit: samba r19378 - in branches/SAMBA_4_0/source/torture: .
jelmer at samba.org
jelmer at samba.org
Tue Oct 17 19:36:56 GMT 2006
Author: jelmer
Date: 2006-10-17 19:36:55 +0000 (Tue, 17 Oct 2006)
New Revision: 19378
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19378
Log:
Add another type of test result 'error'
Modified:
branches/SAMBA_4_0/source/torture/smbtorture.c
branches/SAMBA_4_0/source/torture/ui.c
branches/SAMBA_4_0/source/torture/ui.h
Changeset:
Modified: branches/SAMBA_4_0/source/torture/smbtorture.c
===================================================================
--- branches/SAMBA_4_0/source/torture/smbtorture.c 2006-10-17 19:06:50 UTC (rev 19377)
+++ branches/SAMBA_4_0/source/torture/smbtorture.c 2006-10-17 19:36:55 UTC (rev 19378)
@@ -291,10 +291,12 @@
case TORTURE_FAIL:
printf("TEST %s FAILED! - %s\n", context->active_test->name, reason);
break;
+ case TORTURE_ERROR:
+ printf("ERROR IN TEST %s! - %s\n", context->active_test->name, reason);
+ break;
case TORTURE_SKIP:
printf("SKIP: %s - %s\n", context->active_test->name, reason);
break;
-
}
}
@@ -329,6 +331,9 @@
case TORTURE_FAIL:
printf("failure: %s", context->active_test->name);
break;
+ case TORTURE_ERROR:
+ printf("error: %s", context->active_test->name);
+ break;
case TORTURE_SKIP:
printf("skip: %s", context->active_test->name);
break;
@@ -364,6 +369,7 @@
printf("ok %s - %s\n", context->active_test->name, reason);
break;
case TORTURE_FAIL:
+ case TORTURE_ERROR:
printf("not ok %s - %s\n", context->active_test->name, reason);
break;
case TORTURE_SKIP:
@@ -407,6 +413,7 @@
switch (res) {
case TORTURE_OK: putchar('.'); break;
case TORTURE_FAIL: putchar('F'); break;
+ case TORTURE_ERROR: putchar('E'); break;
case TORTURE_SKIP: putchar('I'); break;
}
}
Modified: branches/SAMBA_4_0/source/torture/ui.c
===================================================================
--- branches/SAMBA_4_0/source/torture/ui.c 2006-10-17 19:06:50 UTC (rev 19377)
+++ branches/SAMBA_4_0/source/torture/ui.c 2006-10-17 19:36:55 UTC (rev 19378)
@@ -24,8 +24,7 @@
#include "torture/torture.h"
#include "lib/util/dlinklist.h"
-void torture_comment(struct torture_context *context,
- const char *comment, ...)
+void torture_comment(struct torture_context *context, const char *comment, ...)
{
va_list ap;
char *tmp;
@@ -172,6 +171,7 @@
switch (result) {
case TORTURE_SKIP: context->skipped++; break;
+ case TORTURE_ERROR: context->errors++; break;
case TORTURE_FAIL: context->failed++; break;
case TORTURE_OK: context->success++; break;
}
@@ -205,8 +205,8 @@
ret = test->run(context, tcase, test);
if (!ret) {
if (context->last_reason == NULL)
- context->last_reason = talloc_strdup(context, "...");
- context->last_result = TORTURE_FAIL;
+ context->last_reason = talloc_strdup(context, "Unknown error/failure");
+ context->last_result = TORTURE_ERROR;
}
torture_ui_test_result(context, context->last_result, context->last_reason);
Modified: branches/SAMBA_4_0/source/torture/ui.h
===================================================================
--- branches/SAMBA_4_0/source/torture/ui.h 2006-10-17 19:06:50 UTC (rev 19377)
+++ branches/SAMBA_4_0/source/torture/ui.h 2006-10-17 19:36:55 UTC (rev 19378)
@@ -29,8 +29,9 @@
enum torture_result {
TORTURE_OK=0,
- TORTURE_FAIL=1,
- TORTURE_SKIP=2
+ TORTURE_FAIL=1,
+ TORTURE_ERROR=2,
+ TORTURE_SKIP=3
};
/*
@@ -81,6 +82,7 @@
int todo;
int success;
int failed;
+ int errors;
bool quiet; /* Whether tests should avoid writing output to stdout */
More information about the samba-cvs
mailing list