diff options
| author | Chen Qi <Qi.Chen@windriver.com> | 2025-06-24 16:57:46 +0800 |
|---|---|---|
| committer | Armin Kuster <akuster808@gmail.com> | 2025-07-02 20:36:36 -0400 |
| commit | eafaacee695bd77be48eaa05f7b8993993e03453 (patch) | |
| tree | adbe54a6934c1ec14cb4a44f93368ae221985711 /meta-oe | |
| parent | 244e14a26ac43a691ce60f18bccf614216799d7c (diff) | |
| download | meta-openembedded-eafaacee695bd77be48eaa05f7b8993993e03453.tar.gz | |
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>
Diffstat (limited to 'meta-oe')
| -rw-r--r-- | meta-oe/recipes-devtools/protobuf/protobuf/run-ptest | 2 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/protobuf/protobuf_3.19.6.bb | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/run-ptest b/meta-oe/recipes-devtools/protobuf/protobuf/run-ptest index b3b2278c47..1112fbdf89 100644 --- a/meta-oe/recipes-devtools/protobuf/protobuf/run-ptest +++ b/meta-oe/recipes-devtools/protobuf/protobuf/run-ptest | |||
| @@ -8,7 +8,7 @@ for write_exe_full_path in ${DIR}/add_person_*; do | |||
| 8 | if [ -x "${write_exe_full_path}" ]; then | 8 | if [ -x "${write_exe_full_path}" ]; then |
| 9 | write_exe=`basename ${write_exe_full_path}` | 9 | write_exe=`basename ${write_exe_full_path}` |
| 10 | echo "Generating new test file using ${write_exe}..." | 10 | echo "Generating new test file using ${write_exe}..." |
| 11 | printf "1234\nname\nname@example.com\n" | ${write_exe_full_path} "${TEST_FILE}" | 11 | printf "1234\nname\nname@example.com\n\n" | ${write_exe_full_path} "${TEST_FILE}" |
| 12 | RETVAL=$? | 12 | RETVAL=$? |
| 13 | [ $RETVAL -eq 0 ] || exit $RETVAL | 13 | [ $RETVAL -eq 0 ] || exit $RETVAL |
| 14 | 14 | ||
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf_3.19.6.bb b/meta-oe/recipes-devtools/protobuf/protobuf_3.19.6.bb index 2b19d07ff8..9bcd208acb 100644 --- a/meta-oe/recipes-devtools/protobuf/protobuf_3.19.6.bb +++ b/meta-oe/recipes-devtools/protobuf/protobuf_3.19.6.bb | |||
| @@ -74,6 +74,7 @@ do_install_ptest() { | |||
| 74 | fi | 74 | fi |
| 75 | done | 75 | done |
| 76 | cp "${S}/${TEST_SRC_DIR}/addressbook_pb2.py" "${D}/${PTEST_PATH}" | 76 | cp "${S}/${TEST_SRC_DIR}/addressbook_pb2.py" "${D}/${PTEST_PATH}" |
| 77 | sed -i -e 's#env python#env python3#' ${D}/${PTEST_PATH}/add_person.py ${D}/${PTEST_PATH}/list_people.py | ||
| 77 | cd "$olddir" | 78 | cd "$olddir" |
| 78 | } | 79 | } |
| 79 | 80 | ||
| @@ -84,7 +85,7 @@ FILES:${PN}-lite = "${libdir}/libprotobuf-lite${SOLIBS}" | |||
| 84 | 85 | ||
| 85 | RDEPENDS:${PN}-compiler = "${PN}" | 86 | RDEPENDS:${PN}-compiler = "${PN}" |
| 86 | RDEPENDS:${PN}-dev += "${PN}-compiler" | 87 | RDEPENDS:${PN}-dev += "${PN}-compiler" |
| 87 | RDEPENDS:${PN}-ptest = "bash ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python-protobuf', '', d)}" | 88 | RDEPENDS:${PN}-ptest = "bash ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-protobuf', '', d)}" |
| 88 | 89 | ||
| 89 | MIPS_INSTRUCTION_SET = "mips" | 90 | MIPS_INSTRUCTION_SET = "mips" |
| 90 | 91 | ||
