mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-05-07 05:10:20 +00:00
protobuf: fix ptest with python PACKAGECONFIG enabled
1. RDEPENDS on python3-protobuf instead of python-protobuf. The latter is not available anywhere. 2. Use use python3 interpreter. 3. Fix run-ptest to avoid test failure. An extra '\n' is needed to break out the loop. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
@@ -8,7 +8,7 @@ for write_exe_full_path in ${DIR}/add_person_*; do
|
||||
if [ -x "${write_exe_full_path}" ]; then
|
||||
write_exe=`basename ${write_exe_full_path}`
|
||||
echo "Generating new test file using ${write_exe}..."
|
||||
printf "1234\nname\nname@example.com\n" | ${write_exe_full_path} "${TEST_FILE}"
|
||||
printf "1234\nname\nname@example.com\n\n" | ${write_exe_full_path} "${TEST_FILE}"
|
||||
RETVAL=$?
|
||||
[ $RETVAL -eq 0 ] || exit $RETVAL
|
||||
|
||||
|
||||
@@ -74,6 +74,7 @@ do_install_ptest() {
|
||||
fi
|
||||
done
|
||||
cp "${S}/${TEST_SRC_DIR}/addressbook_pb2.py" "${D}/${PTEST_PATH}"
|
||||
sed -i -e 's#env python#env python3#' ${D}/${PTEST_PATH}/add_person.py ${D}/${PTEST_PATH}/list_people.py
|
||||
cd "$olddir"
|
||||
}
|
||||
|
||||
@@ -84,7 +85,7 @@ FILES:${PN}-lite = "${libdir}/libprotobuf-lite${SOLIBS}"
|
||||
|
||||
RDEPENDS:${PN}-compiler = "${PN}"
|
||||
RDEPENDS:${PN}-dev += "${PN}-compiler"
|
||||
RDEPENDS:${PN}-ptest = "bash ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python-protobuf', '', d)}"
|
||||
RDEPENDS:${PN}-ptest = "bash ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-protobuf', '', d)}"
|
||||
|
||||
MIPS_INSTRUCTION_SET = "mips"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user