]> granicus.if.org Git - p11-kit/commitdiff
build: Move check_PROGRAMS into subdirectories
authorDaiki Ueno <dueno@redhat.com>
Sat, 1 Jun 2019 10:51:39 +0000 (12:51 +0200)
committerDaiki Ueno <ueno@gnu.org>
Tue, 18 Jun 2019 12:17:28 +0000 (14:17 +0200)
.gitignore
common/Makefile.am
common/test-compat.c
p11-kit/Makefile.am
p11-kit/test-conf.c
p11-kit/test-messages.sh
p11-kit/test-server.c
p11-kit/test-server.sh
p11-kit/test-transport.c

index 4e3f7e6c8bdd0dd697cfe93ef23b2e66b3ce8cec..f9f58b1cc24fe06c8d95cd51c71ab8ca362e3798 100644 (file)
@@ -57,7 +57,7 @@ local
 x86_64-w64-mingw32
 
 /test-*
-/frob-*
+frob-*
 
 /x86_64_w64-mingw32/
 
@@ -101,11 +101,11 @@ x86_64-w64-mingw32
 /p11-kit/virtual-fixed-generated.h
 /p11-kit/*.gnu.c
 
-/p11-kit-remote
-/p11-kit-server
-/p11-kit-remote-testable
-/p11-kit-server-testable
-/print-messages
+/p11-kit/p11-kit-remote
+/p11-kit/p11-kit-server
+/p11-kit/p11-kit-remote-testable
+/p11-kit/p11-kit-server-testable
+/p11-kit/print-messages
 
 /po/POTFILES
 /po/stamp-po
index 410d70418c9ac52829496d955b62ffec299322d6..4c6e24c724a5e1afe4607b38e20c276aa4a654f7 100644 (file)
@@ -119,12 +119,12 @@ test_runtime_SOURCES = common/test-runtime.c
 test_runtime_LDADD = $(common_LIBS)
 
 check_PROGRAMS += \
-       frob-getauxval \
-       frob-getenv \
+       common/frob-getauxval \
+       common/frob-getenv \
        $(NULL)
 
-frob_getauxval_SOURCES = common/frob-getauxval.c
-frob_getauxval_LDADD = $(common_LIBS)
+common_frob_getauxval_SOURCES = common/frob-getauxval.c
+common_frob_getauxval_LDADD = $(common_LIBS)
 
-frob_getenv_SOURCES = common/frob-getenv.c
-frob_getenv_LDADD = $(common_LIBS)
+common_frob_getenv_SOURCES = common/frob-getenv.c
+common_frob_getenv_LDADD = $(common_LIBS)
index e1deac8cb3ed5097717f2fca84784a7959c8e173..4e76a7ddc59e14feec1a245fcee64b8938a33ec7 100644 (file)
@@ -63,7 +63,7 @@ static void
 test_getauxval (void)
 {
        /* 23 is AT_SECURE */
-       const char *args[] = { BUILDDIR "/frob-getauxval", "23", NULL };
+       const char *args[] = { BUILDDIR "/common/frob-getauxval", "23", NULL };
        char *path;
        int ret;
 
@@ -86,7 +86,7 @@ test_getauxval (void)
 static void
 test_secure_getenv (void)
 {
-       const char *args[] = { BUILDDIR "/frob-getenv", "BLAH", NULL };
+       const char *args[] = { BUILDDIR "/common/frob-getenv", "BLAH", NULL };
        char *path;
        int ret;
 
index 7f4ce44e2249b7fed169bf78972da0508126c6d4..b6491190441e2b39bac893e3fe69d1f594ac798c 100644 (file)
@@ -232,57 +232,57 @@ p11_kit_p11_kit_LDADD = \
        $(LTLIBINTL) \
        $(NULL)
 
-private_PROGRAMS += p11-kit-remote
+private_PROGRAMS += p11-kit/p11-kit-remote
 
-p11_kit_remote_SOURCES = \
+p11_kit_p11_kit_remote_SOURCES = \
        p11-kit/remote.c \
        $(NULL)
 
-p11_kit_remote_LDADD = \
+p11_kit_p11_kit_remote_LDADD = \
        libp11-tool.la \
        libp11-common.la \
        libp11-kit.la \
        $(NULL)
 
-check_PROGRAMS += p11-kit-remote-testable
-p11_kit_remote_testable_SOURCES = $(p11_kit_remote_SOURCES)
+check_PROGRAMS += p11-kit/p11-kit-remote-testable
+p11_kit_p11_kit_remote_testable_SOURCES = $(p11_kit_p11_kit_remote_SOURCES)
 
-p11_kit_remote_testable_LDADD = \
+p11_kit_p11_kit_remote_testable_LDADD = \
        libp11-tool.la \
        libp11-common.la \
        libp11-kit-testable.la \
        $(NULL)
 
-private_PROGRAMS += p11-kit-server
+private_PROGRAMS += p11-kit/p11-kit-server
 
-p11_kit_server_SOURCES = \
+p11_kit_p11_kit_server_SOURCES = \
        p11-kit/server.c \
        $(NULL)
 
-p11_kit_server_LDADD = \
+p11_kit_p11_kit_server_LDADD = \
        libp11-tool.la \
        libp11-common.la \
        libp11-kit.la \
        $(LIBSYSTEMD_LIBS) \
        $(NULL)
 
-p11_kit_server_CFLAGS = \
+p11_kit_p11_kit_server_CFLAGS = \
        -DP11_KIT_REMOTE=\"p11-kit-remote\" \
        $(COMMON_CFLAGS) \
        $(LIBSYSTEMD_CFLAGS) \
        $(NULL)
 
-check_PROGRAMS += p11-kit-server-testable
-p11_kit_server_testable_SOURCES = $(p11_kit_server_SOURCES)
+check_PROGRAMS += p11-kit/p11-kit-server-testable
+p11_kit_p11_kit_server_testable_SOURCES = $(p11_kit_p11_kit_server_SOURCES)
 
-p11_kit_server_testable_LDADD = \
+p11_kit_p11_kit_server_testable_LDADD = \
        libp11-tool.la \
        libp11-common.la \
        libp11-kit-testable.la \
        $(LIBSYSTEMD_LIBS) \
        $(NULL)
 
-p11_kit_server_testable_CFLAGS = \
+p11_kit_p11_kit_server_testable_CFLAGS = \
        -DP11_KIT_REMOTE=\"p11-kit-remote-testable\" \
        $(COMMON_CFLAGS) \
        $(LIBSYSTEMD_CFLAGS) \
@@ -368,8 +368,8 @@ test_util_SOURCES = p11-kit/test-util.c
 test_util_LDADD = $(p11_kit_LIBS)
 
 check_PROGRAMS += \
-       print-messages \
-       frob-setuid
+       p11-kit/print-messages \
+       p11-kit/frob-setuid
 
 print_messages_SOURCES = p11-kit/print-messages.c
 print_messages_LDADD = $(p11_kit_LIBS)
index f4ef0f665c628adc77c8d4ff9db7bee1788c0b26..098be0f7cc8aaf23b9d9ad94259c6b155c94a903 100644 (file)
@@ -402,7 +402,7 @@ test_parse_boolean (void)
 static void
 test_setuid (void)
 {
-       const char *args[] = { BUILDDIR "/frob-setuid", NULL, };
+       const char *args[] = { BUILDDIR "/p11-kit/frob-setuid", NULL, };
        char *path;
        int ret;
 
index 59dded4f41d28a782f3aefd861f0535269fc6129..7283e7763250fe54ae071af3b76771978d36e56e 100755 (executable)
@@ -96,7 +96,7 @@ CKR_MUTEX_NOT_LOCKED: The data cannot be locked
 CKR_FUNCTION_REJECTED: The request was rejected by the user
 EOF
 
-${WINE} "$abs_top_builddir"/print-messages | tr -d '\r' > messages.out
+${WINE} "$abs_top_builddir"/p11-kit/print-messages | tr -d '\r' > messages.out
 
 echo 1..1
 
index d6ab5d557fc5bb71f52c911e3f3b345c6ea76119..76b9d4e91a50bfc1142e5ecc1c1a28e967c529ad 100644 (file)
@@ -105,7 +105,7 @@ setup_server (void *arg)
        ret = socketpair (AF_UNIX, SOCK_STREAM, 0, fds);
        assert_num_cmp (-1, !=, ret);
 
-       setenv ("P11_KIT_PRIVATEDIR", BUILDDIR, 1);
+       setenv ("P11_KIT_PRIVATEDIR", BUILDDIR "/p11-kit", 1);
 
        /* Allow the child process to preload libasan.so */
        envvar = secure_getenv ("P11_KIT_TEST_LD_PRELOAD");
@@ -129,7 +129,7 @@ setup_server (void *arg)
                close (STDOUT_FILENO);
                if (dup2 (fds[0], STDOUT_FILENO) == -1)
                        assert_not_reached ();
-               if (execv (BUILDDIR "/p11-kit-server-testable", (char **)args->elem) == -1)
+               if (execv (BUILDDIR "/p11-kit/p11-kit-server-testable", (char **)args->elem) == -1)
                        assert_not_reached ();
                p11_array_free (args);
                _exit (0);
index e1d27ac7d55e425aad3f3ec0819d606fad5e106e..74b949147d1cdea768c26460efa8b618c8e92214 100755 (executable)
@@ -23,7 +23,7 @@ export XDG_RUNTIME_DIR
 
 echo 1..4
 
-"$abs_top_builddir"/p11-kit-server -s --provider "$abs_top_builddir"/.libs/mock-one.so pkcs11: > start.env 2> start.err
+"$abs_top_builddir"/p11-kit/p11-kit-server -s --provider "$abs_top_builddir"/.libs/mock-one.so pkcs11: > start.env 2> start.err
 if test $? -eq 0; then
        echo "ok 1 /server/start"
 else
@@ -41,7 +41,7 @@ else
        exit 1
 fi
 
-"$abs_top_builddir"/p11-kit-server -s -k > stop.env 2> stop.err
+"$abs_top_builddir"/p11-kit/p11-kit-server -s -k > stop.env 2> stop.err
 if test $? -eq 0; then
        echo "ok 3 /server/stop"
 else
index 40e5903ae32da08d2c463d314f700f2ffc5fe0ca..a5a93ea3f241a4dbc21b15364d4e461b1d978e76 100644 (file)
@@ -82,7 +82,7 @@ setup_remote (void *unused)
        test.user_config = p11_path_build (test.directory, "pkcs11.conf", NULL);
        p11_test_file_write (NULL, test.user_config, data, strlen (data));
 
-       setenv ("P11_KIT_PRIVATEDIR", BUILDDIR, 1);
+       setenv ("P11_KIT_PRIVATEDIR", BUILDDIR "/p11-kit", 1);
        data = "remote: |" BUILDDIR "/p11-kit/p11-kit" EXEEXT " remote " BUILDDIR "/.libs/mock-two" SHLEXT "\n";
        p11_test_file_write (test.user_modules, "remote.module", data, strlen (data));
        data = "remote: |" BUILDDIR "/p11-kit/p11-kit" EXEEXT " remote " BUILDDIR "/.libs/mock-five" SHLEXT "\nx-init-reserved: initialize-arg";
@@ -195,7 +195,7 @@ launch_server (void)
        argv[1] = BUILDDIR "/.libs/mock-two.so";
        argv[2] = NULL;
 
-       rc = execv (BUILDDIR "/p11-kit-remote", argv);
+       rc = execv (BUILDDIR "/p11-kit/p11-kit-remote", argv);
        assert_num_cmp (rc, !=, -1);
 }
 
@@ -228,7 +228,7 @@ setup_remote_unix (void *unused)
                test.pid = pid;
        }
 
-       setenv ("P11_KIT_PRIVATEDIR", BUILDDIR, 1);
+       setenv ("P11_KIT_PRIVATEDIR", BUILDDIR "/p11-kit", 1);
 
        if (asprintf (&path, "%s/pkcs11", test.directory) < 0)
                assert_not_reached ();