提交 0ca6d7c6 编写于 作者: B Bodo Möller

Use a temporary file, not a pipe, for BN test because there are some

broken bc's around.
上级 0f7e6fe1
...@@ -12,3 +12,4 @@ keyU.ss ...@@ -12,3 +12,4 @@ keyU.ss
reqU.ss reqU.ss
certU.ss certU.ss
Makefile.save Makefile.save
tmp.bntest
...@@ -180,7 +180,12 @@ test_pkcs7: ...@@ -180,7 +180,12 @@ test_pkcs7:
test_bn: test_bn:
@echo starting big number library test, could take a while... @echo starting big number library test, could take a while...
@(./$(BNTEST)|bc) | awk '{ \ # This *should* work:
# @(./$(BNTEST)|bc) | awk '{ \
# Some broken bc's treat the pipe as a terminal :-(
# By using a temporary file, errors detected by awk may be farther away from
# the test that caused them; but even with the pipe there'd be some distance.
@(./$(BNTEST) >tmp.bntest; echo quit >>tmp.bntest; bc tmp.bntest) | awk '{ \
if ($$0 != "0") {print "error"; exit(1); } \ if ($$0 != "0") {print "error"; exit(1); } \
if (((NR+1)%64) == 0) print NR+1," tests done"; }' if (((NR+1)%64) == 0) print NR+1," tests done"; }'
@echo 'test a^b%c implementations' @echo 'test a^b%c implementations'
...@@ -226,7 +231,7 @@ dclean: ...@@ -226,7 +231,7 @@ dclean:
mv -f Makefile.new $(MAKEFILE) mv -f Makefile.new $(MAKEFILE)
clean: clean:
rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff $(EXE) *.ss log rm -f tmp.bntest *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff $(EXE) *.ss log
$(DLIBSSL): $(DLIBSSL):
(cd ../ssl; $(MAKE)) (cd ../ssl; $(MAKE))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册