diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-05-07 21:30:13 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-05-08 18:24:48 +0100 |
commit | 4e3c19833ef8631c1f1cd54870c0a86d88252886 (patch) | |
tree | 6031d112581e4e05105421010a63a28a8597bcf0 /test | |
parent | ad8abc01105f02a05497969b6b5ec2c8742daeb2 (diff) |
test: Force cairo-test-suite to return SUCCESS
Set the CAIRO_TEST_FORCE_PASS environment variable to run through the
test suite and ignore errors. Useful for forcing distcheck to continue
past a broken test suite.
Diffstat (limited to 'test')
-rw-r--r-- | test/cairo-test-runner.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/cairo-test-runner.c b/test/cairo-test-runner.c index 1e789ec2..d130321f 100644 --- a/test/cairo-test-runner.c +++ b/test/cairo-test-runner.c @@ -94,6 +94,7 @@ typedef struct _cairo_test_runner { cairo_bool_t list_only; cairo_bool_t full_test; cairo_bool_t exact_test_names; + cairo_bool_t force_pass; } cairo_test_runner_t; typedef enum { @@ -532,6 +533,9 @@ _runner_fini (cairo_test_runner_t *runner) cairo_test_fini (&runner->base); + if (runner->force_pass) + return CAIRO_TEST_SUCCESS; + return runner->num_failed + runner->num_crashed ? CAIRO_TEST_FAILURE : runner->num_passed + runner->num_xfailed ? @@ -672,6 +676,12 @@ main (int argc, char **argv) } } + if (getenv ("CAIRO_TEST_FORCE_PASS")) { + const char *env = getenv ("CAIRO_TEST_FORCE_PASS"); + + runner.force_pass = atoi (env); + } + _parse_cmdline (&runner, &argc, &argv); append_argv (&argc, &argv, getenv ("CAIRO_TESTS")); |