diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2012-10-26 15:53:57 -0800 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2012-10-27 05:16:19 -0800 |
commit | 67dd28f3605db4cbdc5feacc1121ec3d7dd075a6 (patch) | |
tree | 3dc878050bf9dac2827ddb7d5607f7ce86736fab /selftest/selftest.pl | |
parent | 1190f385f72f68f22277c8b380f2d4c461c413a4 (diff) | |
download | samba-67dd28f3605db4cbdc5feacc1121ec3d7dd075a6.tar.gz |
selftest: Add --random-order option.
Diffstat (limited to 'selftest/selftest.pl')
-rwxr-xr-x | selftest/selftest.pl | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/selftest/selftest.pl b/selftest/selftest.pl index b50853e54d3..ffb61495a9e 100755 --- a/selftest/selftest.pl +++ b/selftest/selftest.pl @@ -42,6 +42,7 @@ my $opt_quick = 0; my $opt_socket_wrapper = 0; my $opt_socket_wrapper_pcap = undef; my $opt_socket_wrapper_keep_pcap = undef; +my $opt_random_order = 0; my $opt_one = 0; my @opt_exclude = (); my @opt_include = (); @@ -236,8 +237,9 @@ my $result = GetOptions ( 'ldap:s' => \$ldap, 'resetup-environment' => \$opt_resetup_env, 'testlist=s' => \@testlists, + 'random-order' => \$opt_random_order, 'load-list=s' => \$opt_load_list, - 'binary-mapping=s' => \$opt_binary_mapping + 'binary-mapping=s' => \$opt_binary_mapping ); exit(1) if (not $result); @@ -825,6 +827,12 @@ sub teardown_env($) # This 'global' file needs to be empty when we start unlink("$prefix_abs/dns_host_file"); +if ($opt_random_order) { + require List::Util; + my @newtodo = List::Util::shuffle(@todo); + @todo = @newtodo; +} + if ($opt_testenv) { my $testenv_name = $ENV{SELFTEST_TESTENV}; $testenv_name = $testenv_default unless defined($testenv_name); |