summaryrefslogtreecommitdiff
path: root/meta-selftest/recipes-test
diff options
context:
space:
mode:
Diffstat (limited to 'meta-selftest/recipes-test')
-rw-r--r--meta-selftest/recipes-test/recipetool/files/add-file.patch8
-rw-r--r--meta-selftest/recipes-test/recipetool/files/file12
-rw-r--r--meta-selftest/recipes-test/recipetool/files/installscript.sh3
-rw-r--r--meta-selftest/recipes-test/recipetool/files/selftest-replaceme-inst-func1
-rw-r--r--meta-selftest/recipes-test/recipetool/files/selftest-replaceme-inst-globfile1
-rw-r--r--meta-selftest/recipes-test/recipetool/files/selftest-replaceme-inst-todir-globfile1
-rw-r--r--meta-selftest/recipes-test/recipetool/files/selftest-replaceme-orig1
-rw-r--r--meta-selftest/recipes-test/recipetool/files/selftest-replaceme-src-globfile1
-rw-r--r--meta-selftest/recipes-test/recipetool/files/selftest-replaceme-todir1
-rw-r--r--meta-selftest/recipes-test/recipetool/files/subdir/fileinsubdir1
-rw-r--r--meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb42
11 files changed, 62 insertions, 0 deletions
diff --git a/meta-selftest/recipes-test/recipetool/files/add-file.patch b/meta-selftest/recipes-test/recipetool/files/add-file.patch
new file mode 100644
index 0000000000..bdc99c94f0
--- /dev/null
+++ b/meta-selftest/recipes-test/recipetool/files/add-file.patch
@@ -0,0 +1,8 @@
+diff --git a/file2 b/file2
+new file mode 100644
+index 0000000..049b42e
+--- /dev/null
++++ b/file2
+@@ -0,0 +1,2 @@
++Test file 2
++456
diff --git a/meta-selftest/recipes-test/recipetool/files/file1 b/meta-selftest/recipes-test/recipetool/files/file1
new file mode 100644
index 0000000000..7571aa7a88
--- /dev/null
+++ b/meta-selftest/recipes-test/recipetool/files/file1
@@ -0,0 +1,2 @@
+First test file
+123
diff --git a/meta-selftest/recipes-test/recipetool/files/installscript.sh b/meta-selftest/recipes-test/recipetool/files/installscript.sh
new file mode 100644
index 0000000000..9de30d69ca
--- /dev/null
+++ b/meta-selftest/recipes-test/recipetool/files/installscript.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+echo "Third file" > $1/selftest-replaceme-scripted
+
diff --git a/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-inst-func b/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-inst-func
new file mode 100644
index 0000000000..2802bb348b
--- /dev/null
+++ b/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-inst-func
@@ -0,0 +1 @@
+A file installed by a function called by do_install
diff --git a/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-inst-globfile b/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-inst-globfile
new file mode 100644
index 0000000000..996298bf1f
--- /dev/null
+++ b/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-inst-globfile
@@ -0,0 +1 @@
+A file matched by a glob in do_install
diff --git a/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-inst-todir-globfile b/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-inst-todir-globfile
new file mode 100644
index 0000000000..585ae3e9b0
--- /dev/null
+++ b/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-inst-todir-globfile
@@ -0,0 +1 @@
+A file matched by a glob in do_install to a directory
diff --git a/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-orig b/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-orig
new file mode 100644
index 0000000000..593d6a0bb4
--- /dev/null
+++ b/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-orig
@@ -0,0 +1 @@
+Straight through with same nam
diff --git a/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-src-globfile b/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-src-globfile
new file mode 100644
index 0000000000..1e20a2b03e
--- /dev/null
+++ b/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-src-globfile
@@ -0,0 +1 @@
+A file matched by a glob in SRC_URI
diff --git a/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-todir b/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-todir
new file mode 100644
index 0000000000..85bd5eba46
--- /dev/null
+++ b/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-todir
@@ -0,0 +1 @@
+File in SRC_URI installed just to directory path
diff --git a/meta-selftest/recipes-test/recipetool/files/subdir/fileinsubdir b/meta-selftest/recipes-test/recipetool/files/subdir/fileinsubdir
new file mode 100644
index 0000000000..d516b4951b
--- /dev/null
+++ b/meta-selftest/recipes-test/recipetool/files/subdir/fileinsubdir
@@ -0,0 +1 @@
+A file in a subdirectory
diff --git a/meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb b/meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb
new file mode 100644
index 0000000000..7d0a040beb
--- /dev/null
+++ b/meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb
@@ -0,0 +1,42 @@
+SUMMARY = "Test recipe for recipetool appendfile"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+SRC_URI = "file://installscript.sh \
+ file://selftest-replaceme-orig \
+ file://selftest-replaceme-todir \
+ file://file1 \
+ file://add-file.patch \
+ file://subdir \
+ file://selftest-replaceme-src-glob* \
+ file://selftest-replaceme-inst-globfile \
+ file://selftest-replaceme-inst-todir-globfile \
+ file://selftest-replaceme-inst-func"
+
+install_extrafunc() {
+ install -m 0644 ${WORKDIR}/selftest-replaceme-inst-func ${D}${datadir}/selftest-replaceme-inst-func
+}
+
+do_install() {
+ install -d ${D}${datadir}/
+ install -m 0644 ${WORKDIR}/selftest-replaceme-orig ${D}${datadir}/selftest-replaceme-orig
+ install -m 0644 ${WORKDIR}/selftest-replaceme-todir ${D}${datadir}
+ install -m 0644 ${WORKDIR}/file1 ${D}${datadir}/selftest-replaceme-renamed
+ install -m 0644 ${WORKDIR}/subdir/fileinsubdir ${D}${datadir}/selftest-replaceme-subdir
+ install -m 0644 ${WORKDIR}/selftest-replaceme-src-globfile ${D}${datadir}/selftest-replaceme-src-globfile
+ cp ${WORKDIR}/selftest-replaceme-inst-glob* ${D}${datadir}/selftest-replaceme-inst-globfile
+ cp ${WORKDIR}/selftest-replaceme-inst-todir-glob* ${D}${datadir}
+ install -d ${D}${sysconfdir}
+ install -m 0644 ${S}/file2 ${D}${sysconfdir}/selftest-replaceme-patched
+ sh ${WORKDIR}/installscript.sh ${D}${datadir}
+ install_extrafunc
+}
+
+pkg_postinst_${PN} () {
+ echo "Test file installed by postinst" > $D${datadir}/selftest-replaceme-postinst
+}
+
+FILES_${PN} += "${datadir}"
+