summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rwxr-xr-x[-rw-r--r--]source4/script/buildtree.pl0
-rwxr-xr-x[-rw-r--r--]source4/script/installjsonrpc.sh0
-rwxr-xr-x[-rw-r--r--]source4/script/installwebapps.sh0
-rw-r--r--source4/torture/smbtorture.c45
-rw-r--r--source4/torture/torture.c5
-rw-r--r--source4/torture/ui.c28
-rw-r--r--source4/torture/ui.h18
7 files changed, 5 insertions, 91 deletions
diff --git a/source4/script/buildtree.pl b/source4/script/buildtree.pl
index be5170e7d1..be5170e7d1 100644..100755
--- a/source4/script/buildtree.pl
+++ b/source4/script/buildtree.pl
diff --git a/source4/script/installjsonrpc.sh b/source4/script/installjsonrpc.sh
index b91f6bf3bb..b91f6bf3bb 100644..100755
--- a/source4/script/installjsonrpc.sh
+++ b/source4/script/installjsonrpc.sh
diff --git a/source4/script/installwebapps.sh b/source4/script/installwebapps.sh
index 25a43dba24..25a43dba24 100644..100755
--- a/source4/script/installwebapps.sh
+++ b/source4/script/installwebapps.sh
diff --git a/source4/torture/smbtorture.c b/source4/torture/smbtorture.c
index 210149215b..79b00494ca 100644
--- a/source4/torture/smbtorture.c
+++ b/source4/torture/smbtorture.c
@@ -670,57 +670,14 @@ int main(int argc,char *argv[])
} else if (shell) {
run_shell(torture);
} else {
- int total;
- double rate;
- int unexpected_failures;
for (i=2;i<argc_new;i++) {
if (!run_test(torture, argv_new[i])) {
correct = false;
}
}
-
- unexpected_failures = str_list_length(torture->results.unexpected_failures);
-
- total = torture->results.skipped+torture->results.success+torture->results.failed+torture->results.errors;
- if (total == 0) {
- printf("No tests run.\n");
- } else {
- rate = ((total - unexpected_failures - torture->results.errors) * (100.0 / total));
-
- printf("Tests: %d, Failures: %d", total, torture->results.failed);
- if (torture->results.failed - unexpected_failures) {
- printf(" (%d expected)", torture->results.failed - unexpected_failures);
- }
- printf(", Errors: %d, Skipped: %d. Success rate: %.2f%%\n",
- torture->results.errors, torture->results.skipped, rate);
- }
-
- if (unexpected_failures) {
- printf("The following tests failed:\n");
- for (i = 0; torture->results.unexpected_failures[i]; i++) {
- printf(" %s\n", torture->results.unexpected_failures[i]);
- }
- printf("\n");
- }
-
- if (str_list_length(torture->results.unexpected_errors)) {
- printf("Errors occurred while running the following tests:\n");
- for (i = 0; torture->results.unexpected_errors[i]; i++) {
- printf(" %s\n", torture->results.unexpected_errors[i]);
- }
- printf("\n");
- }
-
- if (str_list_length(torture->results.unexpected_successes)) {
- printf("The following tests were expected to fail but succeeded:\n");
- for (i = 0; torture->results.unexpected_successes[i]; i++) {
- printf(" %s\n", torture->results.unexpected_successes[i]);
- }
- printf("\n");
- }
}
- if (torture->results.returncode) {
+ if (torture->returncode) {
return(0);
} else {
return(1);
diff --git a/source4/torture/torture.c b/source4/torture/torture.c
index 45d7c0e5af..4befd2c043 100644
--- a/source4/torture/torture.c
+++ b/source4/torture/torture.c
@@ -45,15 +45,10 @@ struct torture_context *torture_context_init(TALLOC_CTX *mem_ctx,
const char *known_failures_file,
const struct torture_ui_ops *ui_ops)
{
- int numlines;
struct torture_context *torture = talloc_zero(mem_ctx,
struct torture_context);
- torture->expected_failures = file_lines_load(known_failures_file, &numlines,
- torture);
torture->ui_ops = ui_ops;
- torture->results.returncode = true;
-
return torture;
}
diff --git a/source4/torture/ui.c b/source4/torture/ui.c
index 42c624fd2b..6368d47991 100644
--- a/source4/torture/ui.c
+++ b/source4/torture/ui.c
@@ -188,32 +188,8 @@ void torture_ui_test_result(struct torture_context *context,
if (context->ui_ops->test_result)
context->ui_ops->test_result(context, result, comment);
- if (result == TORTURE_SKIP) {
- context->results.skipped++;
- } else if (result == TORTURE_OK) {
- if (str_list_match(context->active_testname,
- context->expected_failures)) {
- context->results.unexpected_successes = str_list_add(
- context->results.unexpected_successes,
- talloc_reference(context, context->active_testname));
- }
- context->results.success++;
- } else if (result == TORTURE_ERROR) {
- context->results.unexpected_errors = str_list_add(
- context->results.unexpected_errors,
- talloc_reference(context, context->active_testname));
- context->results.errors++;
- context->results.returncode = false;
- } else if (result == TORTURE_FAIL) {
- if (0 == str_list_match(context->active_testname,
- context->expected_failures)) {
- context->results.unexpected_failures = str_list_add(
- context->results.unexpected_failures,
- talloc_reference(context, context->active_testname));
- context->results.returncode = false;
- }
- context->results.failed++;
- }
+ if (result == TORTURE_ERROR || result == TORTURE_FAIL)
+ context->returncode = false;
}
static BOOL internal_torture_run_test(struct torture_context *context,
diff --git a/source4/torture/ui.h b/source4/torture/ui.h
index 700dadd9b1..8c4d3b6729 100644
--- a/source4/torture/ui.h
+++ b/source4/torture/ui.h
@@ -79,27 +79,13 @@ struct torture_context
struct torture_test *active_test;
struct torture_tcase *active_tcase;
- char **expected_failures;
-
- struct torture_results {
- int skipped;
- int todo;
- int success;
- int failed;
- int errors;
-
- const char **unexpected_failures;
- const char **unexpected_successes;
- const char **unexpected_errors;
-
- bool returncode;
- } results;
-
bool quiet; /* Whether tests should avoid writing output to stdout */
enum torture_result last_result;
char *last_reason;
+ bool returncode;
+
char *outputdir;
int level;
};