diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-06-25 15:14:46 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-06-25 15:21:32 +0100 |
commit | 2afa0eeb9040d90fc020c01caa0b24b00e0556ce (patch) | |
tree | 44a8c3d433f3a8fc71ed0423b07f46e3e43b0d2c | |
parent | 030e318049b58a1d62f1179dba3a7fb0f015a83c (diff) | |
download | libguestfs-2afa0eeb9040d90fc020c01caa0b24b00e0556ce.tar.gz libguestfs-2afa0eeb9040d90fc020c01caa0b24b00e0556ce.tar.xz libguestfs-2afa0eeb9040d90fc020c01caa0b24b00e0556ce.zip |
tests: Allow SELinux tests to be skipped with an environment variable.
-rwxr-xr-x | 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 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") { |