From 994545fb9636e46c9d255c04d75b00973d78c70b Mon Sep 17 00:00:00 2001 From: Richard W.M. Jones Date: Mon, 25 Jun 2012 15:14:46 +0100 Subject: [PATCH 1/3] tests: Allow SELinux tests to be skipped with an environment variable. --- tests/selinux/run-test.pl | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/tests/selinux/run-test.pl b/tests/selinux/run-test.pl index 4a0ccee..6b0ffb5 100755 --- a/tests/selinux/run-test.pl +++ b/tests/selinux/run-test.pl @@ -45,6 +45,12 @@ die unless $test_type eq "xattrs" || $test_type eq "selinux"; my $test_via = $ARGV[1]; die unless $test_via eq "direct" || $test_via eq "fuse"; +my $env_name = "SKIP_TEST_SELINUX_" . uc ($test_type) . "_" . uc ($test_via); +if ($ENV{$env_name}) { + print "$prog $test_type $test_via: test skipped because $env_name is set.\n"; + exit 0 +} + # SELinux labelling won't work (and can be skipped) if SELinux isn't # installed or isn't enabled on the host. if ($test_type eq "selinux") { -- 1.7.4.1