summaryrefslogtreecommitdiffstats
path: root/meta-selftest/recipes-test/selftest-hardlink
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-30 23:33:27 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-31 22:47:35 +0100
commit318595754b66e8e4f3db1bce1ac086a2409e2eca (patch)
treedace5709772bdb533aee1fb77a59892970268a9b /meta-selftest/recipes-test/selftest-hardlink
parent099625aacf9064d90c6015bde80e223ba1bf2512 (diff)
downloadpoky-318595754b66e8e4f3db1bce1ac086a2409e2eca.tar.gz
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. (From OE-Core rev: 751fc7802f57a836a0be5fc6a8d5fdf8b1769c39) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta-selftest/recipes-test/selftest-hardlink')
-rw-r--r--meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb19
-rw-r--r--meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink/hello.c5
2 files changed, 24 insertions, 0 deletions
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 @@
1LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
2
3LICENSE = "MIT"
4
5SRC_URI = "file://hello.c"
6
7S = "${WORKDIR}"
8
9do_compile () {
10 ${CC} hello.c -o hello ${CFLAGS} ${LDFLAGS}
11}
12
13do_install () {
14 install -d ${D}${bindir}
15 install -m 755 hello ${D}${bindir}/hello
16 ln ${D}${bindir}/hello ${D}${bindir}/hello2
17 ln ${D}${bindir}/hello ${D}${bindir}/hello3
18 ln ${D}${bindir}/hello ${D}${bindir}/hello4
19}
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 @@
1#include <stdio.h>
2
3int main() {
4 printf("Hello World!\n");
5} \ No newline at end of file