blob: 6b2da10ed1ffb34c1399f12b68b78de2efeaacfd [file] [log] [blame]
Ron Eldorbf007d22016-12-15 14:42:37 +02001#!/bin/sh
2
3# Called by "git push" after it has checked the remote status, but before anything has been
4# pushed. If this script exits with a non-zero status nothing will be pushed.
5#
6# This hook is called with the following parameters:
7#
8# $1 -- Name of the remote to which the push is being done
9# $2 -- URL to which the push is being done
10#
11# If pushing without using a named remote those arguments will be equal.
12#
13# Information about the commits which are being pushed is supplied as lines to
14# the standard input in the form:
15#
16# <local ref> <local sha1> <remote ref> <remote sha1>
17#
18set -eu
19
20REMOTE="$1"
21URL="$2"
22
23echo "REMOTE is $REMOTE"
24echo "URL is $URL"
25
26run_test()
27{
28 TEST=$1
29 echo "running '$TEST'"
30 if ! `$TEST > /dev/null 2>&1`; then
31 echo "test '$TEST' failed"
32 return 1
33 fi
34}
35
36run_test ./tests/scripts/check-doxy-blocks.pl
37run_test ./tests/scripts/check-names.sh
38run_test ./tests/scripts/check-generated-files.sh