[PATCH] Restore samba-systemkrb5 tests

Andrew Bartlett abartlet at samba.org
Sat Jul 22 01:25:39 UTC 2017


The attached patch addresses a regression that caused only 7 tests to
run in the samba-systemkrb5 autobuild target.

We now match the previous number of tests, plus one that didn't match
the previous regular expression.

I do apologise for the regression.

Please review/push!

Thanks,

Andrew Bartlett
-- 
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba
-------------- next part --------------
From d3525f0b60a5c8bd7ce2217024e38f5dc8e92c32 Mon Sep 17 00:00:00 2001
From: Andrew Bartlett <abartlet at samba.org>
Date: Fri, 21 Jul 2017 20:10:43 +1200
Subject: [PATCH] selftest: Make --include-env and --exclude-env use the base
 env name

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
602772159dfd1213385f42ecbf31136f57693b63).

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

Signed-off-by: Andrew Bartlett <abartlet at samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12922
---
 selftest/selftest.pl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/selftest/selftest.pl b/selftest/selftest.pl
index 38de96d..b3ef658 100755
--- a/selftest/selftest.pl
+++ b/selftest/selftest.pl
@@ -1085,19 +1085,19 @@ $envvarstr
 		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;
 			}
 		    }
-- 
2.9.4



More information about the samba-technical mailing list