aboutsummaryrefslogtreecommitdiff
path: root/toolchain_utils_githooks
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain_utils_githooks')
-rwxr-xr-xtoolchain_utils_githooks/check-presubmit (renamed from toolchain_utils_githooks/check-style)1
-rwxr-xr-xtoolchain_utils_githooks/pre-push.real27
2 files changed, 2 insertions, 26 deletions
diff --git a/toolchain_utils_githooks/check-style b/toolchain_utils_githooks/check-presubmit
index c844b1e2..e67611f5 100755
--- a/toolchain_utils_githooks/check-style
+++ b/toolchain_utils_githooks/check-presubmit
@@ -41,6 +41,7 @@ spawn_child() {
spawn_child "${mydir}/check-lint" "$@"
spawn_child "${mydir}/check-format" "$@"
+spawn_child "${mydir}/../run_tests_for.py" "$@"
success=true
for i in "${!child_pids[@]}"; do
diff --git a/toolchain_utils_githooks/pre-push.real b/toolchain_utils_githooks/pre-push.real
index c05a35bf..06aa6213 100755
--- a/toolchain_utils_githooks/pre-push.real
+++ b/toolchain_utils_githooks/pre-push.real
@@ -9,29 +9,6 @@
mydir="$(dirname "$(readlink -m "$0")")"
-# This redirects stdin. Make sure to run after stdin has been read.
-run_UnitTests() {
- save_dir=$(pwd)
- status=0
- valid=0
-
- # Make sure we can read the stdin from terminal
- exec < /dev/tty
-
- while [[ $valid -eq 0 ]] ; do
- read -p "Run unit tests? [y/n] " choice
- case "$choice" in
- n|N ) valid=1 ;;
- y|Y ) valid=1; cd crosperf; ./run_tests.sh; status=$? ;
- cd $save_dir;;
- * ) echo "Must choose y or n."
- esac
- done
- if [[ $status -ne 0 ]]; then
- exit $status
- fi
-}
-
z40=0000000000000000000000000000000000000000
while IFS=' ' read local_ref local_sha remote_ref remote_sha; do
@@ -46,10 +23,8 @@ while IFS=' ' read local_ref local_sha remote_ref remote_sha; do
all_files="$(git show --pretty="format:" --name-only "${range}")"
# Note that ${all_files} may include files that were deleted. Hence, we
# ignore any complaints about missing files.
- IGNORE_MISSING=1 "${mydir}/check-style" ${all_files} || exit 1
+ IGNORE_MISSING=1 "${mydir}/check-presubmit" ${all_files} || exit 1
fi
done
-run_UnitTests
-
exit 0