Skip to contentSkip to conversation

gettext: Drop obsolete ptest conditional in do_install

PATCH New Richard Purdie 1 participant 2 messages Sep 3, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 gettext: Drop obsolete ptest conditional in do_install

The PTEST_ENABLED conditional is no longer needed since the task is deleted if ptest isn't enabled.

---
 meta/recipes-core/gettext/gettext_0.22.5.bb | 2 --
 1 file changed, 2 deletions(-)
meta/recipes-core/gettext/gettext_0.22.5.bb +0 -2
index ef5272a2065..0bf2a56e5fc 100644
@@ -145,7 +145,6 @@ do_compile_ptest() {
 }
 
 do_install_ptest() {
-    if [ ${PTEST_ENABLED} = "1" ]; then
         mkdir -p                                        ${D}${PTEST_PATH}/tests
         mkdir -p                                        ${D}${PTEST_PATH}/src
         mkdir -p                                        ${D}${PTEST_PATH}/po
@@ -178,7 +177,6 @@ do_install_ptest() {
         chmod 0755 ${D}${PTEST_PATH}/tests/lang-vala ${D}${PTEST_PATH}/tests/plural-1 ${D}${PTEST_PATH}/tests/xgettext-tcl-4 \
                    ${D}${PTEST_PATH}/tests/xgettext-vala-1  ${D}${PTEST_PATH}/tests/xgettext-po-2 ${D}${PTEST_PATH}/tests/xgettext-vala-6
         sed -i -e 's|${DEBUG_PREFIX_MAP}||g' ${D}${PTEST_PATH}/tests/init-env
-    fi
 }
 
 RDEPENDS:${PN}-ptest += "make xz bash gawk autoconf locale-base-de-de locale-base-fr-fr"
#1 lore raw

PATCH 2/2 elfutils: Drop obsolete ptest conditional in do_install

The PTEST_ENABLED conditional is no longer needed since the task is deleted if ptest isn't enabled.

---
 .../elfutils/elfutils_0.191.bb                | 70 +++++++++----------
 1 file changed, 34 insertions(+), 36 deletions(-)
meta/recipes-devtools/elfutils/elfutils_0.191.bb +34 -36
index 76bd2b3a99c..95364cef975 100644
@@ -66,42 +66,40 @@ do_compile_ptest() {
 PTEST_PARALLEL_MAKE = ""
 
 do_install_ptest() {
-	if [ ${PTEST_ENABLED} = "1" ]; then
-		# copy the files which needed by the cases
-		TEST_FILES="strip strip.o addr2line elfcmp objdump readelf size.o nm.o nm elflint elfcompress elfclassify stack unstrip srcfiles"
-		install -d -m 755                       ${D}${PTEST_PATH}/src
-		install -d -m 755                       ${D}${PTEST_PATH}/lib
-		install -d -m 755                       ${D}${PTEST_PATH}/libelf
-		install -d -m 755                       ${D}${PTEST_PATH}/libdw
-		install -d -m 755                       ${D}${PTEST_PATH}/libdwfl
-		install -d -m 755                       ${D}${PTEST_PATH}/libdwelf
-		install -d -m 755                       ${D}${PTEST_PATH}/libasm
-		install -d -m 755                       ${D}${PTEST_PATH}/libcpu
-		install -d -m 755                       ${D}${PTEST_PATH}/libebl
-		for test_file in ${TEST_FILES}; do
-			if [ -f ${B}/src/${test_file} ]; then
-				cp -r ${B}/src/${test_file} ${D}${PTEST_PATH}/src
-			fi
-		done
-		cp ${D}${libdir}/libelf-${PV}.so ${D}${PTEST_PATH}/libelf/libelf.so
-		cp ${D}${libdir}/libdw-${PV}.so ${D}${PTEST_PATH}/libdw/libdw.so
-		cp ${D}${libdir}/libasm-${PV}.so ${D}${PTEST_PATH}/libasm/libasm.so
-		cp ${B}/libcpu/libcpu.a ${D}${PTEST_PATH}/libcpu/
-		cp ${B}/libebl/libebl.a ${D}${PTEST_PATH}/libebl/
-		cp ${B}/lib/libeu.a ${D}${PTEST_PATH}/lib/
-		cp ${S}/libelf/*.h             ${D}${PTEST_PATH}/libelf/
-		cp ${S}/libdw/*.h              ${D}${PTEST_PATH}/libdw/
-		cp ${S}/libdwfl/*.h            ${D}${PTEST_PATH}/libdwfl/
-		cp ${S}/libdwelf/*.h           ${D}${PTEST_PATH}/libdwelf/
-		cp ${S}/libasm/*.h             ${D}${PTEST_PATH}/libasm/
-		cp -r ${S}/tests/                       ${D}${PTEST_PATH}
-		cp -r ${B}/tests/*                      ${D}${PTEST_PATH}/tests
-		cp -r ${B}/config.h                     ${D}${PTEST_PATH}
-		cp -r ${B}/backends                     ${D}${PTEST_PATH}
-		cp -r ${B}/debuginfod                   ${D}${PTEST_PATH}
-		sed -i '/^Makefile:/c Makefile:'        ${D}${PTEST_PATH}/tests/Makefile
-		find ${D}${PTEST_PATH} -type f -name *.[hoc] | xargs -i rm {}
-	fi
+	# copy the files which needed by the cases
+	TEST_FILES="strip strip.o addr2line elfcmp objdump readelf size.o nm.o nm elflint elfcompress elfclassify stack unstrip srcfiles"
+	install -d -m 755                       ${D}${PTEST_PATH}/src
+	install -d -m 755                       ${D}${PTEST_PATH}/lib
+	install -d -m 755                       ${D}${PTEST_PATH}/libelf
+	install -d -m 755                       ${D}${PTEST_PATH}/libdw
+	install -d -m 755                       ${D}${PTEST_PATH}/libdwfl
+	install -d -m 755                       ${D}${PTEST_PATH}/libdwelf
+	install -d -m 755                       ${D}${PTEST_PATH}/libasm
+	install -d -m 755                       ${D}${PTEST_PATH}/libcpu
+	install -d -m 755                       ${D}${PTEST_PATH}/libebl
+	for test_file in ${TEST_FILES}; do
+		if [ -f ${B}/src/${test_file} ]; then
+			cp -r ${B}/src/${test_file} ${D}${PTEST_PATH}/src
+		fi
+	done
+	cp ${D}${libdir}/libelf-${PV}.so ${D}${PTEST_PATH}/libelf/libelf.so
+	cp ${D}${libdir}/libdw-${PV}.so ${D}${PTEST_PATH}/libdw/libdw.so
+	cp ${D}${libdir}/libasm-${PV}.so ${D}${PTEST_PATH}/libasm/libasm.so
+	cp ${B}/libcpu/libcpu.a ${D}${PTEST_PATH}/libcpu/
+	cp ${B}/libebl/libebl.a ${D}${PTEST_PATH}/libebl/
+	cp ${B}/lib/libeu.a ${D}${PTEST_PATH}/lib/
+	cp ${S}/libelf/*.h             ${D}${PTEST_PATH}/libelf/
+	cp ${S}/libdw/*.h              ${D}${PTEST_PATH}/libdw/
+	cp ${S}/libdwfl/*.h            ${D}${PTEST_PATH}/libdwfl/
+	cp ${S}/libdwelf/*.h           ${D}${PTEST_PATH}/libdwelf/
+	cp ${S}/libasm/*.h             ${D}${PTEST_PATH}/libasm/
+	cp -r ${S}/tests/                       ${D}${PTEST_PATH}
+	cp -r ${B}/tests/*                      ${D}${PTEST_PATH}/tests
+	cp -r ${B}/config.h                     ${D}${PTEST_PATH}
+	cp -r ${B}/backends                     ${D}${PTEST_PATH}
+	cp -r ${B}/debuginfod                   ${D}${PTEST_PATH}
+	sed -i '/^Makefile:/c Makefile:'        ${D}${PTEST_PATH}/tests/Makefile
+	find ${D}${PTEST_PATH} -type f -name *.[hoc] | xargs -i rm {}
 }
 
 EXTRA_OEMAKE:class-native = ""