summaryrefslogtreecommitdiffstats
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 @@
1diff --git a/file2 b/file2
2new file mode 100644
3index 0000000..049b42e
4--- /dev/null
5+++ b/file2
6@@ -0,0 +1,2 @@
7+Test file 2
8+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 @@
1First test file
2123
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 @@
1#!/bin/sh
2echo "Third file" > $1/selftest-replaceme-scripted
3
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 @@
1SUMMARY = "Test recipe for recipetool appendfile"
2LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
4
5INHIBIT_DEFAULT_DEPS = "1"
6
7SRC_URI = "file://installscript.sh \
8 file://selftest-replaceme-orig \
9 file://selftest-replaceme-todir \
10 file://file1 \
11 file://add-file.patch \
12 file://subdir \
13 file://selftest-replaceme-src-glob* \
14 file://selftest-replaceme-inst-globfile \
15 file://selftest-replaceme-inst-todir-globfile \
16 file://selftest-replaceme-inst-func"
17
18install_extrafunc() {
19 install -m 0644 ${WORKDIR}/selftest-replaceme-inst-func ${D}${datadir}/selftest-replaceme-inst-func
20}
21
22do_install() {
23 install -d ${D}${datadir}/
24 install -m 0644 ${WORKDIR}/selftest-replaceme-orig ${D}${datadir}/selftest-replaceme-orig
25 install -m 0644 ${WORKDIR}/selftest-replaceme-todir ${D}${datadir}
26 install -m 0644 ${WORKDIR}/file1 ${D}${datadir}/selftest-replaceme-renamed
27 install -m 0644 ${WORKDIR}/subdir/fileinsubdir ${D}${datadir}/selftest-replaceme-subdir
28 install -m 0644 ${WORKDIR}/selftest-replaceme-src-globfile ${D}${datadir}/selftest-replaceme-src-globfile
29 cp ${WORKDIR}/selftest-replaceme-inst-glob* ${D}${datadir}/selftest-replaceme-inst-globfile
30 cp ${WORKDIR}/selftest-replaceme-inst-todir-glob* ${D}${datadir}
31 install -d ${D}${sysconfdir}
32 install -m 0644 ${S}/file2 ${D}${sysconfdir}/selftest-replaceme-patched
33 sh ${WORKDIR}/installscript.sh ${D}${datadir}
34 install_extrafunc
35}
36
37pkg_postinst_${PN} () {
38 echo "Test file installed by postinst" > $D${datadir}/selftest-replaceme-postinst
39}
40
41FILES_${PN} += "${datadir}"
42