File tree Expand file tree Collapse file tree 4 files changed +39
-20
lines changed
Expand file tree Collapse file tree 4 files changed +39
-20
lines changed Original file line number Diff line number Diff line change 33
44# Get into the project-root. This script may be executed as `test.sh`
55# or as .git/hooks/pre-push, so we need to find the directory containing
6- # test.sh before we can proceed. If $0 is not a symlink, `readlink` will
7- # print nothing; if it is a symlink it will print the link target.
6+ # test.sh before we can proceed.
87
9- cd $( dirname $0 ) /$( dirname $( readlink $0 ) )
8+ if [ -n " $GIT_DIR " ]
9+ then
10+ # $GIT_DIR is set, so we're running as a hook.
11+ cd $GIT_DIR
12+ else
13+ # Git command exists? Cool, let's CD to the right place.
14+ git rev-parse && cd " $( git rev-parse --show-toplevel) "
15+ fi
1016
1117./test/rules.sh
1218./test/firefox.sh $@
Original file line number Diff line number Diff line change 1- #! /bin/bash
1+ #! /bin/bash -ex
22# Run Chromium tests for HTTPS Everywhere
3- #
4- # Get into the project-root. This script may be executed as `chromium.sh`
5- # or as ./test/chromium.sh, so we need to find the directory
6- # containing firefox.sh before we can proceed. If $0 is not a symlink,
7- # `readlink` will print nothing; if it is a symlink it will print the
8- # link target.
93
10- set -o errexit -o xtrace
4+ # Get to the repo root directory, even when we're symlinked as a hook.
5+ if [ -n " $GIT_DIR " ]
6+ then
7+ # $GIT_DIR is set, so we're running as a hook.
8+ cd $GIT_DIR
9+ else
10+ # Git command exists? Cool, let's CD to the right place.
11+ git rev-parse && cd " $( git rev-parse --show-toplevel) "
12+ fi
1113
12- cd $( dirname $0 ) /$( dirname $( readlink $0 ) ) ../
1314
1415# If you just want to run Chromium with the latest code:
1516if [ " $1 " == " --justrun" ]; then
Original file line number Diff line number Diff line change 11#! /bin/bash -ex
22# Run Firefox tests for HTTPS Everywhere
3- #
4- # Get into the project-root. This script may be executed as `firefox.sh`
5- # or as ./test/firefox.sh, so we need to find the directory containing
6- # firefox.sh before we can proceed. If $0 is not a symlink, `readlink`
7- # will print nothing; if it is a symlink it will print the link target.
83
9- cd $( dirname $0 ) /$( dirname $( readlink $0 ) ) ../
4+ # Get to the repo root directory, even when we're symlinked as a hook.
5+ if [ -n " $GIT_DIR " ]
6+ then
7+ # $GIT_DIR is set, so we're running as a hook.
8+ cd $GIT_DIR
9+ else
10+ # Git command exists? Cool, let's CD to the right place.
11+ git rev-parse && cd " $( git rev-parse --show-toplevel) "
12+ fi
13+
1014
1115source utils/mktemp.sh
1216
Original file line number Diff line number Diff line change 1- #! /bin/bash
1+ #! /bin/bash -ex
22#
33# Test that all rulesets modified after a certain date have sufficient test
44# coverage, according to the ruleset checker.
55#
66
7- cd $( dirname $0 ) /$( dirname $( readlink $0 ) ) ../
7+ # Get to the repo root directory, even when we're symlinked as a hook.
8+ if [ -n " $GIT_DIR " ]
9+ then
10+ # $GIT_DIR is set, so we're running as a hook.
11+ cd $GIT_DIR
12+ else
13+ # Git command exists? Cool, let's CD to the right place.
14+ git rev-parse && cd " $( git rev-parse --show-toplevel) "
15+ fi
816
917source utils/mktemp.sh
1018
You can’t perform that action at this time.
0 commit comments