mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-05 14:59:55 +00:00
meta-oe: recipes-extended: bitwise: Add ptest
Signed-off-by: Ever ATILANO <ever.atilano@smile.fr> Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Reviewed-by: Frank WOLFF <frank.wolff@smile.fr> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
@@ -12,6 +12,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464"
|
||||
|
||||
SRC_URI = "https://github.com/mellowcandle/bitwise/releases/download/v${PV}/bitwise-v${PV}.tar.gz \
|
||||
file://0001-makefile.am-Fix-build-when-build-dir-is-not-same-as-.patch \
|
||||
file://run-ptest \
|
||||
file://ptest.out.expected \
|
||||
"
|
||||
SRC_URI[sha256sum] = "f524f794188a10defc4df673d8cf0b3739f93e58e93aff0cdb8a99fbdcca2ffb"
|
||||
|
||||
@@ -21,4 +23,10 @@ S = "${WORKDIR}/${BPN}-v${PV}"
|
||||
|
||||
DEPENDS = "ncurses readline"
|
||||
|
||||
inherit autotools
|
||||
inherit autotools ptest
|
||||
|
||||
do_install_ptest() {
|
||||
install -d ${D}${PTEST_PATH}
|
||||
install -m 0644 ${WORKDIR}/ptest.out.expected ${D}${PTEST_PATH}/ptest.out.expected
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
Unsigned decimal: 66
|
||||
Signed decimal: 66
|
||||
Hexadecimal: 0x42
|
||||
Octal: 0102
|
||||
Human: 66
|
||||
Radix64: 0/
|
||||
IPv4 (Network byte order - Big): 66.0.0.0
|
||||
IPv4 (Reverwsed byte order - Little): 0.0.0.66
|
||||
ASCII: .......B
|
||||
Binary:
|
||||
0 1 0 0 0 0 1 0
|
||||
7 - 0
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Test 1: Basic bitwise operation
|
||||
bitwise --no-color -w b 0x42 > test.out
|
||||
|
||||
# Compare expected output with actual output
|
||||
|
||||
if ! cmp test.out ptest.out.expected; then
|
||||
echo "[FAIL] Test 1: Basic bitwise operation"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user