1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

r21055: Fix executable bit.

(This used to be commit 7512270ffa)
This commit is contained in:
Jelmer Vernooij 2007-01-30 12:10:42 +00:00 committed by Gerald (Jerry) Carter
parent de37adbf27
commit cf09c00c4e
7 changed files with 5 additions and 91 deletions

0
source4/script/buildtree.pl Normal file → Executable file
View File

0
source4/script/installjsonrpc.sh Normal file → Executable file
View File

0
source4/script/installwebapps.sh Normal file → Executable file
View File

View File

@ -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);

View File

@ -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;
}

View File

@ -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,

View File

@ -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;
};