]> git.ipfire.org Git - people/ms/pakfire.git/commitdiff
tests: Load our own configuration file
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 17 Oct 2023 08:49:08 +0000 (08:49 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 17 Oct 2023 08:49:08 +0000 (08:49 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
tests/testsuite.c

index 30c12240d3f726c377af7ed25e4d992710c935f8..1eb72c8f44de1f4c592a4e32175b1ffa8e751102 100644 (file)
@@ -1004,6 +1004,7 @@ TESTSUITE_CPPFLAGS = \
        $(AM_CPPFLAGS) \
        $(PAKFIRE_CPPFLAGS) \
        -DABS_TOP_SRCDIR=\"$(abs_top_srcdir)\" \
+       -DTEST_CONFIG_FILE=\"$(abs_top_srcdir)/contrib/config/general.conf\" \
        -DTEST_DATA_DIR=\"$(abs_top_srcdir)/tests/data\" \
        -DTEST_ROOTFS=\"$(TEST_ROOTFS)\" \
        -DTEST_STUB_COMMAND=\"$(abs_top_builddir)/tests/stub/root/command\" \
index 52c419eded7e28664a5b7e32a8f152a445759ab3..34a3a727c2b0a46af05ba34cea03993e154ef2d6 100644 (file)
@@ -50,7 +50,7 @@ static int test_run(int i, struct test* t) {
        LOG("running %s (%s)\n", t->name, root);
 
        // Create a new context
-       r = pakfire_ctx_create(&t->ctx, NULL);
+       r = pakfire_ctx_create(&t->ctx, TEST_CONFIG_FILE);
        if (r) {
                LOG("Could not create context: %m\n");
                goto ERROR;