Zeming LIU ff9b399795
hunspell: add ptest support
Test results:
root@qemux86-64:~# ptest-runner hunspell
START: ptest-runner
2026-05-27T07:06
BEGIN: /usr/lib/hunspell/ptest
PASS: 1463589
PASS: 1463589_utf
PASS: 1592880
PASS: 1695964
PASS: 1706659
PASS: 1748408-1
PASS: 1748408-2
PASS: 1748408-3
PASS: 1748408-4
PASS: 1975530
PASS: 2970240
PASS: 2970242
PASS: 2999225
PASS: IJ
PASS: affixes
PASS: alias
PASS: alias2
PASS: alias3
PASS: allcaps
PASS: allcaps2
PASS: allcaps3
PASS: allcaps_utf
PASS: arabic
PASS: base
PASS: base_utf
PASS: break
PASS: breakdefault
PASS: breakoff
PASS: checkcompoundcase
PASS: checkcompoundcase2
PASS: checkcompoundcaseutf
PASS: checkcompounddup
PASS: checkcompoundpattern
PASS: checkcompoundpattern2
PASS: checkcompoundpattern3
PASS: checkcompoundpattern4
PASS: checkcompoundrep
PASS: checkcompoundrep2
PASS: checkcompoundtriple
PASS: checksharps
PASS: checksharpsutf
PASS: circumfix
PASS: colons_in_words
PASS: complexprefixes
PASS: complexprefixes2
PASS: complexprefixesutf
PASS: compound_wnum_overflow
PASS: compoundaffix
PASS: compoundaffix2
PASS: compoundaffix3
PASS: compoundflag
PASS: compoundforbid
PASS: compoundrule
PASS: compoundrule2
PASS: compoundrule3
PASS: compoundrule4
PASS: compoundrule5
PASS: compoundrule6
PASS: compoundrule7
PASS: compoundrule8
PASS: condition
PASS: condition_utf
PASS: conditionalprefix
PASS: digits_in_words
PASS: dotless_i
PASS: encoding
PASS: flag
PASS: flaglong
PASS: flagnum
PASS: flagutf8
PASS: fogemorpheme
PASS: forbiddenword
PASS: forceucase
PASS: fullstrip
PASS: germancompounding
PASS: germancompoundingold
PASS: gh-hunzip-overflow
PASS: gh1002
PASS: gh1018
PASS: gh1032
PASS: gh1044
PASS: gh1058
PASS: gh1076
PASS: gh1086
PASS: gh1095
PASS: gh646
PASS: hu
PASS: i35725
PASS: i53643
PASS: i54633
PASS: i54980
PASS: i58202
PASS: i68568
PASS: i68568utf
PASS: iconv
PASS: iconv2
PASS: iconv_break_overflow
PASS: ignore
PASS: ignoresug
PASS: ignoreutf
PASS: keepcase
PASS: korean
PASS: limit-multiple-compounding
PASS: map
PASS: maputf
PASS: morph
PASS: needaffix
PASS: needaffix2
PASS: needaffix3
PASS: needaffix4
PASS: needaffix5
PASS: nepali
PASS: ngram_utf_fix
PASS: nosuggest
PASS: oconv
PASS: oconv2
PASS: ofz51432
PASS: ofz5627151457255424
PASS: onlyincompound
PASS: onlyincompound2
PASS: opentaal_cpdpat
PASS: opentaal_cpdpat2
PASS: opentaal_forbiddenword1
PASS: opentaal_forbiddenword2
PASS: opentaal_keepcase
PASS: ph
PASS: ph2
PASS: phone
PASS: rep
PASS: reputf
PASS: right_to_left_mark
PASS: simplifiedtriple
PASS: slash
PASS: sug
PASS: sug2
PASS: sugutf
PASS: timelimit
PASS: utf8
PASS: utf8_bom
PASS: utf8_bom2
PASS: utfcompound
PASS: warn
PASS: wordpair
PASS: zeroaffix
DURATION: 5
END: /usr/lib/hunspell/ptest
2026-05-27T07:06
STOP: ptest-runner

Signed-off-by: Zeming LIU <zeming.liu@windriver.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-05-31 03:08:56 -07:00

40 lines
1.6 KiB
BlitzBasic

SUMMARY = "A spell checker and morphological analyzer library"
HOMEPAGE = "http://hunspell.github.io/"
LICENSE = "GPL-2.0-only | LGPL-2.1-only"
LIC_FILES_CHKSUM = " \
file://COPYING;md5=75859989545e37968a99b631ef42722e \
file://COPYING.LESSER;md5=c96ca6c1de8adc025adfada81d06fba5 \
"
SRCREV = "c5f98152a274e25b5107101104bef632b83a0cc9"
SRC_URI = "git://github.com/${BPN}/${BPN}.git;branch=master;protocol=https;tag=v${PV} \
file://run-ptest \
"
inherit autotools pkgconfig gettext ptest
# ispellaff2myspell: A program to convert ispell affix tables to myspell format
PACKAGES =+ "${PN}-ispell"
FILES:${PN}-ispell = "${bindir}/ispellaff2myspell"
RDEPENDS:${PN}-ispell = "perl"
do_install_ptest() {
install -d ${D}${PTEST_PATH}/tests
install -m 0755 ${S}/tests/test.sh ${D}${PTEST_PATH}/tests/
# Install test data files
for ext in dic aff good wrong sug morph root; do
find ${S}/tests -maxdepth 1 -name "*.$ext" -exec cp {} ${D}${PTEST_PATH}/tests/ \;
done
# Patch test.sh to use installed binaries
sed -i 's|HUNSPELL="$(dirname $0)"/../src/tools/hunspell|HUNSPELL="${bindir}/hunspell"|' ${D}${PTEST_PATH}/tests/test.sh
sed -i 's|ANALYZE="$(dirname $0)"/../src/tools/analyze|ANALYZE="${bindir}/analyze"|' ${D}${PTEST_PATH}/tests/test.sh
sed -i 's|alias hunspell=.*HUNSPELL.*|alias hunspell="$HUNSPELL"|' ${D}${PTEST_PATH}/tests/test.sh
sed -i 's|alias analyze=.*ANALYZE.*|alias analyze="$ANALYZE"|' ${D}${PTEST_PATH}/tests/test.sh
}
RDEPENDS:${PN}-ptest += "bash glibc-gconv-iso8859-2"
BBCLASSEXTEND = "native"