aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Fernando J. Pereda <ferdy@ferdyx.org> 2006-10-01 21:00:37 +0000
committerAvatar Fernando J. Pereda <ferdy@ferdyx.org> 2006-10-01 21:00:37 +0000
commit7c67fb07d4666f2d7f80d6584edd445a5d595c95 (patch)
treefa8e328113bde22820f431bb198b9b701fcc9852
parent1ab21b140825a385cdfc12434703ca1da6d89b92 (diff)
downloadpaludis-7c67fb07d4666f2d7f80d6584edd445a5d595c95.tar.gz
paludis-7c67fb07d4666f2d7f80d6584edd445a5d595c95.tar.xz
Skip gpg_check tests if gnupg is not installed
-rw-r--r--paludis/qa/gpg_check_TEST.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/paludis/qa/gpg_check_TEST.cc b/paludis/qa/gpg_check_TEST.cc
index 1094f15..6851cde 100644
--- a/paludis/qa/gpg_check_TEST.cc
+++ b/paludis/qa/gpg_check_TEST.cc
@@ -18,9 +18,15 @@
*/
#include <paludis/qa/gpg_check.hh>
+#include <paludis/util/system.hh>
+#include <paludis/util/fd_holder.hh>
#include <test/test_framework.hh>
#include <test/test_runner.hh>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
using namespace paludis;
using namespace paludis::qa;
using namespace test;
@@ -31,6 +37,15 @@ namespace test_cases
{
GPGCheckTest() : TestCase("signed Manifest") { }
+ bool skip() const
+ {
+ FDHolder dev_null(::open("/dev/null", O_WRONLY));
+ set_run_command_stdout_fds(dev_null, -1);
+ set_run_command_stderr_fds(dev_null, -1);
+
+ return (0 != run_command("gpg --help"));
+ }
+
void run()
{
FSEntry e("gpg_check_TEST_dir");