Skip to content

Commit

Permalink
selftest: Make --include-env and --exclude-env use the base env name
Browse files Browse the repository at this point in the history
The code as deployed would have required (eg) '--include-env=ktest
--include-env=ktest:local' which was not done in autobuild, causing
tests to be skipped.  This patch restores the intended behaviour.

This causes 33 testsuites to run, one more test (the newly added
samba.tests.ntlmauth) than the old regex provided (before
6027721).

(The regression dropped us down to matching only 7 tests).

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12922

Signed-off-by: Andrew Bartlett <[email protected]>
Reviewed-by: Stefan Metzmacher <[email protected]>

Autobuild-User(master): Stefan Metzmacher <[email protected]>
Autobuild-Date(master): Mon Jul 24 03:33:01 CEST 2017 on sn-devel-144
  • Loading branch information
abartlet authored and metze-samba committed Jul 24, 2017
1 parent 312947f commit 61455ad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions selftest/selftest.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1085,19 +1085,19 @@ ($)
my $cmd = $$_[2];
my $name = $$_[0];
my $envname = $$_[1];

my ($env_basename, $env_localpart) = split(/:/, $envname);
my $envvars = "SKIP";

if (@opt_include_env) {
foreach my $env (@opt_include_env) {
if ($envname eq $env) {
if ($env_basename eq $env) {
$envvars = setup_env($envname, $prefix);
}
}
} elsif (@opt_exclude_env) {
my $excluded = 0;
foreach my $env (@opt_exclude_env) {
if ($envname eq $env) {
if ($env_basename eq $env) {
$excluded = 1;
}
}
Expand Down

0 comments on commit 61455ad

Please sign in to comment.