aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2020-07-02 13:54:19 -0400
committerDavid Goulet <dgoulet@torproject.org>2020-07-02 14:39:44 -0400
commit887dc6abb0b39dcedd458960f7f46e373389bbc9 (patch)
treefac7e24f780b82b8aa34bf80f68d3dffa465ac6d /scripts
parent8ae0ecbd6a74afa6227f6e6f7af8bd82afe4c447 (diff)
downloadtor-887dc6abb0b39dcedd458960f7f46e373389bbc9.tar.gz
tor-887dc6abb0b39dcedd458960f7f46e373389bbc9.zip
scripts: Don't run practracker in git hooks
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/git/pre-commit.git-hook19
1 files changed, 2 insertions, 17 deletions
diff --git a/scripts/git/pre-commit.git-hook b/scripts/git/pre-commit.git-hook
index 33af3fdf6e..5533ed0cdd 100755
--- a/scripts/git/pre-commit.git-hook
+++ b/scripts/git/pre-commit.git-hook
@@ -5,7 +5,7 @@
#
# This is pre-commit git hook script that prevents commiting your changeset if
# it fails our code formatting, changelog entry formatting, module include
-# rules, or best practices tracker.
+# rules, etc...
# Run only if this environment variable is set.
if [ -z "$TOR_EXTRA_PRE_COMMIT_CHECKS" ]; then
@@ -54,13 +54,6 @@ if [ -e scripts/maint/checkShellScripts.sh ]; then
scripts/maint/checkShellScripts.sh
fi
-# Always run the practracker unit tests
-PT_DIR=scripts/maint/practracker
-
-if [ -e "${PT_DIR}/test_practracker.sh" ]; then
- "${PT_DIR}/test_practracker.sh"
-fi
-
if [ -e scripts/maint/checkSpaceTest.sh ]; then
scripts/maint/checkSpaceTest.sh
fi
@@ -79,19 +72,11 @@ printf "Modified tor-owned source files:\\n%s\\n" "$CHECK_FILES"
perl scripts/maint/checkSpace.pl -C \
$CHECK_FILES
+# This makes sure that we are only including things we're allowed to include.
if test -e scripts/maint/practracker/includes.py; then
python scripts/maint/practracker/includes.py
fi
-# Only call practracker if ${PT_DIR}/.enable_practracker_in_hooks exists
-# We do this check so that we can enable practracker in hooks in master, and
-# disable it on maint branches
-if [ -e "${PT_DIR}/practracker.py" ]; then
- if [ -e "${PT_DIR}/.enable_practracker_in_hooks" ]; then
- python3 "${PT_DIR}/practracker.py" "$workdir"
- fi
-fi
-
if [ -e scripts/coccinelle/check_cocci_parse.sh ]; then
# Run a verbose cocci parse check on the changed files