From: Yan Xinkuan Date: Mon, 31 Oct 2022 23:55:11 +0000 (+0800) Subject: bc: Add ptest. X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~2660 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98b058a039ae8a49437c306f684f919c93df55fd;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git bc: Add ptest. Add ptest for OSS 'bc' by using 'bc' in the system to do calculation jobs according to the .b files from the source file. Test example as below: ...... .00673400673400673400 “PASS: bc/div.b” 99836408603283573660347145562829683495827909199408566065153345558783\ 9427595471.89114392327665123852 “PASS: bc/exp.b” length(b)= 1406 “PASS: bc/fact.b” ...... If bc runs the .b files and does not crash, it would 'PASS', otherwise 'FAIL'. Tested in qemux86-64, with kvm enabled, test cost 12 secs, so it should be a fast test. Thanks to Ross Burton and Alexander Kanavin for the professional guidance. Signed-off-by: Yan Xinkuan Signed-off-by: Richard Purdie --- diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc index 56088e4e66f..32b0e5297a0 100644 --- a/meta/conf/distro/include/ptest-packagelists.inc +++ b/meta/conf/distro/include/ptest-packagelists.inc @@ -8,6 +8,7 @@ PTESTS_FAST = "\ apr-ptest \ apr-util-ptest \ attr-ptest \ + bc-ptest \ bluez5-ptest \ bzip2-ptest \ diffstat-ptest \ diff --git a/meta/recipes-extended/bc/bc/run-ptest b/meta/recipes-extended/bc/bc/run-ptest new file mode 100644 index 00000000000..66a1b9d7087 --- /dev/null +++ b/meta/recipes-extended/bc/bc/run-ptest @@ -0,0 +1,9 @@ +#! /bin/sh + +for TEST in *.b; do + if bc -l $TEST