summaryrefslogtreecommitdiffstats
path: root/meta-selftest
diff options
context:
space:
mode:
Diffstat (limited to 'meta-selftest')
-rw-r--r--meta-selftest/classes/localpkgfeed.bbclass27
-rw-r--r--meta-selftest/conf/layer.conf2
-rw-r--r--meta-selftest/recipes-test/cpp/cpp-example.inc3
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-localonly.bb3
-rw-r--r--meta-selftest/recipes-test/fortran/fortran-helloworld.bb2
-rw-r--r--meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb16
-rw-r--r--meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb5
-rw-r--r--meta-selftest/recipes-test/selftest-chown/selftest-chown.bb3
-rw-r--r--meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb5
-rw-r--r--meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb5
-rw-r--r--meta-selftest/recipes-test/selftest-users/acreategroup.bb3
-rw-r--r--meta-selftest/recipes-test/selftest-users/bcreategroup.bb3
-rw-r--r--meta-selftest/recipes-test/selftest-users/ccreategroup.bb3
-rw-r--r--meta-selftest/recipes-test/selftest-users/creategroup1.bb3
-rw-r--r--meta-selftest/recipes-test/selftest-users/creategroup2.bb3
-rw-r--r--meta-selftest/recipes-test/selftest-users/dcreategroup.bb3
-rw-r--r--meta-selftest/recipes-test/selftest-users/useraddbadtask.bb3
-rw-r--r--meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb3
-rw-r--r--meta-selftest/recipes-test/wrapper/cmdline-shebang-wrapper-test.bb2
-rw-r--r--meta-selftest/wic/overlayfs_etc.wks.in4
20 files changed, 74 insertions, 27 deletions
diff --git a/meta-selftest/classes/localpkgfeed.bbclass b/meta-selftest/classes/localpkgfeed.bbclass
new file mode 100644
index 0000000000..b796375e55
--- /dev/null
+++ b/meta-selftest/classes/localpkgfeed.bbclass
@@ -0,0 +1,27 @@
+# Create a subset of the package feed that just contain the
+# packages depended on by this recipe.
+
+LOCALPKGFEED_DIR = "${WORKDIR}/localpkgfeed"
+
+addtask localpkgfeed after do_build
+do_localpkgfeed[cleandirs] = "${LOCALPKGFEED_DIR}"
+do_localpkgfeed[nostamp] = "1"
+
+def get_packaging_class(d):
+ package_class = d.getVar("PACKAGE_CLASSES").split()[0]
+ return package_class.replace("package_", "")
+
+python () {
+ packaging = get_packaging_class(d)
+ d.setVarFlag("do_localpkgfeed", "rdeptask", "do_package_write_" + packaging)
+}
+
+python do_localpkgfeed() {
+ import oe.package_manager
+
+ packaging = get_packaging_class(d)
+ deploydir = d.getVar("DEPLOY_DIR_" + packaging.upper())
+ task = "package_write_" + packaging
+
+ oe.package_manager.create_packages_dir(d, d.getVar("LOCALPKGFEED_DIR"), deploydir, task, True, True)
+}
diff --git a/meta-selftest/conf/layer.conf b/meta-selftest/conf/layer.conf
index 48ca8464f9..763ea011d4 100644
--- a/meta-selftest/conf/layer.conf
+++ b/meta-selftest/conf/layer.conf
@@ -11,4 +11,4 @@ BBFILE_PRIORITY_selftest = "5"
addpylib ${LAYERDIR}/lib oeqa
-LAYERSERIES_COMPAT_selftest = "scarthgap"
+LAYERSERIES_COMPAT_selftest = "styhead"
diff --git a/meta-selftest/recipes-test/cpp/cpp-example.inc b/meta-selftest/recipes-test/cpp/cpp-example.inc
index ad374be9d0..41aaa7219a 100644
--- a/meta-selftest/recipes-test/cpp/cpp-example.inc
+++ b/meta-selftest/recipes-test/cpp/cpp-example.inc
@@ -19,6 +19,7 @@ SRC_URI = "\
file://run-ptest \
"
-S = "${WORKDIR}"
+S = "${WORKDIR}/sources"
+UNPACKDIR = "${S}"
inherit ptest
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-localonly.bb b/meta-selftest/recipes-test/devtool/devtool-test-localonly.bb
index e767619879..446c51f09b 100644
--- a/meta-selftest/recipes-test/devtool/devtool-test-localonly.bb
+++ b/meta-selftest/recipes-test/devtool/devtool-test-localonly.bb
@@ -6,5 +6,8 @@ SRC_URI = "file://file1 \
SRC_URI:append:class-native = " file://file3"
+S = "${WORKDIR}/sources"
+UNPACKDIR = "${S}"
+
EXCLUDE_FROM_WORLD = "1"
BBCLASSEXTEND = "native"
diff --git a/meta-selftest/recipes-test/fortran/fortran-helloworld.bb b/meta-selftest/recipes-test/fortran/fortran-helloworld.bb
index 3a46404477..a897966608 100644
--- a/meta-selftest/recipes-test/fortran/fortran-helloworld.bb
+++ b/meta-selftest/recipes-test/fortran/fortran-helloworld.bb
@@ -11,7 +11,7 @@ SECURITY_CFLAGS = ""
SECURITY_LDFLAGS = ""
do_compile() {
- ${FC} ${LDFLAGS} ${WORKDIR}/hello.f95 -o ${B}/fortran-hello
+ ${FC} ${LDFLAGS} ${UNPACKDIR}/hello.f95 -o ${B}/fortran-hello
}
do_install() {
diff --git a/meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb b/meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb
index e127b48b15..7698413d4d 100644
--- a/meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb
+++ b/meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb
@@ -17,20 +17,20 @@ SRC_URI = "file://installscript.sh \
EXCLUDE_FROM_WORLD = "1"
install_extrafunc() {
- install -m 0644 ${WORKDIR}/selftest-replaceme-inst-func ${D}${datadir}/selftest-replaceme-inst-func
+ install -m 0644 ${UNPACKDIR}/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
- cp ${WORKDIR}/selftest-replaceme-inst-glob* ${D}${datadir}/selftest-replaceme-inst-globfile
- cp ${WORKDIR}/selftest-replaceme-inst-todir-glob* ${D}${datadir}
+ install -m 0644 ${UNPACKDIR}/selftest-replaceme-orig ${D}${datadir}/selftest-replaceme-orig
+ install -m 0644 ${UNPACKDIR}/selftest-replaceme-todir ${D}${datadir}
+ install -m 0644 ${UNPACKDIR}/file1 ${D}${datadir}/selftest-replaceme-renamed
+ install -m 0644 ${UNPACKDIR}/subdir/fileinsubdir ${D}${datadir}/selftest-replaceme-subdir
+ cp ${UNPACKDIR}/selftest-replaceme-inst-glob* ${D}${datadir}/selftest-replaceme-inst-globfile
+ cp ${UNPACKDIR}/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}
+ sh ${UNPACKDIR}/installscript.sh ${D}${datadir}
install_extrafunc
}
diff --git a/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb b/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb
index ad9f475d15..8b314d396e 100644
--- a/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb
+++ b/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb
@@ -3,9 +3,12 @@ SUMMARY = "Test recipe for recipeutils.patch_recipe()"
require recipeutils-test.inc
LICENSE = "HPND"
-LIC_FILES_CHKSUM = "file://${WORKDIR}/somefile;md5=d41d8cd98f00b204e9800998ecf8427e"
+LIC_FILES_CHKSUM = "file://${UNPACKDIR}/somefile;md5=d41d8cd98f00b204e9800998ecf8427e"
DEPENDS += "zlib"
+S = "${WORKDIR}/sources"
+UNPACKDIR = "${S}"
+
BBCLASSEXTEND = "native nativesdk"
SRC_URI += "file://somefile"
diff --git a/meta-selftest/recipes-test/selftest-chown/selftest-chown.bb b/meta-selftest/recipes-test/selftest-chown/selftest-chown.bb
index aa6ce0c2a0..a0eeb4f223 100644
--- a/meta-selftest/recipes-test/selftest-chown/selftest-chown.bb
+++ b/meta-selftest/recipes-test/selftest-chown/selftest-chown.bb
@@ -5,7 +5,8 @@ LICENSE = "MIT"
DEPENDS += "coreutils-native"
-S = "${WORKDIR}"
+S = "${WORKDIR}/sources"
+UNPACKDIR = "${S}"
inherit useradd allarch
diff --git a/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb b/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb
index be346b8a0e..5632bdac7a 100644
--- a/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb
+++ b/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb
@@ -6,7 +6,8 @@ SRC_URI = "file://hello.c \
file://gdb.sh \
"
-S = "${WORKDIR}"
+S = "${WORKDIR}/sources"
+UNPACKDIR = "${S}"
do_compile () {
${CC} hello.c -o hello1 ${CFLAGS} ${LDFLAGS}
@@ -14,7 +15,7 @@ do_compile () {
do_install () {
install -d ${D}${bindir}
- install -m 755 ${WORKDIR}/gdb.sh ${D}${bindir}/
+ install -m 755 ${S}/gdb.sh ${D}${bindir}/
install -m 755 hello1 ${D}${bindir}/hello1
ln ${D}${bindir}/hello1 ${D}${bindir}/hello2
diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
index 547587bef4..2dc352d479 100644
--- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
@@ -5,7 +5,8 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda
SRC_URI = "file://helloworld.c"
-S = "${WORKDIR}"
+S = "${WORKDIR}/sources"
+UNPACKDIR = "${S}"
do_compile() {
${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld
@@ -16,4 +17,4 @@ do_install() {
install -m 0755 helloworld ${D}${bindir}
}
-BBCLASSEXTEND = "native nativesdk" \ No newline at end of file
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-selftest/recipes-test/selftest-users/acreategroup.bb b/meta-selftest/recipes-test/selftest-users/acreategroup.bb
index 66ed5695a2..7805182d48 100644
--- a/meta-selftest/recipes-test/selftest-users/acreategroup.bb
+++ b/meta-selftest/recipes-test/selftest-users/acreategroup.bb
@@ -3,7 +3,8 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda
LICENSE = "MIT"
-S = "${WORKDIR}"
+S = "${WORKDIR}/sources"
+UNPACKDIR = "${S}"
EXCLUDE_FROM_WORLD="1"
diff --git a/meta-selftest/recipes-test/selftest-users/bcreategroup.bb b/meta-selftest/recipes-test/selftest-users/bcreategroup.bb
index c4844dd0da..b15c07d7b2 100644
--- a/meta-selftest/recipes-test/selftest-users/bcreategroup.bb
+++ b/meta-selftest/recipes-test/selftest-users/bcreategroup.bb
@@ -7,7 +7,8 @@ LICENSE = "MIT"
USERADD_DEPENDS = "acreategroup ccreategroup"
-S = "${WORKDIR}"
+S = "${WORKDIR}/sources"
+UNPACKDIR = "${S}"
EXCLUDE_FROM_WORLD="1"
diff --git a/meta-selftest/recipes-test/selftest-users/ccreategroup.bb b/meta-selftest/recipes-test/selftest-users/ccreategroup.bb
index 021b1ebbf7..ff2da1c039 100644
--- a/meta-selftest/recipes-test/selftest-users/ccreategroup.bb
+++ b/meta-selftest/recipes-test/selftest-users/ccreategroup.bb
@@ -5,7 +5,8 @@ LICENSE = "MIT"
USERADD_DEPENDS = "acreategroup"
-S = "${WORKDIR}"
+S = "${WORKDIR}/sources"
+UNPACKDIR = "${S}"
EXCLUDE_FROM_WORLD="1"
diff --git a/meta-selftest/recipes-test/selftest-users/creategroup1.bb b/meta-selftest/recipes-test/selftest-users/creategroup1.bb
index afd23ed1ee..4ab278f589 100644
--- a/meta-selftest/recipes-test/selftest-users/creategroup1.bb
+++ b/meta-selftest/recipes-test/selftest-users/creategroup1.bb
@@ -3,7 +3,8 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda
LICENSE = "MIT"
-S = "${WORKDIR}"
+S = "${WORKDIR}/sources"
+UNPACKDIR = "${S}"
inherit useradd allarch
diff --git a/meta-selftest/recipes-test/selftest-users/creategroup2.bb b/meta-selftest/recipes-test/selftest-users/creategroup2.bb
index f776f43aed..179aba9bfc 100644
--- a/meta-selftest/recipes-test/selftest-users/creategroup2.bb
+++ b/meta-selftest/recipes-test/selftest-users/creategroup2.bb
@@ -5,7 +5,8 @@ LICENSE = "MIT"
USERADD_DEPENDS = "creategroup1"
-S = "${WORKDIR}"
+S = "${WORKDIR}/sources"
+UNPACKDIR = "${S}"
inherit useradd allarch
diff --git a/meta-selftest/recipes-test/selftest-users/dcreategroup.bb b/meta-selftest/recipes-test/selftest-users/dcreategroup.bb
index b96ca92a16..ab0a529669 100644
--- a/meta-selftest/recipes-test/selftest-users/dcreategroup.bb
+++ b/meta-selftest/recipes-test/selftest-users/dcreategroup.bb
@@ -5,7 +5,8 @@ LICENSE = "MIT"
USERADD_DEPENDS = "bcreategroup"
-S = "${WORKDIR}"
+S = "${WORKDIR}/sources"
+UNPACKDIR = "${S}"
EXCLUDE_FROM_WORLD="1"
diff --git a/meta-selftest/recipes-test/selftest-users/useraddbadtask.bb b/meta-selftest/recipes-test/selftest-users/useraddbadtask.bb
index 99e04a80b3..2863541010 100644
--- a/meta-selftest/recipes-test/selftest-users/useraddbadtask.bb
+++ b/meta-selftest/recipes-test/selftest-users/useraddbadtask.bb
@@ -5,7 +5,8 @@ LICENSE = "MIT"
DEPENDS:append = "coreutils-native"
-S = "${WORKDIR}"
+S = "${WORKDIR}/sources"
+UNPACKDIR = "${S}"
inherit useradd allarch
diff --git a/meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb b/meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb
index 5e8761ab55..db674d0efc 100644
--- a/meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb
+++ b/meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb
@@ -6,6 +6,9 @@ LICENSE = "MIT"
SRC_URI = "file://testfile.txt"
INHIBIT_DEFAULT_DEPS = "1"
+S = "${WORKDIR}/sources"
+UNPACKDIR = "${S}"
+
do_compile(){
echo "testdata" > ${B}/"file with [brackets].txt"
echo "testdata" > ${B}/"file with (parentheses).txt"
diff --git a/meta-selftest/recipes-test/wrapper/cmdline-shebang-wrapper-test.bb b/meta-selftest/recipes-test/wrapper/cmdline-shebang-wrapper-test.bb
index c3d3548d4a..c91d00c8d9 100644
--- a/meta-selftest/recipes-test/wrapper/cmdline-shebang-wrapper-test.bb
+++ b/meta-selftest/recipes-test/wrapper/cmdline-shebang-wrapper-test.bb
@@ -9,7 +9,7 @@ EXCLUDE_FROM_WORLD = "1"
do_install() {
install -d ${D}${bindir}
# was not able to make ownership preservation check
- install -m 0400 ${WORKDIR}/test.awk ${D}${bindir}/test
+ install -m 0400 ${UNPACKDIR}/test.awk ${D}${bindir}/test
perm_old="$(stat --format='%a' ${D}${bindir}/test)"
sed -i -e 's|@AWK_BIN@|${bindir}/awk|g' ${D}${bindir}/test
diff --git a/meta-selftest/wic/overlayfs_etc.wks.in b/meta-selftest/wic/overlayfs_etc.wks.in
index 1e1e5836e7..066cd35b15 100644
--- a/meta-selftest/wic/overlayfs_etc.wks.in
+++ b/meta-selftest/wic/overlayfs_etc.wks.in
@@ -1,4 +1,4 @@
part /boot --active --source bootimg-biosplusefi --ondisk sda --sourceparams="loader=grub-efi" --align 1024
-part / --source rootfs --ondisk sda --fstype=ext4 --use-uuid --align 1024
+part / --source rootfs --ondisk sda --fstype=${OVERLAYFS_ROOTFS_TYPE} --use-uuid --align 1024
part --ondisk sda --fstype=ext4 --size=5 --align 1024
-bootloader --ptable gpt --timeout=1 --append="rootfstype=ext4 console=ttyS0,115200 console=tty0 ${OVERLAYFS_INIT_OPTION}"
+bootloader --ptable gpt --timeout=1 --append="rootfstype=${OVERLAYFS_ROOTFS_TYPE} console=ttyS0,115200 console=tty0 ${OVERLAYFS_INIT_OPTION}"