Merge branch 'feature/coverage' into develop
This commit is contained in:
commit
5707e319c2
@ -3,6 +3,7 @@ compiler:
|
||||
- gcc
|
||||
script: bash "${BUILDSCRIPT}" "${BUILDNAME}" "${BUILDOPTIONS}" "makefile" "-DUSE_LTM -DLTM_DESC -I/usr/include" "/usr/lib/libtommath.a"
|
||||
env:
|
||||
- BUILDSCRIPT="coverage.sh" BUILDNAME="COVERAGE" BUILDOPTIONS=" "
|
||||
- BUILDSCRIPT="run.sh" BUILDNAME="STOCK" BUILDOPTIONS=" "
|
||||
- BUILDSCRIPT="run.sh" BUILDNAME="SMALL" BUILDOPTIONS="-DLTC_SMALL_CODE"
|
||||
- BUILDSCRIPT="run.sh" BUILDNAME="NOTABLES" BUILDOPTIONS="-DLTC_NO_TABLES"
|
||||
@ -23,6 +24,7 @@ branches:
|
||||
- develop
|
||||
before_script:
|
||||
- sudo apt-get install libtommath-dev
|
||||
- sudo pip install cpp-coveralls
|
||||
after_failure:
|
||||
- cat test_std.txt
|
||||
- cat test_err.txt
|
||||
|
@ -3,10 +3,10 @@ libtomcrypt
|
||||
|
||||
See doc/crypt.pdf for a detailed documentation
|
||||
|
||||
Build Status
|
||||
------------
|
||||
Project Status
|
||||
--------------
|
||||
|
||||
develop: [![Build Status](https://api.travis-ci.org/libtom/libtomcrypt.png?branch=develop)](https://travis-ci.org/libtom/libtomcrypt)
|
||||
develop: [![Build Status](https://api.travis-ci.org/libtom/libtomcrypt.png?branch=develop)](https://travis-ci.org/libtom/libtomcrypt) [![Coverage Status](https://coveralls.io/repos/libtom/libtomcrypt/badge.png?branch=develop)](https://coveralls.io/r/libtom/libtomcrypt)
|
||||
|
||||
Submitting patches
|
||||
------------------
|
||||
|
26
coverage.sh
Executable file
26
coverage.sh
Executable file
@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z "$(echo $CC | grep "gcc")" ]; then
|
||||
echo "no gcc detected, early exit success"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# output version
|
||||
bash printinfo.sh
|
||||
|
||||
bash build.sh " $1" " $2" " $3 " "$4 -fprofile-arcs -ftest-coverage " "$5 -lgcov"
|
||||
if [ -a testok.txt ] && [ -f testok.txt ]; then
|
||||
echo
|
||||
else
|
||||
echo
|
||||
echo "Test failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cpp-coveralls -e 'demos/' -e 'testprof/' -e 'notes/' -e 'src/headers/'
|
||||
|
||||
exit 0
|
||||
|
||||
# $Source$
|
||||
# $Revision$
|
||||
# $Date$
|
@ -123,9 +123,137 @@ void init_timer(void)
|
||||
fprintf(stderr, "Clock Skew: %lu\n", (unsigned long)skew);
|
||||
}
|
||||
|
||||
/*
|
||||
* unregister ciphers, hashes & prngs
|
||||
*/
|
||||
static void _unregister_all(void)
|
||||
{
|
||||
#ifdef LTC_RIJNDAEL
|
||||
unregister_cipher(&aes_desc);
|
||||
#endif
|
||||
#ifdef LTC_BLOWFISH
|
||||
unregister_cipher(&blowfish_desc);
|
||||
#endif
|
||||
#ifdef LTC_XTEA
|
||||
unregister_cipher(&xtea_desc);
|
||||
#endif
|
||||
#ifdef LTC_RC5
|
||||
unregister_cipher(&rc5_desc);
|
||||
#endif
|
||||
#ifdef LTC_RC6
|
||||
unregister_cipher(&rc6_desc);
|
||||
#endif
|
||||
#ifdef LTC_SAFERP
|
||||
unregister_cipher(&saferp_desc);
|
||||
#endif
|
||||
#ifdef LTC_TWOFISH
|
||||
unregister_cipher(&twofish_desc);
|
||||
#endif
|
||||
#ifdef LTC_SAFER
|
||||
unregister_cipher(&safer_k64_desc);
|
||||
unregister_cipher(&safer_sk64_desc);
|
||||
unregister_cipher(&safer_k128_desc);
|
||||
unregister_cipher(&safer_sk128_desc);
|
||||
#endif
|
||||
#ifdef LTC_RC2
|
||||
unregister_cipher(&rc2_desc);
|
||||
#endif
|
||||
#ifdef LTC_DES
|
||||
unregister_cipher(&des_desc);
|
||||
unregister_cipher(&des3_desc);
|
||||
#endif
|
||||
#ifdef LTC_CAST5
|
||||
unregister_cipher(&cast5_desc);
|
||||
#endif
|
||||
#ifdef LTC_NOEKEON
|
||||
unregister_cipher(&noekeon_desc);
|
||||
#endif
|
||||
#ifdef LTC_SKIPJACK
|
||||
unregister_cipher(&skipjack_desc);
|
||||
#endif
|
||||
#ifdef LTC_KHAZAD
|
||||
unregister_cipher(&khazad_desc);
|
||||
#endif
|
||||
#ifdef LTC_ANUBIS
|
||||
unregister_cipher(&anubis_desc);
|
||||
#endif
|
||||
#ifdef LTC_KSEED
|
||||
unregister_cipher(&kseed_desc);
|
||||
#endif
|
||||
#ifdef LTC_KASUMI
|
||||
unregister_cipher(&kasumi_desc);
|
||||
#endif
|
||||
#ifdef LTC_MULTI2
|
||||
unregister_cipher(&multi2_desc);
|
||||
#endif
|
||||
#ifdef LTC_CAMELLIA
|
||||
unregister_cipher(&camellia_desc);
|
||||
#endif
|
||||
|
||||
#ifdef LTC_TIGER
|
||||
unregister_hash(&tiger_desc);
|
||||
#endif
|
||||
#ifdef LTC_MD2
|
||||
unregister_hash(&md2_desc);
|
||||
#endif
|
||||
#ifdef LTC_MD4
|
||||
unregister_hash(&md4_desc);
|
||||
#endif
|
||||
#ifdef LTC_MD5
|
||||
unregister_hash(&md5_desc);
|
||||
#endif
|
||||
#ifdef LTC_SHA1
|
||||
unregister_hash(&sha1_desc);
|
||||
#endif
|
||||
#ifdef LTC_SHA224
|
||||
unregister_hash(&sha224_desc);
|
||||
#endif
|
||||
#ifdef LTC_SHA256
|
||||
unregister_hash(&sha256_desc);
|
||||
#endif
|
||||
#ifdef LTC_SHA384
|
||||
unregister_hash(&sha384_desc);
|
||||
#endif
|
||||
#ifdef LTC_SHA512
|
||||
unregister_hash(&sha512_desc);
|
||||
#endif
|
||||
#ifdef LTC_RIPEMD128
|
||||
unregister_hash(&rmd128_desc);
|
||||
#endif
|
||||
#ifdef LTC_RIPEMD160
|
||||
unregister_hash(&rmd160_desc);
|
||||
#endif
|
||||
#ifdef LTC_RIPEMD256
|
||||
unregister_hash(&rmd256_desc);
|
||||
#endif
|
||||
#ifdef LTC_RIPEMD320
|
||||
unregister_hash(&rmd320_desc);
|
||||
#endif
|
||||
#ifdef LTC_WHIRLPOOL
|
||||
unregister_hash(&whirlpool_desc);
|
||||
#endif
|
||||
#ifdef LTC_CHC_HASH
|
||||
unregister_hash(&chc_desc);
|
||||
#endif
|
||||
|
||||
unregister_prng(&yarrow_desc);
|
||||
#ifdef LTC_FORTUNA
|
||||
unregister_prng(&fortuna_desc);
|
||||
#endif
|
||||
#ifdef LTC_RC4
|
||||
unregister_prng(&rc4_desc);
|
||||
#endif
|
||||
#ifdef LTC_SOBER128
|
||||
unregister_prng(&sober128_desc);
|
||||
#endif
|
||||
} /* _cleanup() */
|
||||
|
||||
void reg_algs(void)
|
||||
{
|
||||
int err;
|
||||
|
||||
atexit(_unregister_all);
|
||||
|
||||
#ifdef LTC_RIJNDAEL
|
||||
register_cipher (&aes_desc);
|
||||
#endif
|
||||
@ -258,6 +386,10 @@ register_prng(&sober128_desc);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (strcmp("CRYPT_OK", error_to_string(err))) {
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int time_keysched(void)
|
||||
|
Loading…
Reference in New Issue
Block a user