Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / third_party / mbedtls / repo / tests / git-scripts / pre-push.sh
1 #!/bin/sh
2 # pre-push.sh
3 #
4 # This file is part of mbed TLS (https://tls.mbed.org)
5 #
6 # Copyright (c) 2017, ARM Limited, All Rights Reserved
7 #
8 # Purpose
9 #
10 # Called by "git push" after it has checked the remote status, but before anything has been
11 # pushed.  If this script exits with a non-zero status nothing will be pushed.
12 # This script can also be used independently, not using git.
13 #
14 # This hook is called with the following parameters:
15 #
16 # $1 -- Name of the remote to which the push is being done
17 # $2 -- URL to which the push is being done
18 #
19 # If pushing without using a named remote those arguments will be equal.
20 #
21 # Information about the commits which are being pushed is supplied as lines to
22 # the standard input in the form:
23 #
24 #   <local ref> <local sha1> <remote ref> <remote sha1>
25 #
26
27 REMOTE="$1"
28 URL="$2"
29
30 echo "REMOTE is $REMOTE"
31 echo "URL is $URL"
32
33 set -eu
34
35 run_test()
36 {
37     TEST=$1
38     echo "running '$TEST'"
39     if ! `$TEST > /dev/null 2>&1`; then
40         echo "test '$TEST' failed"
41         return 1
42     fi
43 }
44
45 run_test ./tests/scripts/check-doxy-blocks.pl
46 run_test ./tests/scripts/check-names.sh
47 run_test ./tests/scripts/check-generated-files.sh
48 run_test ./tests/scripts/check-files.py
49 run_test ./tests/scripts/doxygen.sh