Clean up test suite scripts
The test scripts have grown to be quite big (over 15000 lines) and are hard to navigate. There are multiple if branches with over 40 conditional checks chained together. This commit solves some of those issues. - Unite big repetetive if conditions into clean array lookups - Move 'install help' commands to a separate shell script - Adjust array lookup in test.sh to behave more intuitive - Add comments at key points to simplify navigation - Code formatting
This commit is contained in:
65
tools/install_modules.sh
Executable file
65
tools/install_modules.sh
Executable file
@@ -0,0 +1,65 @@
|
||||
#!/bin/bash
|
||||
|
||||
##
|
||||
## Author......: See docs/credits.txt
|
||||
## License.....: MIT
|
||||
##
|
||||
|
||||
## Test suite installation helper script
|
||||
|
||||
# Sum of all exit codes
|
||||
ERRORS=0
|
||||
|
||||
cpan install Authen::Passphrase::LANManager \
|
||||
Authen::Passphrase::MySQL323 \
|
||||
Authen::Passphrase::NTHash \
|
||||
Authen::Passphrase::PHPass \
|
||||
Convert::EBCDIC \
|
||||
Crypt::CBC \
|
||||
Crypt::DES \
|
||||
Crypt::Digest::RIPEMD160 \
|
||||
Crypt::Digest::Whirlpool \
|
||||
Crypt::ECB \
|
||||
Crypt::Eksblowfish::Bcrypt \
|
||||
Crypt::Mode::ECB \
|
||||
Crypt::MySQL \
|
||||
Crypt::OpenSSH::ChachaPoly \
|
||||
Crypt::PBKDF2 \
|
||||
Crypt::RC4 \
|
||||
Crypt::Rijndael \
|
||||
Crypt::ScryptKDF \
|
||||
Crypt::Skip32 \
|
||||
Crypt::Twofish \
|
||||
Crypt::UnixCrypt_XS \
|
||||
Digest::BLAKE2 \
|
||||
Digest::CMAC \
|
||||
Digest::CRC \
|
||||
Digest::GOST \
|
||||
Digest::HMAC \
|
||||
Digest::HMAC_MD5 \
|
||||
Digest::Keccak \
|
||||
Digest::MD4 \
|
||||
Digest::MD5 \
|
||||
Digest::Perl::MD5 \
|
||||
Digest::SHA \
|
||||
Digest::SHA3 \
|
||||
Digest::SipHash \
|
||||
JSON \
|
||||
Net::DNS::RR::NSEC3 \
|
||||
Net::DNS::SEC \
|
||||
;
|
||||
|
||||
ERRORS=$((ERRORS+$?))
|
||||
|
||||
pip2 install pygost
|
||||
|
||||
ERRORS=$((ERRORS+$?))
|
||||
|
||||
echo
|
||||
if [ $ERRORS -eq 0 ]; then
|
||||
echo '[ OK ] All commands were successful'
|
||||
exit 0
|
||||
else
|
||||
echo '[ FAIL ] Some commands were not successful'
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user