mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
Make it possible to run individual tests even when linked with libcrypto.so and libssl.so
This commit is contained in:
parent
69ce48c307
commit
688cf84d1f
@ -123,11 +123,10 @@ tests: exe apps $(TESTS)
|
|||||||
apps:
|
apps:
|
||||||
@(cd ..; $(MAKE) DIRS=apps all)
|
@(cd ..; $(MAKE) DIRS=apps all)
|
||||||
|
|
||||||
alltests:
|
SET_SO_PATHS=LIBPATH="`cd ..; pwd`"; LD_LIBRARY_PATH=$$LIBPATH; DYLD_LIBRARY_PATH=$$LIBPATH; SHLIB_PATH=$$LIBPATH; \
|
||||||
(LIBPATH="`cd ..; pwd`"; LD_LIBRARY_PATH=$$LIBPATH; DYLD_LIBRARY_PATH=$$LIBPATH; SHLIB_PATH=$$LIBPATH; \
|
export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH
|
||||||
export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH; \
|
|
||||||
$(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' alltests.chooser)
|
alltests: \
|
||||||
alltests.chooser: \
|
|
||||||
test_des test_idea test_sha test_md4 test_md5 test_hmac \
|
test_des test_idea test_sha test_md4 test_md5 test_hmac \
|
||||||
test_md2 test_mdc2 \
|
test_md2 test_mdc2 \
|
||||||
test_rmd test_rc2 test_rc4 test_rc5 test_bf test_cast test_rd \
|
test_rmd test_rc2 test_rc4 test_rc5 test_bf test_cast test_rd \
|
||||||
@ -137,136 +136,136 @@ alltests.chooser: \
|
|||||||
test_ss test_ca test_engine test_evp test_ssl
|
test_ss test_ca test_engine test_evp test_ssl
|
||||||
|
|
||||||
test_evp:
|
test_evp:
|
||||||
./$(EVPTEST) evptests.txt
|
$(SET_SO_PATHS); ./$(EVPTEST) evptests.txt
|
||||||
|
|
||||||
test_des:
|
test_des:
|
||||||
./$(DESTEST)
|
$(SET_SO_PATHS); ./$(DESTEST)
|
||||||
|
|
||||||
test_idea:
|
test_idea:
|
||||||
./$(IDEATEST)
|
$(SET_SO_PATHS); ./$(IDEATEST)
|
||||||
|
|
||||||
test_sha:
|
test_sha:
|
||||||
./$(SHATEST)
|
$(SET_SO_PATHS); ./$(SHATEST)
|
||||||
./$(SHA1TEST)
|
$(SET_SO_PATHS); ./$(SHA1TEST)
|
||||||
|
|
||||||
test_mdc2:
|
test_mdc2:
|
||||||
./$(MDC2TEST)
|
$(SET_SO_PATHS); ./$(MDC2TEST)
|
||||||
|
|
||||||
test_md5:
|
test_md5:
|
||||||
./$(MD5TEST)
|
$(SET_SO_PATHS); ./$(MD5TEST)
|
||||||
|
|
||||||
test_md4:
|
test_md4:
|
||||||
./$(MD4TEST)
|
$(SET_SO_PATHS); ./$(MD4TEST)
|
||||||
|
|
||||||
test_hmac:
|
test_hmac:
|
||||||
./$(HMACTEST)
|
$(SET_SO_PATHS); ./$(HMACTEST)
|
||||||
|
|
||||||
test_md2:
|
test_md2:
|
||||||
./$(MD2TEST)
|
$(SET_SO_PATHS); ./$(MD2TEST)
|
||||||
|
|
||||||
test_rmd:
|
test_rmd:
|
||||||
./$(RMDTEST)
|
$(SET_SO_PATHS); ./$(RMDTEST)
|
||||||
|
|
||||||
test_bf:
|
test_bf:
|
||||||
./$(BFTEST)
|
$(SET_SO_PATHS); ./$(BFTEST)
|
||||||
|
|
||||||
test_cast:
|
test_cast:
|
||||||
./$(CASTTEST)
|
$(SET_SO_PATHS); ./$(CASTTEST)
|
||||||
|
|
||||||
test_rc2:
|
test_rc2:
|
||||||
./$(RC2TEST)
|
$(SET_SO_PATHS); ./$(RC2TEST)
|
||||||
|
|
||||||
test_rc4:
|
test_rc4:
|
||||||
./$(RC4TEST)
|
$(SET_SO_PATHS); ./$(RC4TEST)
|
||||||
|
|
||||||
test_rc5:
|
test_rc5:
|
||||||
./$(RC5TEST)
|
$(SET_SO_PATHS); ./$(RC5TEST)
|
||||||
|
|
||||||
test_rand:
|
test_rand:
|
||||||
./$(RANDTEST)
|
$(SET_SO_PATHS); ./$(RANDTEST)
|
||||||
|
|
||||||
test_enc:
|
test_enc:
|
||||||
@sh ./testenc
|
@$(SET_SO_PATHS); sh ./testenc
|
||||||
|
|
||||||
test_x509:
|
test_x509:
|
||||||
echo test normal x509v1 certificate
|
echo test normal x509v1 certificate
|
||||||
sh ./tx509 2>/dev/null
|
$(SET_SO_PATHS); sh ./tx509 2>/dev/null
|
||||||
echo test first x509v3 certificate
|
echo test first x509v3 certificate
|
||||||
sh ./tx509 v3-cert1.pem 2>/dev/null
|
$(SET_SO_PATHS); sh ./tx509 v3-cert1.pem 2>/dev/null
|
||||||
echo test second x509v3 certificate
|
echo test second x509v3 certificate
|
||||||
sh ./tx509 v3-cert2.pem 2>/dev/null
|
$(SET_SO_PATHS); sh ./tx509 v3-cert2.pem 2>/dev/null
|
||||||
|
|
||||||
test_rsa:
|
test_rsa:
|
||||||
@sh ./trsa 2>/dev/null
|
@$(SET_SO_PATHS); sh ./trsa 2>/dev/null
|
||||||
./$(RSATEST)
|
$(SET_SO_PATHS); ./$(RSATEST)
|
||||||
|
|
||||||
test_crl:
|
test_crl:
|
||||||
@sh ./tcrl 2>/dev/null
|
@$(SET_SO_PATHS); sh ./tcrl 2>/dev/null
|
||||||
|
|
||||||
test_sid:
|
test_sid:
|
||||||
@sh ./tsid 2>/dev/null
|
@$(SET_SO_PATHS); sh ./tsid 2>/dev/null
|
||||||
|
|
||||||
test_req:
|
test_req:
|
||||||
@sh ./treq 2>/dev/null
|
@$(SET_SO_PATHS); sh ./treq 2>/dev/null
|
||||||
@sh ./treq testreq2.pem 2>/dev/null
|
@$(SET_SO_PATHS); sh ./treq testreq2.pem 2>/dev/null
|
||||||
|
|
||||||
test_pkcs7:
|
test_pkcs7:
|
||||||
@sh ./tpkcs7 2>/dev/null
|
@$(SET_SO_PATHS); sh ./tpkcs7 2>/dev/null
|
||||||
@sh ./tpkcs7d 2>/dev/null
|
@$(SET_SO_PATHS); sh ./tpkcs7d 2>/dev/null
|
||||||
|
|
||||||
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) >tmp.bntest
|
@$(SET_SO_PATHS); ./$(BNTEST) >tmp.bntest
|
||||||
@echo quit >>tmp.bntest
|
@echo quit >>tmp.bntest
|
||||||
@echo "running bc"
|
@echo "running bc"
|
||||||
@<tmp.bntest sh -c "`sh ./bctest ignore`" | $(PERL) -e '$$i=0; while (<STDIN>) {if (/^test (.*)/) {print STDERR "\nverify $$1";} elsif (!/^0$$/) {die "\nFailed! bc: $$_";} else {print STDERR "."; $$i++;}} print STDERR "\n$$i tests passed\n"'
|
@<tmp.bntest sh -c "`sh ./bctest ignore`" | $(PERL) -e '$$i=0; while (<STDIN>) {if (/^test (.*)/) {print STDERR "\nverify $$1";} elsif (!/^0$$/) {die "\nFailed! bc: $$_";} else {print STDERR "."; $$i++;}} print STDERR "\n$$i tests passed\n"'
|
||||||
@echo 'test a^b%c implementations'
|
@echo 'test a^b%c implementations'
|
||||||
./$(EXPTEST)
|
$(SET_SO_PATHS); ./$(EXPTEST)
|
||||||
|
|
||||||
test_ec:
|
test_ec:
|
||||||
@echo 'test elliptic curves'
|
@echo 'test elliptic curves'
|
||||||
./$(ECTEST)
|
$(SET_SO_PATHS); ./$(ECTEST)
|
||||||
|
|
||||||
test_ecdsa:
|
test_ecdsa:
|
||||||
@echo 'test ecdsa'
|
@echo 'test ecdsa'
|
||||||
./$(ECDSATEST)
|
$(SET_SO_PATHS); ./$(ECDSATEST)
|
||||||
|
|
||||||
test_ecdh:
|
test_ecdh:
|
||||||
@echo 'test ecdh'
|
@echo 'test ecdh'
|
||||||
./$(ECDHTEST)
|
$(SET_SO_PATHS); ./$(ECDHTEST)
|
||||||
|
|
||||||
test_verify:
|
test_verify:
|
||||||
@echo "The following command should have some OK's and some failures"
|
@echo "The following command should have some OK's and some failures"
|
||||||
@echo "There are definitly a few expired certificates"
|
@echo "There are definitly a few expired certificates"
|
||||||
../apps/openssl verify -CApath ../certs ../certs/*.pem
|
$(SET_SO_PATHS); ../apps/openssl verify -CApath ../certs ../certs/*.pem
|
||||||
|
|
||||||
test_dh:
|
test_dh:
|
||||||
@echo "Generate a set of DH parameters"
|
@echo "Generate a set of DH parameters"
|
||||||
./$(DHTEST)
|
$(SET_SO_PATHS); ./$(DHTEST)
|
||||||
|
|
||||||
test_dsa:
|
test_dsa:
|
||||||
@echo "Generate a set of DSA parameters"
|
@echo "Generate a set of DSA parameters"
|
||||||
./$(DSATEST)
|
$(SET_SO_PATHS); ./$(DSATEST)
|
||||||
./$(DSATEST) -app2_1
|
$(SET_SO_PATHS); ./$(DSATEST) -app2_1
|
||||||
|
|
||||||
test_gen:
|
test_gen:
|
||||||
@echo "Generate and verify a certificate request"
|
@echo "Generate and verify a certificate request"
|
||||||
@sh ./testgen
|
@$(SET_SO_PATHS); sh ./testgen
|
||||||
|
|
||||||
test_ss keyU.ss certU.ss certCA.ss: testss
|
test_ss keyU.ss certU.ss certCA.ss: testss
|
||||||
@echo "Generate and certify a test certificate"
|
@echo "Generate and certify a test certificate"
|
||||||
@sh ./testss
|
@$(SET_SO_PATHS); sh ./testss
|
||||||
|
|
||||||
test_engine:
|
test_engine:
|
||||||
@echo "Manipulate the ENGINE structures"
|
@echo "Manipulate the ENGINE structures"
|
||||||
./$(ENGINETEST)
|
$(SET_SO_PATHS); ./$(ENGINETEST)
|
||||||
|
|
||||||
test_ssl: keyU.ss certU.ss certCA.ss
|
test_ssl: keyU.ss certU.ss certCA.ss
|
||||||
@echo "test SSL protocol"
|
@echo "test SSL protocol"
|
||||||
@sh ./testssl keyU.ss certU.ss certCA.ss
|
@$(SET_SO_PATHS); sh ./testssl keyU.ss certU.ss certCA.ss
|
||||||
|
|
||||||
test_ca:
|
test_ca:
|
||||||
@if ../apps/openssl no-rsa; then \
|
@$(SET_SO_PATHS); if ../apps/openssl no-rsa; then \
|
||||||
echo "skipping CA.sh test -- requires RSA"; \
|
echo "skipping CA.sh test -- requires RSA"; \
|
||||||
else \
|
else \
|
||||||
echo "Generate and certify a test certificate via the 'ca' program"; \
|
echo "Generate and certify a test certificate via the 'ca' program"; \
|
||||||
@ -275,7 +274,7 @@ test_ca:
|
|||||||
|
|
||||||
test_rd: #$(RDTEST)
|
test_rd: #$(RDTEST)
|
||||||
# @echo "test Rijndael"
|
# @echo "test Rijndael"
|
||||||
# ./$(RDTEST)
|
# $(SET_SO_PATHS); ./$(RDTEST)
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||||
|
Loading…
Reference in New Issue
Block a user