[oe-commits] [openembedded-core] 15/32: mdadm: correctly set up testing location for ptests
git at git.openembedded.org
git at git.openembedded.org
Sun Jan 26 22:33:38 UTC 2020
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 8651b576d57a8ae81f42d8294b5c8c75fd1e7234
Author: Alexander Kanavin <alex.kanavin at gmail.com>
AuthorDate: Thu Jan 23 18:34:15 2020 +0100
mdadm: correctly set up testing location for ptests
1. Do not clutter /, create a special-purpose dir
2. Clean up the dir after tests are done (if this is not
performed, disk will overflow later in ptesting).
3. Fix up more locations in ptests to use the dir.
Upstream default /var/tmp is not suitable as it is not
big enough (mdadm needs about 500 Mb)
Signed-off-by: Alexander Kanavin <alex.kanavin at gmail.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/recipes-extended/mdadm/files/run-ptest | 3 +++
meta/recipes-extended/mdadm/mdadm_4.1.bb | 3 ++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-extended/mdadm/files/run-ptest b/meta/recipes-extended/mdadm/files/run-ptest
index e4a9c2b..7959c05 100644
--- a/meta/recipes-extended/mdadm/files/run-ptest
+++ b/meta/recipes-extended/mdadm/files/run-ptest
@@ -1,4 +1,7 @@
#!/bin/sh
+mkdir -p /mdadm-testing-dir
# make the test continue to execute even one fail
./test --keep-going
+
+rm -rf /mdadm-testing-dir/*
diff --git a/meta/recipes-extended/mdadm/mdadm_4.1.bb b/meta/recipes-extended/mdadm/mdadm_4.1.bb
index 64f519e..40c5273 100644
--- a/meta/recipes-extended/mdadm/mdadm_4.1.bb
+++ b/meta/recipes-extended/mdadm/mdadm_4.1.bb
@@ -75,7 +75,8 @@ do_compile_ptest() {
do_install_ptest() {
cp -R --no-dereference --preserve=mode,links -v ${S}/tests ${D}${PTEST_PATH}/tests
cp ${S}/test ${D}${PTEST_PATH}
- sed -e 's!sleep 0.*!sleep 1!g; s!/var/tmp!/!g' -i ${D}${PTEST_PATH}/test
+ sed -e 's!sleep 0.*!sleep 1!g; s!/var/tmp!/mdadm-testing-dir!g' -i ${D}${PTEST_PATH}/test
+ sed -e 's!/var/tmp!/mdadm-testing-dir!g' -i ${D}${PTEST_PATH}/tests/*
sed -i -e '/echo -ne "$_script... "/d' \
-e 's/echo "succeeded"/echo -e "PASS: $_script"/g' \
-e '/save_log fail/N; /_fail=1/i\\t\t\techo -ne "FAIL: $_script"' \
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list