#!/usr/bin/octave --silent
#
# You'll need to use the .octaverc in this directory to get the proper
-# paths.
+# 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');
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);