summaryrefslogtreecommitdiffstats
path: root/recipes-devtools
diff options
context:
space:
mode:
authorMingli Yu <mingli.yu@windriver.com>2023-01-31 15:29:25 +0800
committerBruce Ashfield <bruce.ashfield@gmail.com>2023-02-10 12:58:29 -0500
commit147e78a2aff5cb6a29e7f45dd5c4351200cdb117 (patch)
treebba92f6120f46b5d1bc16f1589a14848369eaf1a /recipes-devtools
parente8a1ce41d762a7ce1a234410a93b16866c53a8a6 (diff)
downloadmeta-virtualization-147e78a2aff5cb6a29e7f45dd5c4351200cdb117.tar.gz
yq: add ptest support
# ./run-ptest PASS: acceptance.sh PASS: bad_args.sh PASS: basic.sh PASS: bump-version.sh PASS: check.sh PASS: completion.sh PASS: copy-docs.sh PASS: coverage.sh PASS: devtools.sh PASS: empty.sh PASS: extract-checksum.sh PASS: format.sh PASS: front-matter.sh PASS: generate-man-page-md.sh PASS: generate-man-page.sh PASS: header-processing-off.sh PASS: inputs-format.sh PASS: install-man-page.sh PASS: leading-seperator.sh PASS: load-file.sh PASS: output-format.sh PASS: pipe.sh PASS: pretty-print.sh PASS: release-deb.sh PASS: secure.sh PASS: setup.sh PASS: split-printer.sh PASS: test-docker.sh PASS: test.sh PASS: xcompile.sh Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-devtools')
-rwxr-xr-xrecipes-devtools/yq/files/run-ptest10
-rw-r--r--recipes-devtools/yq/yq_git.bb14
2 files changed, 23 insertions, 1 deletions
diff --git a/recipes-devtools/yq/files/run-ptest b/recipes-devtools/yq/files/run-ptest
new file mode 100755
index 00000000..3a6876b3
--- /dev/null
+++ b/recipes-devtools/yq/files/run-ptest
@@ -0,0 +1,10 @@
1#!/bin/sh
2
3cd tests
4for i in `ls *.sh`; do
5 if [ ./$i ] ; then
6 echo "PASS: $i"
7 else
8 echo "FAIL: $i"
9 fi
10done
diff --git a/recipes-devtools/yq/yq_git.bb b/recipes-devtools/yq/yq_git.bb
index 867bfccf..755a6982 100644
--- a/recipes-devtools/yq/yq_git.bb
+++ b/recipes-devtools/yq/yq_git.bb
@@ -42,12 +42,13 @@ SRC_URI = "git://${GO_IMPORT};name=yq;branch=master;protocol=https \
42 git://github.com/golang/net;name=net;destsuffix=build/vendor/src/golang.org/x/net;branch=master;protocol=https \ 42 git://github.com/golang/net;name=net;destsuffix=build/vendor/src/golang.org/x/net;branch=master;protocol=https \
43 git://github.com/golang/text;name=text;destsuffix=build/vendor/src/golang.org/x/text;branch=master;protocol=https \ 43 git://github.com/golang/text;name=text;destsuffix=build/vendor/src/golang.org/x/text;branch=master;protocol=https \
44 git://github.com/pkg/diff;name=diff;destsuffix=build/vendor/src/github.com/pkg/diff;branch=main;protocol=https \ 44 git://github.com/pkg/diff;name=diff;destsuffix=build/vendor/src/github.com/pkg/diff;branch=main;protocol=https \
45 file://run-ptest \
45 " 46 "
46 47
47PV = "4.30.8+git${SRCREV_yq}" 48PV = "4.30.8+git${SRCREV_yq}"
48GO_IMPORT = "github.com/mikefarah/yq" 49GO_IMPORT = "github.com/mikefarah/yq"
49 50
50inherit go 51inherit go ptest
51 52
52do_compile:prepend() { 53do_compile:prepend() {
53 # arrange for some of the golang built ins to be found 54 # arrange for some of the golang built ins to be found
@@ -69,4 +70,15 @@ do_install:append() {
69 rm -rf ${D}/${libdir}/go/src/${GO_IMPORT}/acceptance_tests 70 rm -rf ${D}/${libdir}/go/src/${GO_IMPORT}/acceptance_tests
70} 71}
71 72
73do_install_ptest() {
74 install -d ${D}${PTEST_PATH}/tests
75 cp -r ${S}/src/github.com/mikefarah/yq/scripts/* ${D}${PTEST_PATH}/tests
76 cp -r ${S}/src/github.com/mikefarah/yq/acceptance_tests/* ${D}${PTEST_PATH}/tests
77 cp -r ${S}/src/github.com/mikefarah/yq/examples ${D}${PTEST_PATH}/tests
78}
79
80RDEPENDS:${PN}-ptest += " \
81 bash \
82"
83
72BBCLASSEXTEND = "native" 84BBCLASSEXTEND = "native"