]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
e2fsprogs: Fix error SRCDIR when using usrmerge DISTRO_FEATURES
authorQiu Tingting <qiutt@fujitsu.com>
Mon, 15 May 2023 02:45:41 +0000 (10:45 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 22 May 2023 09:53:44 +0000 (10:53 +0100)
    When build e2fsprogs ptest with usrmerge DISTRO_FEATURES,
    in test_script and test_one scripts, value of SRCDIR has problem.
      SRCDIR=/usr/usr/lib/e2fsprogs/ptest/test

    ptest log
      # ptest-runner e2fsprogs
      START: ptest-runner
      2022-12-17T11:08
      BEGIN: /usr/lib/e2fsprogs/ptest
      ls: cannot access '/usr/usr/lib/e2fsprogs/ptest/test/[a-zA-Z]_*': No such file or directory
      ./test_script: line 54: /usr/usr/lib/e2fsprogs/ptest/test/test_post: No such file or directory
      DURATION: 0
      END: /usr/lib/e2fsprogs/ptest
      2022-12-17T11:08
      STOP: ptest-runner
      TOTAL: 1 FAIL: 0

    Reason
      In Makefile.in, SRCDIR is set by prefix and libdir.
        @echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_one
        @echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_script
      prefix=/usr
      libdir=/usr/lib (when usrmerge is set)

    solution
      Use PTEST_PATH to fix it.

Signed-off-by: Qiu Tingting <qiutt@fujitsu.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch
meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb

index c3e46ce65fde528ba47c7d96dd3072248498f4f5..20839b72863c34460917c45967c4fe285690c01c 100644 (file)
@@ -22,7 +22,7 @@ index 8c4d2048..e021af32 100644
        @echo "HTREE=y" >> test_one
        @echo "QUOTA=y" >> test_one
 -      @echo "SRCDIR=@srcdir@" >> test_one
-+      @echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_one
++      @echo "SRCDIR=@PTEST_PATH@/test" >> test_one
        @echo "DIFF_OPTS=@UNI_DIFF_OPTS@" >> test_one
        @echo "SIZEOF_TIME_T=@SIZEOF_TIME_T@" >> test_one
        @echo "DD=@DD@" >>test_one
@@ -31,7 +31,7 @@ index 8c4d2048..e021af32 100644
        @[ -f test_script ] && chmod u+w test_script || true
        @echo "#!/bin/sh" > test_script
 -      @echo "SRCDIR=@srcdir@" >> test_script
-+      @echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_script
++      @echo "SRCDIR=@PTEST_PATH@/test" >> test_script
        @cat $(srcdir)/test_script.in >> test_script
        @chmod +x-w test_script
  
index d3786d6f4c7c8425b3e11f54bc74553b7801ff71..940b47c155dfc62d6a456649fbd6e33c026050c9 100644 (file)
@@ -133,6 +133,7 @@ do_install_ptest() {
        sed -e 's!../e2fsck/e2fsck!e2fsck!g' \
            -e 's!../misc/tune2fs!tune2fs!g' -i ${D}${PTEST_PATH}/test/*/expect*
        sed -e 's!../e2fsck/e2fsck!${base_sbindir}/e2fsck!g' -i ${D}${PTEST_PATH}/test/*/script
+       sed -i "s#@PTEST_PATH@#${PTEST_PATH}#g" ${D}${PTEST_PATH}/test/test_script ${D}${PTEST_PATH}/test/test_one
 
        # Remove various files
        find "${D}${PTEST_PATH}" -type f \