From 4d47dfcb5618a65621b191d939059f72e1bd6e0b Mon Sep 17 00:00:00 2001 From: Kostia Balytskyi Date: Tue, 9 Jan 2018 04:45:57 -0800 Subject: [PATCH] fb-hgext: remove some useless scripts from fb-hgext Summary: These scripts are not necessary anymore. Depends on D6675381 Test Plan: - less complaints from styling tests Reviewers: #sourcecontrol Differential Revision: https://phabricator.intern.facebook.com/D6675405 --- .../tests/test-fb-hgext-check-execute-hg.t | 28 ------------------- .../tests/test-fb-hgext-check-pyflakes-hg.t | 21 -------------- .../tests/test-fb-hgext-check-shbang-hg.t | 15 ---------- 3 files changed, 64 deletions(-) delete mode 100644 fb-hgext/tests/test-fb-hgext-check-execute-hg.t delete mode 100644 fb-hgext/tests/test-fb-hgext-check-pyflakes-hg.t delete mode 100644 fb-hgext/tests/test-fb-hgext-check-shbang-hg.t diff --git a/fb-hgext/tests/test-fb-hgext-check-execute-hg.t b/fb-hgext/tests/test-fb-hgext-check-execute-hg.t deleted file mode 100644 index c4f0b37742..0000000000 --- a/fb-hgext/tests/test-fb-hgext-check-execute-hg.t +++ /dev/null @@ -1,28 +0,0 @@ -#require test-repo execbit - - $ . $TESTDIR/require-core-hg.sh contrib/check-config.py - -This file is backported from mercurial/tests/test-check-execute.t. -It differs slightly to fix paths. - - $ . "$TESTDIR/helper-testrepo.sh" - -look for python scripts without the execute bit - - $ testrepohg files 'set:**.py and not exec() and grep(r"^#!.*?python")' - [1] - -look for python scripts with execute bit but not shebang - - $ testrepohg files 'set:**.py and exec() and not grep(r"^#!.*?python")' - [1] - -look for shell scripts with execute bit but not shebang - - $ testrepohg files 'set:**.sh and exec() and not grep(r"^#!.*(ba)?sh")' - [1] - -look for non scripts with no shebang - - $ testrepohg files 'set:exec() and not **.sh and not **.py and not grep(r"^#!")' - [1] diff --git a/fb-hgext/tests/test-fb-hgext-check-pyflakes-hg.t b/fb-hgext/tests/test-fb-hgext-check-pyflakes-hg.t deleted file mode 100644 index 215d5e96bd..0000000000 --- a/fb-hgext/tests/test-fb-hgext-check-pyflakes-hg.t +++ /dev/null @@ -1,21 +0,0 @@ -#require test-repo pyflakes - - $ . $TESTDIR/require-core-hg.sh tests/filterpyflakes.py - -This file is backported from mercurial/tests/test-check-pyflakes.t. -It differs slightly to fix paths. - - $ . "$TESTDIR/helper-testrepo.sh" - -run pyflakes on all tracked files ending in .py or without a file ending -(skipping binary file random-seed) - - $ testrepohg locate 'set:**.py or grep("^#!.*python")' > "$TESTTMP/files1" - $ if [ -n "$LINTFILES" ]; then - > printf "$LINTFILES" > "$TESTTMP/files2" - > join "$TESTTMP/files1" "$TESTTMP/files2" - > else - > cat "$TESTTMP/files1" - > fi \ - > | xargs pyflakes 2>/dev/null | "$RUNTESTDIR/filterpyflakes.py" - diff --git a/fb-hgext/tests/test-fb-hgext-check-shbang-hg.t b/fb-hgext/tests/test-fb-hgext-check-shbang-hg.t deleted file mode 100644 index 0118fccbae..0000000000 --- a/fb-hgext/tests/test-fb-hgext-check-shbang-hg.t +++ /dev/null @@ -1,15 +0,0 @@ -#require test-repo - -This file is backported from mercurial/tests/test-check-shbang.t. - - $ . "$TESTDIR/helper-testrepo.sh" - -look for python scripts that do not use /usr/bin/env - - $ testrepohg files 'set:grep(r"^#!.*?python") and not grep(r"^#!/usr/bi{1}n/env python")' - [1] - -look for shell scripts that do not use /bin/sh - - $ testrepohg files 'set:grep(r"^#!.*/bi{1}n/sh") and not grep(r"^#!/bi{1}n/sh")' - [1]