diff options
author | Denys Zagorui <denys.zagorui@globallogic.com> | 2017-06-08 17:04:23 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-06-12 15:08:30 +0100 |
commit | 578d88d3ed7986bb5b0a16eaaf322d4c0c61621a (patch) | |
tree | 05583811ef1c27918c3747f7702b2bd9de16674e /meta/recipes-extended/gzip/files | |
parent | dfefd671f35599deba668a2c29bbc6c02469b4da (diff) | |
download | poky-578d88d3ed7986bb5b0a16eaaf322d4c0c61621a.tar.gz |
gzip: add ptest
(From OE-Core rev: 9f389cfc6023be50816491bbdd3e4266195573d3)
Signed-off-by: Denys Zagorui <denys.zagorui@globallogic.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/gzip/files')
-rw-r--r-- | meta/recipes-extended/gzip/files/0001-gzip-port-zdiff-zless-to-Busybox.patch | 59 | ||||
-rw-r--r-- | meta/recipes-extended/gzip/files/run-ptest | 6 |
2 files changed, 65 insertions, 0 deletions
diff --git a/meta/recipes-extended/gzip/files/0001-gzip-port-zdiff-zless-to-Busybox.patch b/meta/recipes-extended/gzip/files/0001-gzip-port-zdiff-zless-to-Busybox.patch new file mode 100644 index 0000000000..20d5a19f76 --- /dev/null +++ b/meta/recipes-extended/gzip/files/0001-gzip-port-zdiff-zless-to-Busybox.patch | |||
@@ -0,0 +1,59 @@ | |||
1 | From 5f712621829ed81a758077431226a86df37fbc3b Mon Sep 17 00:00:00 2001 | ||
2 | From: Denys Zagorui <denys.zagorui@globallogic.com> | ||
3 | Date: Thu, 8 Jun 2017 16:05:50 +0300 | ||
4 | Subject: [PATCH] gzip: port zdiff, zless to Busybox | ||
5 | |||
6 | Problem reported by Denys Zagorui (Bug#26088). | ||
7 | * tests/zdiff: Check that diff uses POSIX-format output. | ||
8 | * zless.in (less_version): Don't exit merely because 'less -V' | ||
9 | fails; instead, assume 'less' is compatible with an old version of | ||
10 | the original 'less'. Busybox 'less -V' fails, but apparently its | ||
11 | 'less' works anyway somehow. | ||
12 | |||
13 | Signed-off-by: Denys Zagorui <denys.zagorui@globallogic.com> | ||
14 | |||
15 | Upstream-Status: Accepted | ||
16 | --- | ||
17 | tests/zdiff | 4 +++- | ||
18 | zless.in | 2 +- | ||
19 | 2 files changed, 4 insertions(+), 2 deletions(-) | ||
20 | |||
21 | diff --git a/tests/zdiff b/tests/zdiff | ||
22 | index 0bb7c7d..9cd4fd4 100755 | ||
23 | --- a/tests/zdiff | ||
24 | +++ b/tests/zdiff | ||
25 | @@ -22,7 +22,6 @@ | ||
26 | |||
27 | echo a > a || framework_failure_ | ||
28 | echo b > b || framework_failure_ | ||
29 | -gzip a b || framework_failure_ | ||
30 | |||
31 | cat <<EOF > exp | ||
32 | 1c1 | ||
33 | @@ -31,7 +30,10 @@ cat <<EOF > exp | ||
34 | > b | ||
35 | EOF | ||
36 | |||
37 | +diff a b | diff exp - || skip_ "diff output format is incompatible with POSIX" | ||
38 | + | ||
39 | fail=0 | ||
40 | +gzip a b || fail=1 | ||
41 | zdiff a.gz b.gz > out 2>&1 | ||
42 | test $? = 1 || fail=1 | ||
43 | |||
44 | diff --git a/zless.in b/zless.in | ||
45 | index e634af6..9759ae6 100644 | ||
46 | --- a/zless.in | ||
47 | +++ b/zless.in | ||
48 | @@ -47,7 +47,7 @@ if test "${LESSMETACHARS+set}" != set; then | ||
49 | export LESSMETACHARS | ||
50 | fi | ||
51 | |||
52 | -less_version=`less -V` || exit | ||
53 | +less_version=`less -V 2>/dev/null` | ||
54 | case $less_version in | ||
55 | less' '45[1-9]* | \ | ||
56 | less' '4[6-9][0-9]* | \ | ||
57 | -- | ||
58 | 1.9.1 | ||
59 | |||
diff --git a/meta/recipes-extended/gzip/files/run-ptest b/meta/recipes-extended/gzip/files/run-ptest new file mode 100644 index 0000000000..cf7c64949a --- /dev/null +++ b/meta/recipes-extended/gzip/files/run-ptest | |||
@@ -0,0 +1,6 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | cd src/tests | ||
4 | |||
5 | make check | ||
6 | |||