From cf09c00c4e96c49e334fa0a68b438eaa6c69d270 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 30 Jan 2007 12:10:42 +0000 Subject: r21055: Fix executable bit. (This used to be commit 7512270ffae4e72d70f6ca347f09708f1bf915ad) --- source4/script/buildtree.pl | 0 source4/script/installjsonrpc.sh | 0 source4/script/installwebapps.sh | 0 source4/torture/smbtorture.c | 45 +--------------------------------------- source4/torture/torture.c | 5 ----- source4/torture/ui.c | 28 ++----------------------- source4/torture/ui.h | 18 ++-------------- 7 files changed, 5 insertions(+), 91 deletions(-) mode change 100644 => 100755 source4/script/buildtree.pl mode change 100644 => 100755 source4/script/installjsonrpc.sh mode change 100644 => 100755 source4/script/installwebapps.sh diff --git a/source4/script/buildtree.pl b/source4/script/buildtree.pl old mode 100644 new mode 100755 diff --git a/source4/script/installjsonrpc.sh b/source4/script/installjsonrpc.sh old mode 100644 new mode 100755 diff --git a/source4/script/installwebapps.sh b/source4/script/installwebapps.sh old mode 100644 new mode 100755 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;iresults.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; }; -- cgit