Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / boringssl / src / util / all_tests.sh
1 #!/bin/bash
2
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
17 SRC=..
18 if [ "$#" -ge 1 ]; then
19   SRC=$1
20 fi
21
22 TESTS="
23 ./crypto/cipher/aead_test aes-128-gcm $SRC/crypto/cipher/aes_128_gcm_tests.txt
24 ./crypto/cipher/aead_test aes-256-gcm $SRC/crypto/cipher/aes_256_gcm_tests.txt
25 ./crypto/cipher/aead_test chacha20-poly1305 $SRC/crypto/cipher/chacha20_poly1305_tests.txt
26 ./crypto/cipher/aead_test rc4-md5 $SRC/crypto/cipher/rc4_md5_tests.txt
27 ./crypto/cipher/aead_test aes-128-key-wrap $SRC/crypto/cipher/aes_128_key_wrap_tests.txt
28 ./crypto/cipher/aead_test aes-256-key-wrap $SRC/crypto/cipher/aes_256_key_wrap_tests.txt
29 ./crypto/base64/base64_test
30 ./crypto/bio/bio_test
31 ./crypto/bn/bn_test
32 ./crypto/cipher/cipher_test $SRC/crypto/cipher/cipher_test.txt
33 ./crypto/dh/dh_test
34 ./crypto/dsa/dsa_test
35 ./crypto/err/err_test
36 ./crypto/ec/example_mul
37 ./crypto/ecdsa/ecdsa_test
38 ./crypto/evp/example_sign
39 ./crypto/hmac/hmac_test
40 ./crypto/lhash/lhash_test
41 ./crypto/md5/md5_test
42 ./crypto/modes/gcm_test
43 ./crypto/rsa/rsa_test
44 ./crypto/sha/sha1_test
45 ./crypto/x509v3/tab_test
46 ./crypto/x509v3/v3name_test
47 ./crypto/bytestring/bytestring_test
48 ./crypto/x509/pkcs7_test
49 ./ssl/ssl_test
50 "
51
52 IFS=$'\n'
53 for bin in $TESTS; do
54   echo $bin
55   out=$(/bin/bash -c "$bin" | tail -n 1)
56   if [ $? -ne 0 ]; then
57     echo $bin failed to complete.
58     exit 1
59   fi
60
61   if [ "x$out" != "xPASS" ]; then
62     echo $bin failed to print PASS on the last line.
63     exit 1
64   fi
65 done