blob: f38bba83828aef0fe5f4ca1821ce7890030da30a [file] [log] [blame]
Ben Laurie968ddc92014-09-30 17:48:59 +01001#!/usr/bin/env bash
Adam Langley95c29f32014-06-20 12:00:00 -07002
Adam Langley659de412014-06-26 10:26:42 -07003# 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 Benjamin4518d392014-08-06 21:44:40 -040017SRC=..
18if [ "$#" -ge 1 ]; then
19 SRC=$1
20fi
21
Adam Langleydfe30532014-06-20 12:00:00 -070022TESTS="
David Benjamin7b35b582014-07-17 01:51:59 -040023./crypto/base64/base64_test
Adam Langleydfe30532014-06-20 12:00:00 -070024./crypto/bio/bio_test
25./crypto/bn/bn_test
Alex Chernyakhovsky04dbb7f2014-08-29 22:41:39 -040026./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 Benjamin4518d392014-08-06 21:44:40 -040033./crypto/cipher/cipher_test $SRC/crypto/cipher/cipher_test.txt
Adam Langley9ed9dae2014-11-04 11:22:01 -080034./crypto/constant_time_test
Adam Langleydfe30532014-06-20 12:00:00 -070035./crypto/dh/dh_test
David Benjamin9da90352014-11-04 21:23:33 -050036./crypto/digest/digest_test
Adam Langleydfe30532014-06-20 12:00:00 -070037./crypto/dsa/dsa_test
Adam Langley9f5a3142014-11-03 17:57:47 -080038./crypto/ec/ec_test
Adam Langleydfe30532014-06-20 12:00:00 -070039./crypto/ec/example_mul
40./crypto/ecdsa/ecdsa_test
Alex Chernyakhovsky04dbb7f2014-08-29 22:41:39 -040041./crypto/err/err_test
David Benjamin817ec342014-11-03 18:55:14 -050042./crypto/evp/evp_test
Nick Harper4685e872014-12-09 15:51:28 -080043./crypto/hkdf/hkdf_test
Adam Langleydfe30532014-06-20 12:00:00 -070044./crypto/hmac/hmac_test
45./crypto/lhash/lhash_test
Adam Langleydfe30532014-06-20 12:00:00 -070046./crypto/modes/gcm_test
Alex Chernyakhovsky04dbb7f2014-08-29 22:41:39 -040047./crypto/pkcs8/pkcs12_test
Adam Langleydfe30532014-06-20 12:00:00 -070048./crypto/rsa/rsa_test
Alex Chernyakhovsky04dbb7f2014-08-29 22:41:39 -040049./crypto/x509/pkcs7_test
Adam Langleydfe30532014-06-20 12:00:00 -070050./crypto/x509v3/tab_test
51./crypto/x509v3/v3name_test
Alex Chernyakhovsky04dbb7f2014-08-29 22:41:39 -040052./ssl/pqueue/pqueue_test
David Benjamin2e521212014-07-16 14:37:51 -040053./ssl/ssl_test
Adam Langley95c29f32014-06-20 12:00:00 -070054"
55
Adam Langleydfe30532014-06-20 12:00:00 -070056IFS=$'\n'
Adam Langley95c29f32014-06-20 12:00:00 -070057for bin in $TESTS; do
58 echo $bin
Ben Laurie968ddc92014-09-30 17:48:59 +010059 out=$(bash -c "$bin" | tail -n 1)
Adam Langley95c29f32014-06-20 12:00:00 -070060 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
69done