aboutsummaryrefslogtreecommitdiffstats
path: root/camel/tests
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@src.gnome.org>2003-08-02 03:30:50 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-08-02 03:30:50 +0800
commit28adf143a1fff74b633309730e06c868d2a3a879 (patch)
treee4a1516470bf080948c6aa7042e401bc0ff34dd9 /camel/tests
parent9861660fdf5558f92f87387dce77a8d34013ef44 (diff)
downloadgsoc2013-evolution-28adf143a1fff74b633309730e06c868d2a3a879.tar
gsoc2013-evolution-28adf143a1fff74b633309730e06c868d2a3a879.tar.gz
gsoc2013-evolution-28adf143a1fff74b633309730e06c868d2a3a879.tar.bz2
gsoc2013-evolution-28adf143a1fff74b633309730e06c868d2a3a879.tar.lz
gsoc2013-evolution-28adf143a1fff74b633309730e06c868d2a3a879.tar.xz
gsoc2013-evolution-28adf143a1fff74b633309730e06c868d2a3a879.tar.zst
gsoc2013-evolution-28adf143a1fff74b633309730e06c868d2a3a879.zip
updated
svn path=/trunk/; revision=22057
Diffstat (limited to 'camel/tests')
-rw-r--r--camel/tests/smime/pgp-mime.c7
-rw-r--r--camel/tests/smime/pgp.c8
2 files changed, 13 insertions, 2 deletions
diff --git a/camel/tests/smime/pgp-mime.c b/camel/tests/smime/pgp-mime.c
index 578baac938..566ab6661f 100644
--- a/camel/tests/smime/pgp-mime.c
+++ b/camel/tests/smime/pgp-mime.c
@@ -28,6 +28,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <sys/wait.h>
#include <camel/camel-gpg-context.h>
#include <camel/camel-multipart-signed.h>
#include <camel/camel-multipart-encrypted.h>
@@ -139,7 +140,11 @@ int main (int argc, char **argv)
setenv ("GNUPGHOME", "/tmp/camel-test/.gnupg", 1);
/* import the gpg keys */
- system ("gpg > /dev/null 2>&1"); /* creates gpg directory and stuff */
+ if ((ret = system ("gpg > /dev/null 2>&1")) == -1)
+ return 77;
+ else if (WEXITSTATUS (ret) == 127)
+ return 127;
+
system ("gpg --import camel-test.gpg.pub > /dev/null 2>&1");
system ("gpg --import camel-test.gpg.sec > /dev/null 2>&1");
diff --git a/camel/tests/smime/pgp.c b/camel/tests/smime/pgp.c
index 98f708a27e..78d4039847 100644
--- a/camel/tests/smime/pgp.c
+++ b/camel/tests/smime/pgp.c
@@ -28,6 +28,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <sys/wait.h>
#include <camel/camel-gpg-context.h>
#include <camel/camel-stream-mem.h>
@@ -122,6 +123,7 @@ int main (int argc, char **argv)
GPtrArray *recipients;
GByteArray *buf;
char *before, *after;
+ int ret;
camel_test_init (argc, argv);
@@ -131,7 +133,11 @@ int main (int argc, char **argv)
setenv ("GNUPGHOME", "/tmp/camel-test/.gnupg", 1);
/* import the gpg keys */
- system ("gpg > /dev/null 2>&1"); /* creates gpg directory and stuff */
+ if ((ret = system ("gpgfoo > /dev/null 2>&1")) == -1)
+ return 77;
+ else if (WEXITSTATUS (ret) == 127)
+ return 77;
+
system ("gpg --import ../data/camel-test.gpg.pub > /dev/null 2>&1");
system ("gpg --import ../data/camel-test.gpg.sec > /dev/null 2>&1");