diff options
author | William Lyu <William.Lyu@windriver.com> | 2024-02-22 05:41:40 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2024-02-22 12:59:38 -0800 |
commit | db1a20fcddbde2bf379dd2bb79ed928fd5428840 (patch) | |
tree | b84c0d348496cc24b097fcf2cfc5ed20f2c44765 /meta-filesystems | |
parent | 3f5223da8ba5f79890f8dd4c162f260401fdc052 (diff) | |
download | meta-openembedded-db1a20fcddbde2bf379dd2bb79ed928fd5428840.tar.gz |
e2tools: Add ptest
Signed-off-by: William Lyu <William.Lyu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-filesystems')
-rw-r--r-- | meta-filesystems/recipes-utils/e2tools/e2tools_git.bb | 51 | ||||
-rw-r--r-- | meta-filesystems/recipes-utils/e2tools/files/run-ptest | 5 |
2 files changed, 54 insertions, 2 deletions
diff --git a/meta-filesystems/recipes-utils/e2tools/e2tools_git.bb b/meta-filesystems/recipes-utils/e2tools/e2tools_git.bb index caf0025c8..a80b6f598 100644 --- a/meta-filesystems/recipes-utils/e2tools/e2tools_git.bb +++ b/meta-filesystems/recipes-utils/e2tools/e2tools_git.bb | |||
@@ -9,17 +9,64 @@ SECTION = "base" | |||
9 | LICENSE = "GPL-2.0-only" | 9 | LICENSE = "GPL-2.0-only" |
10 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | 10 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
11 | 11 | ||
12 | DEPENDS += "e2fsprogs" | 12 | DEPENDS += "coreutils e2fsprogs" |
13 | 13 | ||
14 | PV = "0.1.0+git" | 14 | PV = "0.1.0+git" |
15 | 15 | ||
16 | SRC_URI = " \ | 16 | SRC_URI = " \ |
17 | git://github.com/e2tools/e2tools;protocol=https;branch=master \ | 17 | git://github.com/e2tools/e2tools;protocol=https;branch=master \ |
18 | file://run-ptest \ | ||
18 | " | 19 | " |
20 | |||
19 | SRCREV = "fd092754a6b65c3a769f74f888668c066f09c36d" | 21 | SRCREV = "fd092754a6b65c3a769f74f888668c066f09c36d" |
20 | 22 | ||
21 | S = "${WORKDIR}/git" | 23 | S = "${WORKDIR}/git" |
22 | 24 | ||
23 | inherit autotools pkgconfig | 25 | inherit autotools pkgconfig ptest |
26 | |||
27 | do_configure:prepend() { | ||
28 | git -C "${WORKDIR}/git" reset --hard HEAD | ||
29 | |||
30 | # To install ptest for this package, special configuration needs to be | ||
31 | # done before do_configure(). So, do_configure_ptest() which is scheduled | ||
32 | # after do_configure() cannot be used. | ||
33 | |||
34 | # We only do special configuration if we are installing ptest for this | ||
35 | # package. | ||
36 | if [ "${@d.getVar('PTEST_ENABLED')}" -eq "1" ]; then | ||
37 | # Since we guarantee run-time dependency when installing the ptest for | ||
38 | # this package, we do not need the check macros under section "checks | ||
39 | # for programs" in "configure.ac". Plus, these check macros set the | ||
40 | # ouput variables to incorrect values as these checks are performed on | ||
41 | # the host environment. Still, we need these variables outputted from | ||
42 | # these check macros. So, we insert the following lines to manually | ||
43 | # set these output variables to the correct value in "configure.ac". | ||
44 | |||
45 | # Note that HAVE_DD_COMMAND and HAVE_MKE2FS_COMMAND are only ever used | ||
46 | # in tests/Makefile-files which determines whether to include the test | ||
47 | # cases. As for output variables CHMOD, DD, and MKE2FS, they only | ||
48 | # point to the programs which test cases need to run. Since these | ||
49 | # commands are guaranteed to be present due to RDEPENDS and are | ||
50 | # guaranteed to be accessible under PATH environment variable on the | ||
51 | # target, we only need to specify the name of these programs. | ||
52 | |||
53 | perl -i -0777 -pe 's/(^dnl\s*=+\s*^dnl\s*Checks for compiler flags\s*^dnl\s*=+)/ | ||
54 | AC_SUBST([CHMOD], 'chmod') | ||
55 | AC_SUBST([DD], 'dd') | ||
56 | AC_SUBST([MKE2FS], 'mke2fs') | ||
57 | AM_CONDITIONAL([HAVE_DD_COMMAND], [true]) | ||
58 | AM_CONDITIONAL([HAVE_MKE2FS_COMMAND], [true]) | ||
59 | \1/ms' "${WORKDIR}/git/configure.ac" | ||
60 | fi | ||
61 | } | ||
62 | |||
63 | do_install_ptest() { | ||
64 | rm -rf "${D}${PTEST_PATH}/*" | ||
65 | cp -r ../build "${D}${PTEST_PATH}" | ||
66 | cp -r "${S}/build-aux" "${D}${PTEST_PATH}/build" | ||
67 | cp -r "${S}" "${D}${PTEST_PATH}" | ||
68 | } | ||
69 | |||
70 | RDEPENDS:${PN}-ptest += "bash coreutils e2fsprogs e2tools gawk make perl" | ||
24 | 71 | ||
25 | BBCLASSEXTEND = "native" | 72 | BBCLASSEXTEND = "native" |
diff --git a/meta-filesystems/recipes-utils/e2tools/files/run-ptest b/meta-filesystems/recipes-utils/e2tools/files/run-ptest new file mode 100644 index 000000000..3d4dd9cf3 --- /dev/null +++ b/meta-filesystems/recipes-utils/e2tools/files/run-ptest | |||
@@ -0,0 +1,5 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | set -e | ||
4 | |||
5 | make -C build check | ||