]> git.ipfire.org Git - pakfire.git/commitdiff
tests: Build scaffolding for a simple statically linked command
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 19 Jul 2022 16:39:56 +0000 (16:39 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 19 Jul 2022 16:39:56 +0000 (16:39 +0000)
This can then be used to test the execution container.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
tests/stub/command.c [new file with mode: 0644]

index b9c4d8fdf7119027cac5496bc31dee38d5fec100..67be32c6afc974a0e1c25325003f52d766f56b2e 100644 (file)
@@ -604,6 +604,24 @@ tests_libpakfire_util_LDADD = \
 
 # ------------------------------------------------------------------------------
 
+tests_stubdir = $(testsdir)/stub
+
+tests_stub_rootdir = $(tests_stubdir)/root
+
+tests_stub_root_PROGRAMS = \
+       tests/stub/root/command
+
+tests_stub_root_command_SOURCES = \
+       tests/stub/command.c
+
+tests_stub_root_command_LDFLAGS = \
+       -all-static
+
+CLEANFILES += \
+       tests/stub/root/command
+
+# ------------------------------------------------------------------------------
+
 dist_scripts_SCRIPTS = \
        src/scripts/check-buildroot \
        src/scripts/check-fhs \
diff --git a/tests/stub/command.c b/tests/stub/command.c
new file mode 100644 (file)
index 0000000..dd1b781
--- /dev/null
@@ -0,0 +1,23 @@
+/*#############################################################################
+#                                                                             #
+# Pakfire - The IPFire package management system                              #
+# Copyright (C) 2022 Pakfire development team                                 #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+#############################################################################*/
+
+int main(int argc, char* argv[]) {
+       return 0;
+}