Ben Laurie | 968ddc9 | 2014-09-30 17:48:59 +0100 | [diff] [blame] | 1 | #!/usr/bin/env bash |
Adam Langley | 95c29f3 | 2014-06-20 12:00:00 -0700 | [diff] [blame] | 2 | |
Adam Langley | 659de41 | 2014-06-26 10:26:42 -0700 | [diff] [blame] | 3 | # Copyright (c) 2014, Google Inc. |
| 4 | # |
| 5 | # Permission to use, copy, modify, and/or distribute this software for any |
| 6 | # purpose with or without fee is hereby granted, provided that the above |
| 7 | # copyright notice and this permission notice appear in all copies. |
| 8 | # |
| 9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| 10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| 11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY |
| 12 | # SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION |
| 14 | # OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN |
| 15 | # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ |
| 16 | |
David Benjamin | 4518d39 | 2014-08-06 21:44:40 -0400 | [diff] [blame] | 17 | SRC=.. |
| 18 | if [ "$#" -ge 1 ]; then |
| 19 | SRC=$1 |
| 20 | fi |
| 21 | |
Adam Langley | dfe3053 | 2014-06-20 12:00:00 -0700 | [diff] [blame] | 22 | TESTS=" |
David Benjamin | 7b35b58 | 2014-07-17 01:51:59 -0400 | [diff] [blame] | 23 | ./crypto/base64/base64_test |
Adam Langley | dfe3053 | 2014-06-20 12:00:00 -0700 | [diff] [blame] | 24 | ./crypto/bio/bio_test |
| 25 | ./crypto/bn/bn_test |
Alex Chernyakhovsky | 04dbb7f | 2014-08-29 22:41:39 -0400 | [diff] [blame] | 26 | ./crypto/bytestring/bytestring_test |
| 27 | ./crypto/cipher/aead_test aes-128-gcm $SRC/crypto/cipher/aes_128_gcm_tests.txt |
| 28 | ./crypto/cipher/aead_test aes-128-key-wrap $SRC/crypto/cipher/aes_128_key_wrap_tests.txt |
| 29 | ./crypto/cipher/aead_test aes-256-gcm $SRC/crypto/cipher/aes_256_gcm_tests.txt |
| 30 | ./crypto/cipher/aead_test aes-256-key-wrap $SRC/crypto/cipher/aes_256_key_wrap_tests.txt |
| 31 | ./crypto/cipher/aead_test chacha20-poly1305 $SRC/crypto/cipher/chacha20_poly1305_tests.txt |
| 32 | ./crypto/cipher/aead_test rc4-md5 $SRC/crypto/cipher/rc4_md5_tests.txt |
David Benjamin | 4518d39 | 2014-08-06 21:44:40 -0400 | [diff] [blame] | 33 | ./crypto/cipher/cipher_test $SRC/crypto/cipher/cipher_test.txt |
Adam Langley | 9ed9dae | 2014-11-04 11:22:01 -0800 | [diff] [blame] | 34 | ./crypto/constant_time_test |
Adam Langley | dfe3053 | 2014-06-20 12:00:00 -0700 | [diff] [blame] | 35 | ./crypto/dh/dh_test |
David Benjamin | 9da9035 | 2014-11-04 21:23:33 -0500 | [diff] [blame] | 36 | ./crypto/digest/digest_test |
Adam Langley | dfe3053 | 2014-06-20 12:00:00 -0700 | [diff] [blame] | 37 | ./crypto/dsa/dsa_test |
Adam Langley | 9f5a314 | 2014-11-03 17:57:47 -0800 | [diff] [blame] | 38 | ./crypto/ec/ec_test |
Adam Langley | dfe3053 | 2014-06-20 12:00:00 -0700 | [diff] [blame] | 39 | ./crypto/ec/example_mul |
| 40 | ./crypto/ecdsa/ecdsa_test |
Alex Chernyakhovsky | 04dbb7f | 2014-08-29 22:41:39 -0400 | [diff] [blame] | 41 | ./crypto/err/err_test |
David Benjamin | 817ec34 | 2014-11-03 18:55:14 -0500 | [diff] [blame] | 42 | ./crypto/evp/evp_test |
Nick Harper | 4685e87 | 2014-12-09 15:51:28 -0800 | [diff] [blame] | 43 | ./crypto/hkdf/hkdf_test |
Adam Langley | dfe3053 | 2014-06-20 12:00:00 -0700 | [diff] [blame] | 44 | ./crypto/hmac/hmac_test |
| 45 | ./crypto/lhash/lhash_test |
Adam Langley | dfe3053 | 2014-06-20 12:00:00 -0700 | [diff] [blame] | 46 | ./crypto/modes/gcm_test |
Alex Chernyakhovsky | 04dbb7f | 2014-08-29 22:41:39 -0400 | [diff] [blame] | 47 | ./crypto/pkcs8/pkcs12_test |
Adam Langley | dfe3053 | 2014-06-20 12:00:00 -0700 | [diff] [blame] | 48 | ./crypto/rsa/rsa_test |
Alex Chernyakhovsky | 04dbb7f | 2014-08-29 22:41:39 -0400 | [diff] [blame] | 49 | ./crypto/x509/pkcs7_test |
Adam Langley | dfe3053 | 2014-06-20 12:00:00 -0700 | [diff] [blame] | 50 | ./crypto/x509v3/tab_test |
| 51 | ./crypto/x509v3/v3name_test |
Alex Chernyakhovsky | 04dbb7f | 2014-08-29 22:41:39 -0400 | [diff] [blame] | 52 | ./ssl/pqueue/pqueue_test |
David Benjamin | 2e52121 | 2014-07-16 14:37:51 -0400 | [diff] [blame] | 53 | ./ssl/ssl_test |
Adam Langley | 95c29f3 | 2014-06-20 12:00:00 -0700 | [diff] [blame] | 54 | " |
| 55 | |
Adam Langley | dfe3053 | 2014-06-20 12:00:00 -0700 | [diff] [blame] | 56 | IFS=$'\n' |
Adam Langley | 95c29f3 | 2014-06-20 12:00:00 -0700 | [diff] [blame] | 57 | for bin in $TESTS; do |
| 58 | echo $bin |
Ben Laurie | 968ddc9 | 2014-09-30 17:48:59 +0100 | [diff] [blame] | 59 | out=$(bash -c "$bin" | tail -n 1) |
Adam Langley | 95c29f3 | 2014-06-20 12:00:00 -0700 | [diff] [blame] | 60 | if [ $? -ne 0 ]; then |
| 61 | echo $bin failed to complete. |
| 62 | exit 1 |
| 63 | fi |
| 64 | |
| 65 | if [ "x$out" != "xPASS" ]; then |
| 66 | echo $bin failed to print PASS on the last line. |
| 67 | exit 1 |
| 68 | fi |
| 69 | done |