summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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"