All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] bash: Include files needed for run-heredoc ptest
@ 2021-04-30  4:18 Khem Raj
  2021-04-30  4:18 ` [PATCH 2/2] libpam: Provide needed env for tst-pam_start_confdir ptest Khem Raj
  0 siblings, 1 reply; 2+ messages in thread
From: Khem Raj @ 2021-04-30  4:18 UTC (permalink / raw)
  To: openembedded-core; +Cc: Khem Raj

These files are used by this ptest case

103,108d102
< cat: ../y.tab.c: No such file or directory
< cmp: ../y.tab.c: No such file or directory
< cat: /usr/lib/bash/ptest/config.h: No such file or directory
< cmp: /usr/lib/bash/ptest/config.h: No such file or directory
< cat: /usr/lib/bash/ptest/version.h: No such file or directory
< cmp: /usr/lib/bash/ptest/version.h: No such file or directory
FAIL: run-heredoc

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-extended/bash/bash.inc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc
index d3e1dfdb30..7350601c65 100644
--- a/meta/recipes-extended/bash/bash.inc
+++ b/meta/recipes-extended/bash/bash.inc
@@ -91,6 +91,9 @@ do_install_append_class-target () {
 do_install_ptest () {
 	make INSTALL_TEST_DIR=${D}${PTEST_PATH}/tests install-test
 	cp ${B}/Makefile ${D}${PTEST_PATH}
+	cp ${B}/config.h ${D}${PTEST_PATH}
+	cp ${B}/version.h ${D}${PTEST_PATH}
+	cp ${S}/y.tab.[ch] ${D}${PTEST_PATH}
 	install -D ${WORKDIR}/run-bash-ptests ${D}${PTEST_PATH}/run-bash-ptests
         sed -i -e 's/^Makefile/_Makefile/' -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
 	    -e 's|${DEBUG_PREFIX_MAP}||g' \
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 2/2] libpam: Provide needed env for tst-pam_start_confdir ptest
  2021-04-30  4:18 [PATCH 1/2] bash: Include files needed for run-heredoc ptest Khem Raj
@ 2021-04-30  4:18 ` Khem Raj
  0 siblings, 0 replies; 2+ messages in thread
From: Khem Raj @ 2021-04-30  4:18 UTC (permalink / raw)
  To: openembedded-core; +Cc: Khem Raj

tst-pam_start_confdir needs a file called confdir and it should reside
in directory pointed by srcdir env variable, therefore copy confdir into
ptest package and export srcdir before running the ptests

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-extended/pam/libpam/run-ptest | 5 +++--
 meta/recipes-extended/pam/libpam_1.5.1.bb  | 1 +
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-extended/pam/libpam/run-ptest b/meta/recipes-extended/pam/libpam/run-ptest
index 69e729ce2a..9c304aee47 100644
--- a/meta/recipes-extended/pam/libpam/run-ptest
+++ b/meta/recipes-extended/pam/libpam/run-ptest
@@ -2,9 +2,10 @@
 
 cd tests
 
+export srcdir=.
+
 failed=0
 all=0
-
 for f in tst-*; do
     "./$f" > /dev/null 2>&1
     case "$?" in
@@ -28,4 +29,4 @@ if [ "$failed" -eq 0 ] ; then
 else
   echo "$failed of $all tests failed"
 fi
-
+unset srcdir
diff --git a/meta/recipes-extended/pam/libpam_1.5.1.bb b/meta/recipes-extended/pam/libpam_1.5.1.bb
index 4363e16b9b..f0c8caaac2 100644
--- a/meta/recipes-extended/pam/libpam_1.5.1.bb
+++ b/meta/recipes-extended/pam/libpam_1.5.1.bb
@@ -154,6 +154,7 @@ do_install_ptest() {
     if [ ${PTEST_ENABLED} = "1" ]; then
         mkdir -p ${D}${PTEST_PATH}/tests
         install -m 0755 ${B}/tests/.libs/* ${D}${PTEST_PATH}/tests
+        install -m 0644 ${S}/tests/confdir ${D}${PTEST_PATH}/tests
     fi
 }
 
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-30  4:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-30  4:18 [PATCH 1/2] bash: Include files needed for run-heredoc ptest Khem Raj
2021-04-30  4:18 ` [PATCH 2/2] libpam: Provide needed env for tst-pam_start_confdir ptest Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.