]> git.ipfire.org Git - pakfire.git/commitdiff
tests: Make all tests static
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 13 Jan 2021 12:40:01 +0000 (12:40 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 13 Jan 2021 12:40:01 +0000 (12:40 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
tests/libpakfire/arch.c
tests/libpakfire/archive.c
tests/libpakfire/execute.c
tests/libpakfire/key.c
tests/libpakfire/makefile.c
tests/libpakfire/parser.c
tests/libpakfire/util.c

index 635ebb1e64f9fcb0a98a3be978d66e1e80bd2499..b9f42fc49034fb0dfacaf32146020c26afab91c8 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "../testsuite.h"
 
-int test_native(const test_t* t) {
+static int test_native(const test_t* t) {
        // First call
        const char* arch1 = pakfire_arch_native();
        assert_return(arch1, EXIT_FAILURE);
@@ -40,7 +40,7 @@ int test_native(const test_t* t) {
        return EXIT_SUCCESS;
 }
 
-int test_supported(const test_t* t) {
+static int test_supported(const test_t* t) {
        int r;
 
        r = pakfire_arch_supported("x86_64");
@@ -56,7 +56,7 @@ int test_supported(const test_t* t) {
        return EXIT_SUCCESS;
 }
 
-int test_compatible(const test_t* t) {
+static int test_compatible(const test_t* t) {
        int r;
 
        // x86_64 can build i686
@@ -82,7 +82,7 @@ int test_compatible(const test_t* t) {
        return EXIT_SUCCESS;
 }
 
-int test_machine(const test_t* t) {
+static int test_machine(const test_t* t) {
        char* machine;
 
        machine = pakfire_arch_machine("x86_64", "ipfire");
index 4175104d03546a079f6de731f280a919c138be3c..537da0608ded87314a6cba0e693cb2f6e864b012 100644 (file)
@@ -30,7 +30,7 @@
 static const char* TEST_PKG1_PATH = "data/beep-1.3-2.ip3.x86_64.pfm";
 static const char* TEST_PKG1_FILE = "usr/bin/beep";
 
-int test_open(const test_t* t) {
+static int test_open(const test_t* t) {
        char* path = pakfire_path_join(TEST_SRC_PATH, TEST_PKG1_PATH);
        LOG("Trying to open %s\n", path);
 
@@ -48,7 +48,7 @@ int test_open(const test_t* t) {
        return EXIT_SUCCESS;
 }
 
-int test_extract(const test_t* t) {
+static int test_extract(const test_t* t) {
        char* path = pakfire_path_join(TEST_SRC_PATH, TEST_PKG1_PATH);
 
        PakfireArchive archive = pakfire_archive_open(t->pakfire, path);
@@ -67,7 +67,7 @@ int test_extract(const test_t* t) {
        return EXIT_SUCCESS;
 }
 
-int test_import(const test_t* t) {
+static int test_import(const test_t* t) {
        char* path = pakfire_path_join(TEST_SRC_PATH, TEST_PKG1_PATH);
 
        PakfireArchive archive = pakfire_archive_open(t->pakfire, path);
index 333e0e4f8149e923a9da7e675a5906aa7dc41f17..5398fd58cfbcc70b5e280d89645e7b725df06ae1 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "../testsuite.h"
 
-int test_does_not_exist(const test_t* t) {
+static int test_does_not_exist(const test_t* t) {
        const char* cmd = "/usr/bin/does-not-exist";
 
        int r = pakfire_execute(t->pakfire, cmd, NULL, NULL, 0);
index f69d10dad08a74bbdfa0e6f4f84015aba4af8dd2..32cecdfbbe598abf5084bfb836ddfa2989be97cc 100644 (file)
@@ -26,7 +26,7 @@
 #include "../testsuite.h"
 #include "key.h"
 
-int test_init(const test_t* t) {
+static int test_init(const test_t* t) {
        // Try loading any keys & delete them all
        PakfireKey* keys = pakfire_key_list(t->pakfire);
        while (keys && *keys) {
@@ -45,7 +45,7 @@ int test_init(const test_t* t) {
        return EXIT_SUCCESS;
 }
 
-int test_import(const test_t* t) {
+static int test_import(const test_t* t) {
        // Try to delete the key just in case it
        // has been imported before
        PakfireKey key = pakfire_key_get(t->pakfire, TEST_KEY_FINGERPRINT);
@@ -74,7 +74,7 @@ int test_import(const test_t* t) {
        return EXIT_SUCCESS;
 }
 
-int test_export(const test_t* t) {
+static int test_export(const test_t* t) {
        PakfireKey key = pakfire_key_get(t->pakfire, TEST_KEY_FINGERPRINT);
        assert_return(key, EXIT_FAILURE);
 
index f7896c2f662a4e486d72d7a11b72b06fd5586a51..ab275c57883a49b4a74af80c868864b6530b8ba8 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "../testsuite.h"
 
-int test_parse(const test_t* t) {
+static int test_parse(const test_t* t) {
        char* path = pakfire_path_join(TEST_SRC_PATH, "data/kernel.nm");
 
        // Open file
index 2e4994e7ec1b32d2526f7fc6f9c059778ebde215..80ce55dea3c550f5424824fcececc99af56862bd 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "../testsuite.h"
 
-int test_parser(const test_t* t) {
+static int test_parser(const test_t* t) {
        char* value = NULL;
 
        // Create a new parser
index 1a32f3cc30c90123227e27150a31ac9c08172d2d..97fcf643d1fc8ecc56462951a8eca324b9ca4fb0 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "../testsuite.h"
 
-int test_basename(const test_t* t) {
+static int test_basename(const test_t* t) {
        const char* dir = "/a/b/c";
 
        char* output = pakfire_basename(dir);
@@ -35,7 +35,7 @@ int test_basename(const test_t* t) {
        return EXIT_SUCCESS;
 }
 
-int test_dirname(const test_t* t) {
+static int test_dirname(const test_t* t) {
        const char* dir = "/a/b/c";
 
        char* output = pakfire_dirname(dir);