Skip to contentSkip to conversation

bash: Include files needed for run-heredoc ptest

PATCH New Khem Raj 1 participant 2 messages Apr 30, 2021

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/2 bash: Include files needed for run-heredoc ptest

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

---
 meta/recipes-extended/bash/bash.inc | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-extended/bash/bash.inc +3 -0
index d3e1dfdb30..7350601c65 100644
@@ -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' \
Signature · 1 line
2.31.1
author
#1 lore raw

PATCH 2/2 libpam: Provide needed env for tst-pam_start_confdir ptest

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

---
 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(-)
meta/recipes-extended/pam/libpam/run-ptest +3 -2
index 69e729ce2a..9c304aee47 100644
@@ -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
meta/recipes-extended/pam/libpam_1.5.1.bb +1 -0
index 4363e16b9b..f0c8caaac2 100644
@@ -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
 }
 
Signature · 1 line
2.31.1