* Bring up to date with gtester running and individual binaries.
* Make the tests run in make distcheck
$(ASN1PARSER) -o asn1-def-test.c $(srcdir)/test.asn
INCLUDES = \
- -I$(top_srcdir)/egg \
- -DSRCDIR=$(srcdir) \
+ -I$(top_builddir) \
+ -I$(top_srcdir) \
+ -DSRCDIR="\"$(srcdir)\"" \
$(GLIB_CFLAGS)
LDADD = \
check_PROGRAMS = $(TEST_PROGS)
test: $(TEST_PROGS)
- SRCDIR='$(srcdir)' gtester -k --verbose -m $(TEST_MODE) --g-fatal-warnings $(TEST_PROGS)
+ gtester -k --verbose -m $(TEST_MODE) --g-fatal-warnings $(TEST_PROGS)
check-local: test
test.asn \
files
+DISTCLEANFILES = \
+ asn1-def-test.c
+
# ------------------------------------------------------------------------------
noinst_PROGRAMS = \
#include "config.h"
-#include "egg-asn1x.h"
-#include "egg-asn1-defs.h"
-#include "egg-testing.h"
+#include "egg/egg-asn1x.h"
+#include "egg/egg-asn1-defs.h"
+#include "egg/egg-testing.h"
#include <glib.h>
#include <libtasn1.h>
static void
setup (Test *test, gconstpointer unused)
{
- if (!g_file_get_contents ("files/test-certificate-1.der", (gchar**)&test->data,
- &test->n_data, NULL))
+ if (!g_file_get_contents (SRCDIR "/files/test-certificate-1.der",
+ (gchar**)&test->data, &test->n_data, NULL))
g_assert_not_reached ();
test->asn1 = egg_asn1x_create (pkix_asn1_tab, "Certificate");
Author: Stef Walter <stef@memberwebs.com>
*/
-#include "egg-asn1x.h"
+#include "config.h"
+
+#include "egg/egg-asn1x.h"
+#include "egg/egg-asn1-defs.h"
+#include "egg/egg-testing.h"
#include <pwd.h>
#include <stdlib.h>
#include <unistd.h>
-#include "egg-asn1-defs.h"
-#include "egg-testing.h"
-
#if 0
static void
build_personal_name (void)
egg_tests_chdir_base (argv[0]);
- test_some_asn1_stuff (pkix_asn1_tab, "files/test-certificate-1.der", "Certificate");
- test_some_asn1_stuff (pkix_asn1_tab, "files/test-pkcs8-1.der", "pkcs-8-PrivateKeyInfo");
- test_some_asn1_stuff (pk_asn1_tab, "files/test-rsakey-1.der", "RSAPrivateKey");
- test_some_asn1_stuff (pkix_asn1_tab, "files/test-personalname-1.der", "PersonalName");
- test_some_asn1_stuff (pkix_asn1_tab, "files/test-pkcs7-1.der", "pkcs-7-ContentInfo");
- test_some_asn1_stuff (pkix_asn1_tab, "files/test-pkcs7-2.der", "pkcs-7-ContentInfo");
- test_some_asn1_stuff (pkix_asn1_tab, "files/test-pkcs12-1.der", "pkcs-12-PFX");
+ test_some_asn1_stuff (pkix_asn1_tab, SRCDIR "/files/test-certificate-1.der", "Certificate");
+ test_some_asn1_stuff (pkix_asn1_tab, SRCDIR "/files/test-pkcs8-1.der", "pkcs-8-PrivateKeyInfo");
+ test_some_asn1_stuff (pk_asn1_tab, SRCDIR "/files/test-rsakey-1.der", "RSAPrivateKey");
+ test_some_asn1_stuff (pkix_asn1_tab, SRCDIR "/files/test-personalname-1.der", "PersonalName");
+ test_some_asn1_stuff (pkix_asn1_tab, SRCDIR "/files/test-pkcs7-1.der", "pkcs-7-ContentInfo");
+ test_some_asn1_stuff (pkix_asn1_tab, SRCDIR "/files/test-pkcs7-2.der", "pkcs-7-ContentInfo");
+ test_some_asn1_stuff (pkix_asn1_tab, SRCDIR "/files/test-pkcs12-1.der", "pkcs-12-PFX");
return 0;
}
#include "config.h"
-#include "egg-dh.h"
-#include "egg-secure-memory.h"
-#include "egg-testing.h"
+#include "egg/egg-dh.h"
+#include "egg/egg-secure-memory.h"
+#include "egg/egg-testing.h"
#include <stdlib.h>
#include <stdio.h>
#include "config.h"
-#include "egg-asn1-defs.h"
-#include "egg-asn1x.h"
-#include "egg-dn.h"
-#include "egg-oid.h"
+#include "egg/egg-asn1-defs.h"
+#include "egg/egg-asn1x.h"
+#include "egg/egg-dn.h"
+#include "egg/egg-oid.h"
#include <glib.h>
#include <gcrypt.h>
static void
setup (Test *test, gconstpointer unused)
{
- if (!g_file_get_contents ("files/test-certificate-1.der", (gchar**)&test->data,
- &test->n_data, NULL))
+ if (!g_file_get_contents (SRCDIR "/files/test-certificate-1.der",
+ (gchar**)&test->data, &test->n_data, NULL))
g_assert_not_reached ();
test->asn1 = egg_asn1x_create (pkix_asn1_tab, "Certificate");
#include "config.h"
-#include "egg-hex.h"
+#include "egg/egg-hex.h"
#include <stdlib.h>
#include <stdio.h>
#include <stdio.h>
#include <string.h>
-#include "egg-hkdf.h"
-#include "egg-secure-memory.h"
-#include "egg-testing.h"
+#include "egg/egg-hkdf.h"
+#include "egg/egg-secure-memory.h"
+#include "egg/egg-testing.h"
#include <gcrypt.h>
#include "config.h"
-#include "egg-oid.h"
+#include "egg/egg-oid.h"
#include <glib.h>
#include "config.h"
-#include "egg-symkey.h"
-#include "egg-openssl.h"
-#include "egg-secure-memory.h"
-#include "egg-testing.h"
+#include "egg/egg-symkey.h"
+#include "egg/egg-openssl.h"
+#include "egg/egg-secure-memory.h"
+#include "egg/egg-testing.h"
#include <glib.h>
static void
setup (Test *test, gconstpointer unused)
{
- if (!g_file_get_contents ("files/pem-rsa-enc.key", (gchar**)&test->input, &test->n_input, NULL))
+ if (!g_file_get_contents (SRCDIR "/files/pem-rsa-enc.key", (gchar**)&test->input, &test->n_input, NULL))
g_assert_not_reached ();
}
#include "config.h"
-#include "egg-padding.h"
-#include "egg-testing.h"
+#include "egg/egg-padding.h"
+#include "egg/egg-testing.h"
#include <gcrypt.h>
#include "config.h"
-#include "egg-secure-memory.h"
+#include "egg/egg-secure-memory.h"
#include <glib.h>
#include "config.h"
-#include "egg-libgcrypt.h"
-#include "egg-secure-memory.h"
-#include "egg-symkey.h"
+#include "egg/egg-libgcrypt.h"
+#include "egg/egg-secure-memory.h"
+#include "egg/egg-symkey.h"
#include <gcrypt.h>
INCLUDES = \
- -I$(top_srcdir)/egg \
- -DSRCDIR=$(srcdir) \
+ -I$(top_builddir) \
+ -I$(top_srcdir) \
+ -DSRCDIR="\"$(srcdir)\"" \
+ -DBUILDDIR="\"$(builddir)\"" \
-DGCK_API_SUBJECT_TO_CHANGE \
$(GLIB_CFLAGS)
check_PROGRAMS = $(TEST_PROGS)
test: $(TEST_PROGS)
- SRCDIR='$(srcdir)' gtester -k --verbose -m $(TEST_MODE) --g-fatal-warnings $(TEST_PROGS)
+ gtester -k --verbose -m $(TEST_MODE) --g-fatal-warnings $(TEST_PROGS)
check-local: test
GckSlot *slot;
/* Successful load */
- test->module = gck_module_initialize (".libs/libmock-test-module.so", NULL, 0, &err);
+ test->module = gck_module_initialize (BUILDDIR "/.libs/libmock-test-module.so", NULL, 0, &err);
g_assert_no_error (err);
g_assert (GCK_IS_MODULE (test->module));
int
main (int argc, char **argv)
{
- const gchar *srcdir;
-
g_type_init ();
g_test_init (&argc, &argv, NULL);
- srcdir = g_getenv ("SRCDIR");
- if (srcdir && chdir (srcdir) < 0)
- g_error ("couldn't change directory to: %s: %s", srcdir, g_strerror (errno));
-
g_test_add ("/gck/crypto/encrypt", Test, NULL, setup, test_encrypt, teardown);
g_test_add ("/gck/crypto/decrypt", Test, NULL, setup, test_decrypt, teardown);
g_test_add ("/gck/crypto/login_context_specific", Test, NULL, setup, test_login_context_specific, teardown);
GError *err = NULL;
/* Successful load */
- test->module = gck_module_initialize (".libs/libmock-test-module.so", NULL, 0, &err);
+ test->module = gck_module_initialize (BUILDDIR "/.libs/libmock-test-module.so", NULL, 0, &err);
g_assert_no_error (err);
g_assert (GCK_IS_MODULE (test->module));
int
main (int argc, char **argv)
{
- const gchar *srcdir;
-
g_type_init ();
g_test_init (&argc, &argv, NULL);
- srcdir = g_getenv ("SRCDIR");
- if (srcdir && chdir (srcdir) < 0)
- g_error ("couldn't change directory to: %s: %s", srcdir, g_strerror (errno));
-
g_test_add ("/gck/enumerator/create", Test, NULL, setup, test_create, teardown);
g_test_add ("/gck/enumerator/create_slots", Test, NULL, setup, test_create_slots, teardown);
g_test_add ("/gck/enumerator/next", Test, NULL, setup, test_next, teardown);
GError *err = NULL;
/* Successful load */
- test->module = gck_module_initialize (".libs/libmock-test-module.so", NULL, 0, &err);
+ test->module = gck_module_initialize (BUILDDIR "/.libs/libmock-test-module.so", NULL, 0, &err);
g_assert_no_error (err);
g_assert (test->module);
}
g_object_get (test->module, "path", &path, NULL);
g_assert (path != NULL && "no module-path");
- g_assert (strcmp (".libs/libmock-test-module.so", path) == 0 && "module path wrong");
+ g_assert (strcmp (BUILDDIR "/.libs/libmock-test-module.so", path) == 0 && "module path wrong");
g_free (path);
}
int
main (int argc, char **argv)
{
- const gchar *srcdir;
-
g_type_init ();
g_test_init (&argc, &argv, NULL);
- srcdir = g_getenv ("SRCDIR");
- if (srcdir && chdir (srcdir) < 0)
- g_error ("couldn't change directory to: %s: %s", srcdir, g_strerror (errno));
-
g_test_add ("/gck/module/invalid_modules", Test, NULL, setup, test_invalid_modules, teardown);
g_test_add ("/gck/module/module_equals_hash", Test, NULL, setup, test_module_equals_hash, teardown);
g_test_add ("/gck/module/module_props", Test, NULL, setup, test_module_props, teardown);
GError *err = NULL;
/* Successful load */
- module = gck_module_initialize (".libs/libmock-test-module.so", NULL, 0, &err);
+ module = gck_module_initialize (BUILDDIR "/.libs/libmock-test-module.so", NULL, 0, &err);
g_assert_no_error (err);
g_assert (GCK_IS_MODULE (module));
int
main (int argc, char **argv)
{
- const gchar *srcdir;
-
g_type_init ();
g_test_init (&argc, &argv, NULL);
- srcdir = g_getenv ("SRCDIR");
- if (srcdir && chdir (srcdir) < 0)
- g_error ("couldn't change directory to: %s: %s", srcdir, g_strerror (errno));
-
g_test_add ("/gck/modules/enumerate_objects", Test, NULL, setup, test_enumerate_objects, teardown);
g_test_add ("/gck/modules/token_for_uri", Test, NULL, setup, test_token_for_uri, teardown);
g_test_add ("/gck/modules/token_for_uri_not_found", Test, NULL, setup, test_token_for_uri_not_found, teardown);
GList *slots;
/* Successful load */
- test->module = gck_module_initialize (".libs/libmock-test-module.so", NULL, 0, &err);
+ test->module = gck_module_initialize (BUILDDIR "/.libs/libmock-test-module.so", NULL, 0, &err);
g_assert_no_error (err);
g_assert (GCK_IS_MODULE (test->module));
int
main (int argc, char **argv)
{
- const gchar *srcdir;
-
g_type_init ();
g_test_init (&argc, &argv, NULL);
- srcdir = g_getenv ("SRCDIR");
- if (srcdir && chdir (srcdir) < 0)
- g_error ("couldn't change directory to: %s: %s", srcdir, g_strerror (errno));
-
g_test_add ("/gck/object/object_props", Test, NULL, setup, test_object_props, teardown);
g_test_add ("/gck/object/object_equals_hash", Test, NULL, setup, test_object_equals_hash, teardown);
g_test_add ("/gck/object/create_object", Test, NULL, setup, test_create_object, teardown);
GList *slots;
/* Successful load */
- test->module = gck_module_initialize (".libs/libmock-test-module.so", NULL, 0, &err);
+ test->module = gck_module_initialize (BUILDDIR "/.libs/libmock-test-module.so", NULL, 0, &err);
g_assert_no_error (err);
g_assert (GCK_IS_MODULE (test->module));
int
main (int argc, char **argv)
{
- const gchar *srcdir;
-
g_type_init ();
g_test_init (&argc, &argv, NULL);
- srcdir = g_getenv ("SRCDIR");
- if (srcdir && chdir (srcdir) < 0)
- g_error ("couldn't change directory to: %s: %s", srcdir, g_strerror (errno));
-
g_test_add ("/gck/session/session_props", Test, NULL, setup, test_session_props, teardown);
g_test_add ("/gck/session/session_info", Test, NULL, setup, test_session_info, teardown);
g_test_add ("/gck/session/open_close_session", Test, NULL, setup, test_open_close_session, teardown);
GList *slots;
/* Successful load */
- test->module = gck_module_initialize (".libs/libmock-test-module.so", NULL, 0, &err);
+ test->module = gck_module_initialize (BUILDDIR "/.libs/libmock-test-module.so", NULL, 0, &err);
g_assert_no_error (err);
g_assert (GCK_IS_MODULE (test->module));
int
main (int argc, char **argv)
{
- const gchar *srcdir;
-
g_type_init ();
g_test_init (&argc, &argv, NULL);
- srcdir = g_getenv ("SRCDIR");
- if (srcdir && chdir (srcdir) < 0)
- g_error ("couldn't change directory to: %s: %s", srcdir, g_strerror (errno));
-
g_test_add ("/gck/slot/slot_info", Test, NULL, setup, test_slot_info, teardown);
g_test_add ("/gck/slot/slot_props", Test, NULL, setup, test_slot_props, teardown);
g_test_add ("/gck/slot/slot_equals_hash", Test, NULL, setup, test_slot_equals_hash, teardown);
int
main (int argc, char **argv)
{
- const gchar *srcdir;
-
g_type_init ();
g_test_init (&argc, &argv, NULL);
- srcdir = g_getenv ("SRCDIR");
- if (srcdir && chdir (srcdir) < 0)
- g_error ("couldn't change directory to: %s: %s", srcdir, g_strerror (errno));
-
/* Suppress these messages in tests */
g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE | G_LOG_LEVEL_INFO | G_LOG_LEVEL_DEBUG,
null_log_handler, NULL);
INCLUDES = \
- -I$(top_srcdir)/egg \
- -I$(top_srcdir)/gcr \
- -DSRCDIR=$(srcdir) \
+ -I$(top_builddir) \
+ -I$(top_srcdir) \
+ -DSRCDIR="\"$(srcdir)\"" \
-DGCR_API_SUBJECT_TO_CHANGE \
-DGCK_API_SUBJECT_TO_CHANGE \
$(GLIB_CFLAGS) \
check_PROGRAMS = $(TEST_PROGS)
test: $(TEST_PROGS)
- SRCDIR='$(srcdir)' gtester -k --verbose -m $(TEST_MODE) --g-fatal-warnings $(TEST_PROGS)
+ gtester -k --verbose -m $(TEST_MODE) --g-fatal-warnings $(TEST_PROGS)
check-local: test
test_certificate (argv[1]);
} else {
chdir_base_dir (argv[0]);
- test_certificate ("files/der-certificate.crt");
+ test_certificate (SRCDIR "/files/der-certificate.crt");
}
return 0;
test_key (argv[1]);
} else {
chdir_base_dir (argv[0]);
- test_key ("files/pem-dsa-1024.key");
+ test_key (SRCDIR "/files/pem-dsa-1024.key");
}
return 0;
gck_list_unref_free (modules);
/* A self-signed certificate */
- if (!g_file_get_contents ("files/der-certificate.crt", &contents, &n_contents, NULL))
+ if (!g_file_get_contents (SRCDIR "/files/der-certificate.crt", &contents, &n_contents, NULL))
g_assert_not_reached ();
test->cert_self = gcr_simple_certificate_new (contents, n_contents);
g_free (contents);
/* A signed certificate */
- if (!g_file_get_contents ("files/dhansak-collabora.cer", &contents, &n_contents, NULL))
+ if (!g_file_get_contents (SRCDIR "/files/dhansak-collabora.cer", &contents, &n_contents, NULL))
g_assert_not_reached ();
test->cert_signed = mock_certificate_new (contents, n_contents);
g_free (contents);
/* The signer for the above certificate */
- if (!g_file_get_contents ("files/collabora-ca.cer", &contents, &n_contents, NULL))
+ if (!g_file_get_contents (SRCDIR "/files/collabora-ca.cer", &contents, &n_contents, NULL))
g_assert_not_reached ();
test->cert_ca = mock_certificate_new (contents, n_contents);
g_free (contents);
int
main (int argc, char **argv)
{
- const gchar *srcdir;
-
g_type_init ();
g_test_init (&argc, &argv, NULL);
g_set_prgname ("test-certificate-chain");
- srcdir = g_getenv ("SRCDIR");
- if (srcdir && chdir (srcdir) < 0)
- g_error ("couldn't change directory to: %s: %s", srcdir, g_strerror (errno));
-
g_test_add ("/gcr/certificate-chain/new", Test, NULL, setup, test_new, teardown);
g_test_add ("/gcr/certificate-chain/new_with_cert", Test, NULL, setup, test_new_with_cert, teardown);
g_test_add ("/gcr/certificate-chain/selfsigned", Test, NULL, setup, test_selfsigned, teardown);
gchar *contents;
gsize n_contents;
- if (!g_file_get_contents ("files/der-certificate.crt", &contents, &n_contents, NULL))
+ if (!g_file_get_contents (SRCDIR "/files/der-certificate.crt", &contents, &n_contents, NULL))
g_assert_not_reached ();
test->certificate = gcr_simple_certificate_new (contents, n_contents);
g_assert (test->certificate);
g_free (contents);
- if (!g_file_get_contents ("files/der-certificate-dsa.cer", &contents, &n_contents, NULL))
+ if (!g_file_get_contents (SRCDIR "/files/der-certificate-dsa.cer", &contents, &n_contents, NULL))
g_assert_not_reached ();
test->dsa_cert = gcr_simple_certificate_new (contents, n_contents);
g_assert (test->dsa_cert);
g_free (contents);
- if (!g_file_get_contents ("files/dhansak-collabora.cer", &contents, &n_contents, NULL))
+ if (!g_file_get_contents (SRCDIR "/files/dhansak-collabora.cer", &contents, &n_contents, NULL))
g_assert_not_reached ();
test->dhansak_cert = gcr_simple_certificate_new (contents, n_contents);
g_assert (test->certificate);
int
main (int argc, char **argv)
{
- const gchar *srcdir;
-
g_type_init ();
g_test_init (&argc, &argv, NULL);
g_set_prgname ("test-certificate");
- srcdir = g_getenv ("SRCDIR");
- if (srcdir && chdir (srcdir) < 0)
- g_error ("couldn't change directory to: %s: %s", srcdir, g_strerror (errno));
-
g_test_add ("/gcr/certificate/issuer_cn", Test, NULL, setup, test_issuer_cn, teardown);
g_test_add ("/gcr/certificate/issuer_dn", Test, NULL, setup, test_issuer_dn, teardown);
g_test_add ("/gcr/certificate/issuer_part", Test, NULL, setup, test_issuer_part, teardown);
gsize len;
GDir *dir;
- dir = g_dir_open ("files", 0, NULL);
+ dir = g_dir_open (SRCDIR "/files", 0, NULL);
g_assert (dir);
for (;;) {
continue;
g_free (test->filedesc);
- test->filedesc = g_build_filename ("files", filename, NULL);
+ test->filedesc = g_build_filename (SRCDIR "/files", filename, NULL);
if (g_file_test (test->filedesc, G_FILE_TEST_IS_DIR))
continue;
int
main (int argc, char **argv)
{
- const gchar *srcdir;
-
g_type_init ();
g_test_init (&argc, &argv, NULL);
g_set_prgname ("test-parser");
- srcdir = g_getenv ("SRCDIR");
- if (srcdir && chdir (srcdir) < 0)
- g_error ("couldn't change directory to: %s: %s", srcdir, g_strerror (errno));
-
g_test_add ("/gcr/parser/parse_all", Test, NULL, setup, test_parse_all, teardown);
return g_test_run ();
#include "egg/egg-asn1x.h"
#include "egg/egg-asn1-defs.h"
-#include "gcr.h"
+#include "gcr/gcr.h"
#include "gcr/gcr-internal.h"
#include "egg/egg-testing.h"
GNode *asn, *node;
CK_RV rv;
- if (!g_file_get_contents ("files/der-certificate.crt", (gchar**)&test->cert_data,
+ if (!g_file_get_contents (SRCDIR "/files/der-certificate.crt", (gchar**)&test->cert_data,
&test->n_cert_data, NULL))
g_assert_not_reached ();
g_assert (test->cert_data);
- if (!g_file_get_contents ("files/der-certificate-dsa.cer", (gchar**)&test->cert2_data,
+ if (!g_file_get_contents (SRCDIR "/files/der-certificate-dsa.cer", (gchar**)&test->cert2_data,
&test->n_cert2_data, NULL))
g_assert_not_reached ();
g_assert (test->cert2_data);
int
main (int argc, char **argv)
{
- const gchar *srcdir;
-
g_type_init ();
g_test_init (&argc, &argv, NULL);
g_set_prgname ("test-pkcs11-certificate");
- srcdir = g_getenv ("SRCDIR");
- if (srcdir && chdir (srcdir) < 0)
- g_error ("couldn't change directory to: %s: %s", srcdir, g_strerror (errno));
-
g_test_add ("/gcr/pkcs11-certificate/lookup_certificate_issuer", Test, NULL, setup, test_lookup_certificate_issuer, teardown);
g_test_add ("/gcr/pkcs11-certificate/lookup_certificate_issuer_not_found", Test, NULL, setup, test_lookup_certificate_issuer_not_found, teardown);
g_test_add ("/gcr/pkcs11-certificate/lookup_certificate_issuer_async", Test, NULL, setup, test_lookup_certificate_issuer_async, teardown);
#include "config.h"
-#include "gcr.h"
+#include "gcr/gcr.h"
#include "gcr/gcr-internal.h"
#include "gck/gck-test.h"
static void
setup (Test *test, gconstpointer unused)
{
- if (!g_file_get_contents ("files/der-certificate.crt", (gchar**)&test->cert_data,
+ if (!g_file_get_contents (SRCDIR "/files/der-certificate.crt", (gchar**)&test->cert_data,
&test->n_cert_data, NULL))
g_assert_not_reached ();
g_assert (test->cert_data);
int
main (int argc, char **argv)
{
- const gchar *srcdir;
-
g_type_init ();
g_test_init (&argc, &argv, NULL);
g_set_prgname ("test-simple-certificate");
- srcdir = g_getenv ("SRCDIR");
- if (srcdir && chdir (srcdir) < 0)
- g_error ("couldn't change directory to: %s: %s", srcdir, g_strerror (errno));
-
g_test_add ("/gcr/simple-certificate/new", Test, NULL, setup, test_new, teardown);
g_test_add ("/gcr/simple-certificate/new_static", Test, NULL, setup, test_new_static, teardown);
#include "config.h"
-#include "gcr.h"
+#include "gcr/gcr.h"
#include "gcr/gcr-internal.h"
#include "gck/gck-mock.h"
gsize len;
CK_RV rv;
- if (!g_file_get_contents ("files/der-certificate.crt", &contents, &len, NULL))
+ if (!g_file_get_contents (SRCDIR "/files/der-certificate.crt", &contents, &len, NULL))
g_assert_not_reached ();
g_assert (contents);
int
main (int argc, char **argv)
{
- const gchar *srcdir;
-
g_type_init ();
g_test_init (&argc, &argv, NULL);
g_set_prgname ("test-trust");
- srcdir = g_getenv ("SRCDIR");
- if (srcdir && chdir (srcdir) < 0)
- g_error ("couldn't change directory to: %s: %s", srcdir, g_strerror (errno));
-
g_test_add ("/gcr/trust/is_pinned_none", Test, NULL, setup, test_is_pinned_none, teardown);
g_test_add ("/gcr/trust/add_and_is_pinned", Test, NULL, setup, test_add_and_is_pinned, teardown);
g_test_add ("/gcr/trust/add_certificate_pinned_fail", Test, NULL, setup, test_add_certificate_pinned_fail, teardown);
EXTRA_DIST = \
- ca-example \
- testing.c testing.h \
- testing-build.sh \
- testing.make
-
-INCLUDES = \
- -I$(top_srcdir) \
- -I$(top_builddir) \
- $(GTK_CFLAGS) \
- $(GLIB_CFLAGS)
-
-LIBS = \
- $(GTK_LIBS) \
- $(GLIB_LIBS) \
- $(GTHREAD_LIBS)
-
-noinst_PROGRAMS =
+ ca-example
CLEANFILES = \
coverage \