1.1 --- a/test-driver.c Wed Mar 05 10:46:40 2008 -0500
1.2 +++ b/test-driver.c Sat Apr 05 00:44:45 2008 -0400
1.3 @@ -64,9 +64,9 @@
1.4 char *install_pkgs[3], *remove_pkgs[3];
1.5 int n_install_pkgs, n_remove_pkgs;
1.6
1.7 - int in_result, result_errors;
1.8 + int in_result;
1.9
1.10 - int debug;
1.11 + int debug, errors;
1.12 };
1.13
1.14 static void
1.15 @@ -214,7 +214,7 @@
1.16
1.17 fprintf(stderr, " didn't get unsatisfiable '%s %s %s'\n",
1.18 name, razor_version_relations[rel], version);
1.19 - exit(1);
1.20 + ctx->errors++;
1.21 }
1.22
1.23 static void
1.24 @@ -317,7 +317,7 @@
1.25 {
1.26 struct test_context *ctx = data;
1.27
1.28 - ctx->result_errors++;
1.29 + ctx->errors++;
1.30 if (old_version) {
1.31 fprintf(stderr, " result set should not contain %s %s\n",
1.32 name, old_version);
1.33 @@ -335,11 +335,8 @@
1.34 if (ctx->result_set) {
1.35 if (!ctx->system_set)
1.36 ctx->system_set = razor_set_create();
1.37 - ctx->result_errors = 0;
1.38 razor_set_diff(ctx->system_set, ctx->result_set,
1.39 diff_callback, ctx);
1.40 - if (ctx->result_errors)
1.41 - exit(1);
1.42 }
1.43 }
1.44
1.45 @@ -443,5 +440,9 @@
1.46
1.47 parse_xml_file(test_file, start_test_element, end_test_element, &ctx);
1.48
1.49 - return 0;
1.50 + if (ctx.errors) {
1.51 + fprintf(stderr, "\n%d errors\n", ctx.errors);
1.52 + return 1;
1.53 + } else
1.54 + return 0;
1.55 }