blob: 86edf5a305c969df0a3a21e66c1a23c47a802c86 [file] [log] [blame]
Ron Eldorbf007d22016-12-15 14:42:37 +02001#!/bin/sh
Ron Eldord731eb82017-07-23 15:25:32 +03002# 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#
Ron Eldorbf007d22016-12-15 14:42:37 +020010# 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.
Ron Eldord731eb82017-07-23 15:25:32 +030012# This script can also be used independently, not using git.
Ron Eldorbf007d22016-12-15 14:42:37 +020013#
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#
Ron Eldorbf007d22016-12-15 14:42:37 +020026
27REMOTE="$1"
28URL="$2"
29
30echo "REMOTE is $REMOTE"
31echo "URL is $URL"
32
Ron Eldord731eb82017-07-23 15:25:32 +030033set -eu
34
Ron Eldorbf007d22016-12-15 14:42:37 +020035run_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
45run_test ./tests/scripts/check-doxy-blocks.pl
46run_test ./tests/scripts/check-names.sh
47run_test ./tests/scripts/check-generated-files.sh
Darryl Green2699de32018-05-21 11:40:22 +010048run_test ./tests/scripts/check-files.py
Ron Eldorb0ef4342018-04-01 17:43:26 +030049run_test ./tests/scripts/doxygen.sh