diff options
author | Ricardo Simoes <ricardo.simoes@pt.bosch.com> | 2025-07-15 08:54:59 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-07-17 10:41:18 +0100 |
commit | 9a0cd394a030ceff1e6cc17a05e2400745308914 (patch) | |
tree | dc44179f687ecd0d7fd06f53604bc260e7aa7d0f | |
parent | 2844ea2514e7e62a048a9727905da4af54b195a7 (diff) | |
download | poky-9a0cd394a030ceff1e6cc17a05e2400745308914.tar.gz |
dosfstools: Add ptests
(From OE-Core rev: 875b8961221875e6a809d15b7d3b83ea00da0c0e)
Signed-off-by: Ricardo Simoes <ricardo.simoes@pt.bosch.com>
Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/conf/distro/include/ptest-packagelists.inc | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/dosfstools/dosfstools_4.2.bb | 30 | ||||
-rw-r--r-- | meta/recipes-devtools/dosfstools/files/run-ptest | 5 |
3 files changed, 35 insertions, 1 deletions
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc index 4253c7b062..46c8945eb4 100644 --- a/meta/conf/distro/include/ptest-packagelists.inc +++ b/meta/conf/distro/include/ptest-packagelists.inc | |||
@@ -99,6 +99,7 @@ PTESTS_SLOW = "\ | |||
99 | coreutils \ | 99 | coreutils \ |
100 | curl \ | 100 | curl \ |
101 | dbus \ | 101 | dbus \ |
102 | dosfstools \ | ||
102 | e2fsprogs \ | 103 | e2fsprogs \ |
103 | elfutils \ | 104 | elfutils \ |
104 | gettext \ | 105 | gettext \ |
diff --git a/meta/recipes-devtools/dosfstools/dosfstools_4.2.bb b/meta/recipes-devtools/dosfstools/dosfstools_4.2.bb index 86fb68f664..3b4c6b4a4b 100644 --- a/meta/recipes-devtools/dosfstools/dosfstools_4.2.bb +++ b/meta/recipes-devtools/dosfstools/dosfstools_4.2.bb | |||
@@ -10,18 +10,46 @@ LICENSE = "GPL-3.0-only" | |||
10 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" | 10 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" |
11 | 11 | ||
12 | SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${BP}.tar.gz \ | 12 | SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${BP}.tar.gz \ |
13 | file://run-ptest \ | ||
13 | file://source-date-epoch.patch \ | 14 | file://source-date-epoch.patch \ |
14 | file://0001-fsck.fat-Adhere-to-the-fsck-exit-codes.patch \ | 15 | file://0001-fsck.fat-Adhere-to-the-fsck-exit-codes.patch \ |
15 | file://0002-manpages-Document-fsck.fat-new-exit-codes.patch \ | 16 | file://0002-manpages-Document-fsck.fat-new-exit-codes.patch \ |
16 | " | 17 | " |
17 | SRC_URI[sha256sum] = "64926eebf90092dca21b14259a5301b7b98e7b1943e8a201c7d726084809b527" | 18 | SRC_URI[sha256sum] = "64926eebf90092dca21b14259a5301b7b98e7b1943e8a201c7d726084809b527" |
18 | 19 | ||
19 | inherit autotools gettext pkgconfig update-alternatives github-releases | 20 | inherit autotools gettext pkgconfig ptest update-alternatives github-releases |
20 | 21 | ||
21 | EXTRA_OECONF = "--enable-compat-symlinks --without-iconv" | 22 | EXTRA_OECONF = "--enable-compat-symlinks --without-iconv" |
22 | 23 | ||
23 | CFLAGS += "-D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" | 24 | CFLAGS += "-D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" |
24 | 25 | ||
26 | do_install_ptest () { | ||
27 | install -d ${D}${PTEST_PATH}/tests | ||
28 | install -m 0744 ${S}/tests/* ${D}${PTEST_PATH}/tests/ | ||
29 | install -m 0744 ${S}/test-driver ${D}${PTEST_PATH}/tests/ | ||
30 | |||
31 | install -d ${D}${PTEST_PATH}/src | ||
32 | ln -sf ${sbindir}/mkfs.fat ${D}${PTEST_PATH}/src/mkfs.fat | ||
33 | ln -sf ${sbindir}/fsck.fat ${D}${PTEST_PATH}/src/fsck.fat | ||
34 | ln -sf ${sbindir}/fatlabel ${D}${PTEST_PATH}/src/fatlabel | ||
35 | |||
36 | # dosfstools tests depends on variables defined in the tests/Makefile. | ||
37 | # To run the tests, we need to modify the following: | ||
38 | # - srcdir: used to find the test scripts for each dosfstools tools | ||
39 | # - top_srcdir: used to find the test-driver script | ||
40 | # - Makefile: originally used to recreate build rules when needed. They're not needed here | ||
41 | # because we only want to run the tests. | ||
42 | # - XXD_FOUND: Always satisfied by RDEPENDS of ptest package | ||
43 | sed \ | ||
44 | -e 's/^srcdir = ..*/srcdir = \./' \ | ||
45 | -e 's/^top_srcdir = ..*/top_srcdir = \./' \ | ||
46 | -e 's/^Makefile: ..*/Makefile: /' \ | ||
47 | -e 's/XXD_FOUND=/XXD_FOUND=yes/' \ | ||
48 | ${B}/tests/Makefile > ${D}${PTEST_PATH}/tests/Makefile | ||
49 | } | ||
50 | |||
51 | RDEPENDS:${PN}-ptest += "bash diffutils gawk make xxd" | ||
52 | |||
25 | BBCLASSEXTEND = "native nativesdk" | 53 | BBCLASSEXTEND = "native nativesdk" |
26 | 54 | ||
27 | ALTERNATIVE_PRIORITY = "100" | 55 | ALTERNATIVE_PRIORITY = "100" |
diff --git a/meta/recipes-devtools/dosfstools/files/run-ptest b/meta/recipes-devtools/dosfstools/files/run-ptest new file mode 100644 index 0000000000..4f6e349a23 --- /dev/null +++ b/meta/recipes-devtools/dosfstools/files/run-ptest | |||
@@ -0,0 +1,5 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | cd tests | ||
4 | |||
5 | make check | ||