You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by gb...@apache.org on 2019/06/26 06:27:31 UTC

svn commit: r1862101 - in /spamassassin: branches/3.4/t/ trunk/t/

Author: gbechis
Date: Wed Jun 26 06:27:31 2019
New Revision: 1862101

URL: http://svn.apache.org/viewvc?rev=1862101&view=rev
Log:
skip regression test if sudo(8) is not installed
fix bz #6665

Modified:
    spamassassin/branches/3.4/t/root_spamd.t
    spamassassin/branches/3.4/t/root_spamd_tell.t
    spamassassin/branches/3.4/t/root_spamd_tell_paranoid.t
    spamassassin/branches/3.4/t/root_spamd_tell_x.t
    spamassassin/branches/3.4/t/root_spamd_tell_x_paranoid.t
    spamassassin/branches/3.4/t/root_spamd_u.t
    spamassassin/branches/3.4/t/root_spamd_u_dcc.t
    spamassassin/branches/3.4/t/root_spamd_virtual.t
    spamassassin/branches/3.4/t/root_spamd_x.t
    spamassassin/branches/3.4/t/root_spamd_x_paranoid.t
    spamassassin/branches/3.4/t/root_spamd_x_u.t
    spamassassin/trunk/t/root_spamd.t
    spamassassin/trunk/t/root_spamd_tell.t
    spamassassin/trunk/t/root_spamd_tell_paranoid.t
    spamassassin/trunk/t/root_spamd_tell_x.t
    spamassassin/trunk/t/root_spamd_tell_x_paranoid.t
    spamassassin/trunk/t/root_spamd_u.t
    spamassassin/trunk/t/root_spamd_u_dcc.t
    spamassassin/trunk/t/root_spamd_virtual.t
    spamassassin/trunk/t/root_spamd_x.t
    spamassassin/trunk/t/root_spamd_x_paranoid.t
    spamassassin/trunk/t/root_spamd_x_u.t

Modified: spamassassin/branches/3.4/t/root_spamd.t
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/t/root_spamd.t?rev=1862101&r1=1862100&r2=1862101&view=diff
==============================================================================
--- spamassassin/branches/3.4/t/root_spamd.t (original)
+++ spamassassin/branches/3.4/t/root_spamd.t Wed Jun 26 06:27:31 2019
@@ -5,9 +5,12 @@
 use lib '.'; use lib 't';
 use SATest; sa_t_init("root_spamd");
 
+use constant HAS_SUDO => eval { $_ = untaint_cmd("which sudo 2>/dev/null"); chomp; -x };
+
 use Test::More;
 plan skip_all => "root tests disabled" unless conf_bool('run_root_tests');
 plan skip_all => "not running tests as root" unless eval { ($> == 0); };
+plan skip_all => "sudo executable not found in path" unless HAS_SUDO;
 plan tests => 14;
 
 # ---------------------------------------------------------------------------

Modified: spamassassin/branches/3.4/t/root_spamd_tell.t
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/t/root_spamd_tell.t?rev=1862101&r1=1862100&r2=1862101&view=diff
==============================================================================
--- spamassassin/branches/3.4/t/root_spamd_tell.t (original)
+++ spamassassin/branches/3.4/t/root_spamd_tell.t Wed Jun 26 06:27:31 2019
@@ -3,9 +3,12 @@
 use lib '.'; use lib 't';
 use SATest; sa_t_init("root_spamd_tell");
 
+use constant HAS_SUDO => eval { $_ = untaint_cmd("which sudo 2>/dev/null"); chomp; -x };
+
 use Test::More;
 plan skip_all => "root tests disabled" unless conf_bool('run_root_tests');
 plan skip_all => "not running tests as root" unless eval { ($> == 0); };
+plan skip_all => "sudo executable not found in path" unless HAS_SUDO;
 plan tests => 6;
 
 # ---------------------------------------------------------------------------

Modified: spamassassin/branches/3.4/t/root_spamd_tell_paranoid.t
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/t/root_spamd_tell_paranoid.t?rev=1862101&r1=1862100&r2=1862101&view=diff
==============================================================================
--- spamassassin/branches/3.4/t/root_spamd_tell_paranoid.t (original)
+++ spamassassin/branches/3.4/t/root_spamd_tell_paranoid.t Wed Jun 26 06:27:31 2019
@@ -3,9 +3,12 @@
 use lib '.'; use lib 't';
 use SATest; sa_t_init("root_spamd_tell_paranoid");
 
+use constant HAS_SUDO => eval { $_ = untaint_cmd("which sudo 2>/dev/null"); chomp; -x };
+
 use Test::More;
 plan skip_all => "root tests disabled" unless conf_bool('run_root_tests');
 plan skip_all => "not running tests as root" unless eval { ($> == 0); };
+plan skip_all => "sudo executable not found in path" unless HAS_SUDO;
 plan tests => 6;
 
 # ---------------------------------------------------------------------------

Modified: spamassassin/branches/3.4/t/root_spamd_tell_x.t
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/t/root_spamd_tell_x.t?rev=1862101&r1=1862100&r2=1862101&view=diff
==============================================================================
--- spamassassin/branches/3.4/t/root_spamd_tell_x.t (original)
+++ spamassassin/branches/3.4/t/root_spamd_tell_x.t Wed Jun 26 06:27:31 2019
@@ -3,9 +3,12 @@
 use lib '.'; use lib 't';
 use SATest; sa_t_init("root_spamd_tell_x");
 
+use constant HAS_SUDO => eval { $_ = untaint_cmd("which sudo 2>/dev/null"); chomp; -x };
+
 use Test::More;
 plan skip_all => "root tests disabled" unless conf_bool('run_root_tests');
 plan skip_all => "not running tests as root" unless eval { ($> == 0); };
+plan skip_all => "sudo executable not found in path" unless HAS_SUDO;
 plan tests => 6;
 
 # ---------------------------------------------------------------------------

Modified: spamassassin/branches/3.4/t/root_spamd_tell_x_paranoid.t
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/t/root_spamd_tell_x_paranoid.t?rev=1862101&r1=1862100&r2=1862101&view=diff
==============================================================================
--- spamassassin/branches/3.4/t/root_spamd_tell_x_paranoid.t (original)
+++ spamassassin/branches/3.4/t/root_spamd_tell_x_paranoid.t Wed Jun 26 06:27:31 2019
@@ -3,9 +3,12 @@
 use lib '.'; use lib 't';
 use SATest; sa_t_init("root_spamd_tell_x_paranoid");
 
+use constant HAS_SUDO => eval { $_ = untaint_cmd("which sudo 2>/dev/null"); chomp; -x };
+
 use Test::More;
 plan skip_all => "root tests disabled" unless conf_bool('run_root_tests');
 plan skip_all => "not running tests as root" unless eval { ($> == 0); };
+plan skip_all => "sudo executable not found in path" unless HAS_SUDO;
 plan tests => 6;
 
 # ---------------------------------------------------------------------------

Modified: spamassassin/branches/3.4/t/root_spamd_u.t
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/t/root_spamd_u.t?rev=1862101&r1=1862100&r2=1862101&view=diff
==============================================================================
--- spamassassin/branches/3.4/t/root_spamd_u.t (original)
+++ spamassassin/branches/3.4/t/root_spamd_u.t Wed Jun 26 06:27:31 2019
@@ -5,9 +5,12 @@
 use lib '.'; use lib 't';
 use SATest; sa_t_init("root_spamd_u");
 
+use constant HAS_SUDO => eval { $_ = untaint_cmd("which sudo 2>/dev/null"); chomp; -x };
+
 use Test::More;
 plan skip_all => "root tests disabled" unless conf_bool('run_root_tests');
 plan skip_all => "not running tests as root" unless eval { ($> == 0); };
+plan skip_all => "sudo executable not found in path" unless HAS_SUDO;
 plan tests => 11;
 
 # ---------------------------------------------------------------------------

Modified: spamassassin/branches/3.4/t/root_spamd_u_dcc.t
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/t/root_spamd_u_dcc.t?rev=1862101&r1=1862100&r2=1862101&view=diff
==============================================================================
--- spamassassin/branches/3.4/t/root_spamd_u_dcc.t (original)
+++ spamassassin/branches/3.4/t/root_spamd_u_dcc.t Wed Jun 26 06:27:31 2019
@@ -6,10 +6,13 @@
 use lib '.'; use lib 't';
 use SATest; sa_t_init("root_spamd_u_dcc");
 
+use constant HAS_SUDO => eval { $_ = untaint_cmd("which sudo 2>/dev/null"); chomp; -x };
+
 use Test::More;
 plan skip_all => "root tests disabled" unless conf_bool('run_root_tests');
 plan skip_all => "DCC tests disabled" unless conf_bool('run_dcc_tests');
 plan skip_all => "not running tests as root" unless eval { ($> == 0); };
+plan skip_all => "sudo executable not found in path" unless HAS_SUDO;
 plan tests => 23;
 
 # ---------------------------------------------------------------------------

Modified: spamassassin/branches/3.4/t/root_spamd_virtual.t
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/t/root_spamd_virtual.t?rev=1862101&r1=1862100&r2=1862101&view=diff
==============================================================================
--- spamassassin/branches/3.4/t/root_spamd_virtual.t (original)
+++ spamassassin/branches/3.4/t/root_spamd_virtual.t Wed Jun 26 06:27:31 2019
@@ -5,9 +5,12 @@
 use lib '.'; use lib 't';
 use SATest; sa_t_init("root_spamd_virtual");
 
+use constant HAS_SUDO => eval { $_ = untaint_cmd("which sudo 2>/dev/null"); chomp; -x };
+
 use Test::More;
 plan skip_all => "root tests disabled" unless conf_bool('run_root_tests');
 plan skip_all => "not running tests as root" unless eval { ($> == 0); };
+plan skip_all => "sudo executable not found in path" unless HAS_SUDO;
 plan tests => 14;
 
 # ---------------------------------------------------------------------------

Modified: spamassassin/branches/3.4/t/root_spamd_x.t
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/t/root_spamd_x.t?rev=1862101&r1=1862100&r2=1862101&view=diff
==============================================================================
--- spamassassin/branches/3.4/t/root_spamd_x.t (original)
+++ spamassassin/branches/3.4/t/root_spamd_x.t Wed Jun 26 06:27:31 2019
@@ -3,9 +3,12 @@
 use lib '.'; use lib 't';
 use SATest; sa_t_init("root_spamd_x");
 
+use constant HAS_SUDO => eval { $_ = untaint_cmd("which sudo 2>/dev/null"); chomp; -x };
+
 use Test::More;
 plan skip_all => "root tests disabled" unless conf_bool('run_root_tests');
 plan skip_all => "not running tests as root" unless eval { ($> == 0); };
+plan skip_all => "sudo executable not found in path" unless HAS_SUDO;
 plan tests => 14;
 
 # ---------------------------------------------------------------------------

Modified: spamassassin/branches/3.4/t/root_spamd_x_paranoid.t
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/t/root_spamd_x_paranoid.t?rev=1862101&r1=1862100&r2=1862101&view=diff
==============================================================================
--- spamassassin/branches/3.4/t/root_spamd_x_paranoid.t (original)
+++ spamassassin/branches/3.4/t/root_spamd_x_paranoid.t Wed Jun 26 06:27:31 2019
@@ -3,9 +3,12 @@
 use lib '.'; use lib 't';
 use SATest; sa_t_init("root_spamd_x_paranoid");
 
+use constant HAS_SUDO => eval { $_ = untaint_cmd("which sudo 2>/dev/null"); chomp; -x };
+
 use Test::More;
 plan skip_all => "root tests disabled" unless conf_bool('run_root_tests');
 plan skip_all => "not running tests as root" unless eval { ($> == 0); };
+plan skip_all => "sudo executable not found in path" unless HAS_SUDO;
 plan tests => 14;
 
 # ---------------------------------------------------------------------------

Modified: spamassassin/branches/3.4/t/root_spamd_x_u.t
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/t/root_spamd_x_u.t?rev=1862101&r1=1862100&r2=1862101&view=diff
==============================================================================
--- spamassassin/branches/3.4/t/root_spamd_x_u.t (original)
+++ spamassassin/branches/3.4/t/root_spamd_x_u.t Wed Jun 26 06:27:31 2019
@@ -5,9 +5,12 @@
 use lib '.'; use lib 't';
 use SATest; sa_t_init("root_spamd_x_u");
 
+use constant HAS_SUDO => eval { $_ = untaint_cmd("which sudo 2>/dev/null"); chomp; -x };
+
 use Test::More;
 plan skip_all => "root tests disabled" unless conf_bool('run_root_tests');
 plan skip_all => "not running tests as root" unless eval { ($> == 0); };
+plan skip_all => "sudo executable not found in path" unless HAS_SUDO;
 plan tests => 14;
 
 # ---------------------------------------------------------------------------

Modified: spamassassin/trunk/t/root_spamd.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/root_spamd.t?rev=1862101&r1=1862100&r2=1862101&view=diff
==============================================================================
--- spamassassin/trunk/t/root_spamd.t (original)
+++ spamassassin/trunk/t/root_spamd.t Wed Jun 26 06:27:31 2019
@@ -5,9 +5,12 @@
 use lib '.'; use lib 't';
 use SATest; sa_t_init("root_spamd");
 
+use constant HAS_SUDO => eval { $_ = untaint_cmd("which sudo 2>/dev/null"); chomp; -x };
+
 use Test::More;
 plan skip_all => "root tests disabled" unless conf_bool('run_root_tests');
 plan skip_all => "not running tests as root" unless eval { ($> == 0); };
+plan skip_all => "sudo executable not found in path" unless HAS_SUDO;
 plan tests => 14;
 
 # ---------------------------------------------------------------------------

Modified: spamassassin/trunk/t/root_spamd_tell.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/root_spamd_tell.t?rev=1862101&r1=1862100&r2=1862101&view=diff
==============================================================================
--- spamassassin/trunk/t/root_spamd_tell.t (original)
+++ spamassassin/trunk/t/root_spamd_tell.t Wed Jun 26 06:27:31 2019
@@ -3,9 +3,12 @@
 use lib '.'; use lib 't';
 use SATest; sa_t_init("root_spamd_tell");
 
+use constant HAS_SUDO => eval { $_ = untaint_cmd("which sudo 2>/dev/null"); chomp; -x };
+
 use Test::More;
 plan skip_all => "root tests disabled" unless conf_bool('run_root_tests');
 plan skip_all => "not running tests as root" unless eval { ($> == 0); };
+plan skip_all => "sudo executable not found in path" unless HAS_SUDO;
 plan tests => 6;
 
 # ---------------------------------------------------------------------------

Modified: spamassassin/trunk/t/root_spamd_tell_paranoid.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/root_spamd_tell_paranoid.t?rev=1862101&r1=1862100&r2=1862101&view=diff
==============================================================================
--- spamassassin/trunk/t/root_spamd_tell_paranoid.t (original)
+++ spamassassin/trunk/t/root_spamd_tell_paranoid.t Wed Jun 26 06:27:31 2019
@@ -3,9 +3,12 @@
 use lib '.'; use lib 't';
 use SATest; sa_t_init("root_spamd_tell_paranoid");
 
+use constant HAS_SUDO => eval { $_ = untaint_cmd("which sudo 2>/dev/null"); chomp; -x };
+
 use Test::More;
 plan skip_all => "root tests disabled" unless conf_bool('run_root_tests');
 plan skip_all => "not running tests as root" unless eval { ($> == 0); };
+plan skip_all => "sudo executable not found in path" unless HAS_SUDO;
 plan tests => 6;
 
 # ---------------------------------------------------------------------------

Modified: spamassassin/trunk/t/root_spamd_tell_x.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/root_spamd_tell_x.t?rev=1862101&r1=1862100&r2=1862101&view=diff
==============================================================================
--- spamassassin/trunk/t/root_spamd_tell_x.t (original)
+++ spamassassin/trunk/t/root_spamd_tell_x.t Wed Jun 26 06:27:31 2019
@@ -3,9 +3,12 @@
 use lib '.'; use lib 't';
 use SATest; sa_t_init("root_spamd_tell_x");
 
+use constant HAS_SUDO => eval { $_ = untaint_cmd("which sudo 2>/dev/null"); chomp; -x };
+
 use Test::More;
 plan skip_all => "root tests disabled" unless conf_bool('run_root_tests');
 plan skip_all => "not running tests as root" unless eval { ($> == 0); };
+plan skip_all => "sudo executable not found in path" unless HAS_SUDO;
 plan tests => 6;
 
 # ---------------------------------------------------------------------------

Modified: spamassassin/trunk/t/root_spamd_tell_x_paranoid.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/root_spamd_tell_x_paranoid.t?rev=1862101&r1=1862100&r2=1862101&view=diff
==============================================================================
--- spamassassin/trunk/t/root_spamd_tell_x_paranoid.t (original)
+++ spamassassin/trunk/t/root_spamd_tell_x_paranoid.t Wed Jun 26 06:27:31 2019
@@ -3,9 +3,12 @@
 use lib '.'; use lib 't';
 use SATest; sa_t_init("root_spamd_tell_x_paranoid");
 
+use constant HAS_SUDO => eval { $_ = untaint_cmd("which sudo 2>/dev/null"); chomp; -x };
+
 use Test::More;
 plan skip_all => "root tests disabled" unless conf_bool('run_root_tests');
 plan skip_all => "not running tests as root" unless eval { ($> == 0); };
+plan skip_all => "sudo executable not found in path" unless HAS_SUDO;
 plan tests => 6;
 
 # ---------------------------------------------------------------------------

Modified: spamassassin/trunk/t/root_spamd_u.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/root_spamd_u.t?rev=1862101&r1=1862100&r2=1862101&view=diff
==============================================================================
--- spamassassin/trunk/t/root_spamd_u.t (original)
+++ spamassassin/trunk/t/root_spamd_u.t Wed Jun 26 06:27:31 2019
@@ -5,9 +5,12 @@
 use lib '.'; use lib 't';
 use SATest; sa_t_init("root_spamd_u");
 
+use constant HAS_SUDO => eval { $_ = untaint_cmd("which sudo 2>/dev/null"); chomp; -x };
+
 use Test::More;
 plan skip_all => "root tests disabled" unless conf_bool('run_root_tests');
 plan skip_all => "not running tests as root" unless eval { ($> == 0); };
+plan skip_all => "sudo executable not found in path" unless HAS_SUDO;
 plan tests => 11;
 
 # ---------------------------------------------------------------------------

Modified: spamassassin/trunk/t/root_spamd_u_dcc.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/root_spamd_u_dcc.t?rev=1862101&r1=1862100&r2=1862101&view=diff
==============================================================================
--- spamassassin/trunk/t/root_spamd_u_dcc.t (original)
+++ spamassassin/trunk/t/root_spamd_u_dcc.t Wed Jun 26 06:27:31 2019
@@ -6,10 +6,13 @@
 use lib '.'; use lib 't';
 use SATest; sa_t_init("root_spamd_u_dcc");
 
+use constant HAS_SUDO => eval { $_ = untaint_cmd("which sudo 2>/dev/null"); chomp; -x };
+
 use Test::More;
 plan skip_all => "root tests disabled" unless conf_bool('run_root_tests');
 plan skip_all => "DCC tests disabled" unless conf_bool('run_dcc_tests');
 plan skip_all => "not running tests as root" unless eval { ($> == 0); };
+plan skip_all => "sudo executable not found in path" unless HAS_SUDO;
 plan tests => 23;
 
 # ---------------------------------------------------------------------------

Modified: spamassassin/trunk/t/root_spamd_virtual.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/root_spamd_virtual.t?rev=1862101&r1=1862100&r2=1862101&view=diff
==============================================================================
--- spamassassin/trunk/t/root_spamd_virtual.t (original)
+++ spamassassin/trunk/t/root_spamd_virtual.t Wed Jun 26 06:27:31 2019
@@ -5,9 +5,12 @@
 use lib '.'; use lib 't';
 use SATest; sa_t_init("root_spamd_virtual");
 
+use constant HAS_SUDO => eval { $_ = untaint_cmd("which sudo 2>/dev/null"); chomp; -x };
+
 use Test::More;
 plan skip_all => "root tests disabled" unless conf_bool('run_root_tests');
 plan skip_all => "not running tests as root" unless eval { ($> == 0); };
+plan skip_all => "sudo executable not found in path" unless HAS_SUDO;
 plan tests => 14;
 
 # ---------------------------------------------------------------------------

Modified: spamassassin/trunk/t/root_spamd_x.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/root_spamd_x.t?rev=1862101&r1=1862100&r2=1862101&view=diff
==============================================================================
--- spamassassin/trunk/t/root_spamd_x.t (original)
+++ spamassassin/trunk/t/root_spamd_x.t Wed Jun 26 06:27:31 2019
@@ -3,9 +3,12 @@
 use lib '.'; use lib 't';
 use SATest; sa_t_init("root_spamd_x");
 
+use constant HAS_SUDO => eval { $_ = untaint_cmd("which sudo 2>/dev/null"); chomp; -x };
+
 use Test::More;
 plan skip_all => "root tests disabled" unless conf_bool('run_root_tests');
 plan skip_all => "not running tests as root" unless eval { ($> == 0); };
+plan skip_all => "sudo executable not found in path" unless HAS_SUDO;
 plan tests => 14;
 
 # ---------------------------------------------------------------------------

Modified: spamassassin/trunk/t/root_spamd_x_paranoid.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/root_spamd_x_paranoid.t?rev=1862101&r1=1862100&r2=1862101&view=diff
==============================================================================
--- spamassassin/trunk/t/root_spamd_x_paranoid.t (original)
+++ spamassassin/trunk/t/root_spamd_x_paranoid.t Wed Jun 26 06:27:31 2019
@@ -3,9 +3,12 @@
 use lib '.'; use lib 't';
 use SATest; sa_t_init("root_spamd_x_paranoid");
 
+use constant HAS_SUDO => eval { $_ = untaint_cmd("which sudo 2>/dev/null"); chomp; -x };
+
 use Test::More;
 plan skip_all => "root tests disabled" unless conf_bool('run_root_tests');
 plan skip_all => "not running tests as root" unless eval { ($> == 0); };
+plan skip_all => "sudo executable not found in path" unless HAS_SUDO;
 plan tests => 14;
 
 # ---------------------------------------------------------------------------

Modified: spamassassin/trunk/t/root_spamd_x_u.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/root_spamd_x_u.t?rev=1862101&r1=1862100&r2=1862101&view=diff
==============================================================================
--- spamassassin/trunk/t/root_spamd_x_u.t (original)
+++ spamassassin/trunk/t/root_spamd_x_u.t Wed Jun 26 06:27:31 2019
@@ -5,9 +5,12 @@
 use lib '.'; use lib 't';
 use SATest; sa_t_init("root_spamd_x_u");
 
+use constant HAS_SUDO => eval { $_ = untaint_cmd("which sudo 2>/dev/null"); chomp; -x };
+
 use Test::More;
 plan skip_all => "root tests disabled" unless conf_bool('run_root_tests');
 plan skip_all => "not running tests as root" unless eval { ($> == 0); };
+plan skip_all => "sudo executable not found in path" unless HAS_SUDO;
 plan tests => 14;
 
 # ---------------------------------------------------------------------------