Eet tests: Support out of source builds.

SVN revision: 67226
This commit is contained in:
Tom Hacohen 2012-01-15 10:29:09 +00:00
parent 491f887708
commit 3bbb598ea2
2 changed files with 8 additions and 5 deletions

View File

@ -2,6 +2,7 @@ MAINTAINERCLEANFILES = Makefile.in
AM_CPPFLAGS = \
-I$(top_srcdir)/src/lib \
-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests\" \
@CHECK_CFLAGS@ \
@EINA_CFLAGS@

View File

@ -24,6 +24,8 @@
#include "eet_suite.h"
#define CERT_DIR "src/tests/" TESTS_SRC_DIR
START_TEST(eet_test_init)
{
int ret;
@ -1640,7 +1642,7 @@ START_TEST(eet_identity_simple)
eet_init();
fail_if(!(file = tmpnam(file)));
fail_if(chdir("src/tests"));
fail_if(chdir(CERT_DIR));
fail_if(!(noread = fopen("/dev/null", "w")));
/* Sign an eet file. */
@ -1707,7 +1709,7 @@ START_TEST(eet_identity_open_simple)
eet_init();
fail_if(chdir("src/tests"));
fail_if(chdir(CERT_DIR));
k = eet_identity_open("cert.pem", "key.pem", NULL);
fail_if(!k);
@ -1725,7 +1727,7 @@ START_TEST(eet_identity_open_pkcs8)
eet_init();
fail_if(chdir("src/tests"));
fail_if(chdir(CERT_DIR));
k = eet_identity_open("cert.pem", "key_enc_none.pem", NULL);
fail_if(!k);
@ -1774,7 +1776,7 @@ START_TEST(eet_identity_open_pkcs8_enc)
eet_init();
fail_if(chdir("src/tests"));
fail_if(chdir(CERT_DIR));
k = eet_identity_open("cert.pem", "key_enc.pem", NULL);
fail_if(k);
@ -1810,7 +1812,7 @@ START_TEST(eet_cipher_decipher_simple)
eet_init();
fail_if(!(file = tmpnam(file)));
fail_if(chdir("src/tests"));
fail_if(chdir(CERT_DIR));
/* Crypt an eet file. */
ef = eet_open(file, EET_FILE_MODE_WRITE);