From 2afa0eeb9040d90fc020c01caa0b24b00e0556ce Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 25 Jun 2012 15:14:46 +0100 Subject: tests: Allow SELinux tests to be skipped with an environment variable. --- tests/selinux/run-test.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/selinux/run-test.pl b/tests/selinux/run-test.pl index 4a0ccee4..6b0ffb5c 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") { -- cgit