From 751fc7802f57a836a0be5fc6a8d5fdf8b1769c39 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 30 Jul 2018 23:33:27 +0000 Subject: oeqa/selftest: Add package hardlink test We keep breaking the preservation of hardlinks during the packaging process. Add a selftest which tests this to try and prevent this breaking again. Signed-off-by: Richard Purdie --- .../selftest-hardlink/selftest-hardlink.bb | 19 +++++++++++++++++++ .../selftest-hardlink/selftest-hardlink/hello.c | 5 +++++ 2 files changed, 24 insertions(+) create mode 100644 meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb create mode 100644 meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink/hello.c (limited to 'meta-selftest') diff --git a/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb b/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb new file mode 100644 index 0000000000..8a0e6336aa --- /dev/null +++ b/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb @@ -0,0 +1,19 @@ +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +LICENSE = "MIT" + +SRC_URI = "file://hello.c" + +S = "${WORKDIR}" + +do_compile () { + ${CC} hello.c -o hello ${CFLAGS} ${LDFLAGS} +} + +do_install () { + install -d ${D}${bindir} + install -m 755 hello ${D}${bindir}/hello + ln ${D}${bindir}/hello ${D}${bindir}/hello2 + ln ${D}${bindir}/hello ${D}${bindir}/hello3 + ln ${D}${bindir}/hello ${D}${bindir}/hello4 +} diff --git a/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink/hello.c b/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink/hello.c new file mode 100644 index 0000000000..5c45dc60bd --- /dev/null +++ b/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink/hello.c @@ -0,0 +1,5 @@ +#include + +int main() { + printf("Hello World!\n"); +} \ No newline at end of file -- cgit 1.2.3-korg