summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/bc/bc
diff options
context:
space:
mode:
authorYan Xinkuan <yanxk.fnst@fujitsu.com>2022-11-01 07:55:11 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-11-02 09:21:29 +0000
commitb0c0783e31134f70122404c9c74d770836840745 (patch)
tree158a45ec0e90c6914a68de26b6563f693d8f65fa /meta/recipes-extended/bc/bc
parente33afcd0dca526c1991f5ed0062764481fe70e52 (diff)
downloadpoky-b0c0783e31134f70122404c9c74d770836840745.tar.gz
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. (From OE-Core rev: 98b058a039ae8a49437c306f684f919c93df55fd) Signed-off-by: Yan Xinkuan <yanxk.fnst@fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/bc/bc')
-rw-r--r--meta/recipes-extended/bc/bc/run-ptest9
1 files changed, 9 insertions, 0 deletions
diff --git a/meta/recipes-extended/bc/bc/run-ptest b/meta/recipes-extended/bc/bc/run-ptest
new file mode 100644
index 0000000000..66a1b9d708
--- /dev/null
+++ b/meta/recipes-extended/bc/bc/run-ptest
@@ -0,0 +1,9 @@
1#! /bin/sh
2
3for TEST in *.b; do
4 if bc -l $TEST </dev/null; then
5 echo “PASS: bc/$TEST”
6 else
7 echo “FAIL: bc/$TEST”
8 fi
9done