X-Git-Url: http://gitweb.michael.orlitzky.com/?p=octave.git;a=blobdiff_plain;f=run-tests.m;h=001e7409d00004d7cdc85a2e676cb29c9aa8e2f8;hp=a5373fc15d3214eefae5c7ea6187fe5e31dcf632;hb=f232366c34a718cde40d20c19759826280220e9e;hpb=ef3085ef3c40eab925219bad1c6dbb2c6e106727 diff --git a/run-tests.m b/run-tests.m index a5373fc..001e740 100755 --- a/run-tests.m +++ b/run-tests.m @@ -1,10 +1,32 @@ #!/usr/bin/octave --silent +# +# You'll need to use the .octaverc in this directory to get the proper +# paths. You can pass it an integer on the command-line to specify how +# many times we should run the test suite in succession. The default +# is 1. +# addpath('./unit_test'); +global unittest_results; + unit_init(1, {}); test_files = glob('tests/*.m'); +loop_count = 1; +arg_list = argv(); +if (length(arg_list) > 0) + loop_count = arg_list{1}; +end + ## Source every file that matches the glob above. -cellfun(@source, test_files); +for idx = [ 1 : loop_count ] + cellfun(@source, test_files); +end + + +fprintf('\n'); +fprintf('Total tests attempted: %d\n', unittest_results.total); +fprintf('Total tests passed: %d\n', unittest_results.pass); +fprintf('Total tests failed: %d\n', unittest_results.fail);