tests/test-check-code-hg.t
author Wagner Bruna <wbruna@softwareexpress.com.br>
Mon, 01 Jul 2013 11:09:29 -0300
branchstable
changeset 19373 009794acc6e3
parent 19022 cba222f01056
child 19321 2d03c8da7d98
permissions -rw-r--r--
merge with i18n
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
15557
7bb5ed61b74c tests: convert test-check-code-hg.py to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 11771
diff changeset
     1
  $ check_code="$TESTDIR"/../contrib/check-code.py
7bb5ed61b74c tests: convert test-check-code-hg.py to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 11771
diff changeset
     2
  $ cd "$TESTDIR"/..
18601
ce844e8e8af2 tests: guard against obsolete markers in the hg repo itself
Kevin Bullock <kbullock@ringworld.org>
parents: 18596
diff changeset
     3
  $ if hg identify -q > /dev/null 2>&1; then :
16485
f48b075ff088 tests: solaris sh can not negate exit status with '!'
Mads Kiilerich <mads@kiilerich.com>
parents: 16306
diff changeset
     4
  > else
16179
be6ac2ecc7f8 test-check-code-hg: skip test if not in a working dir (issue3248).
Greg Ward <greg@gerg.ca>
parents: 16156
diff changeset
     5
  >     echo "skipped: not a Mercurial working dir" >&2
be6ac2ecc7f8 test-check-code-hg: skip test if not in a working dir (issue3248).
Greg Ward <greg@gerg.ca>
parents: 16156
diff changeset
     6
  >     exit 80
be6ac2ecc7f8 test-check-code-hg: skip test if not in a working dir (issue3248).
Greg Ward <greg@gerg.ca>
parents: 16156
diff changeset
     7
  > fi
15558
c6b600d2348c tests: run check-code with warnings and maintain a whitelist
Mads Kiilerich <mads@kiilerich.com>
parents: 15557
diff changeset
     8
17977
a6180647ead4 tests: only call check-code once
Matt Mackall <mpm@selenic.com>
parents: 17956
diff changeset
     9
New errors are not allowed. Warnings are strongly discouraged.
a6180647ead4 tests: only call check-code once
Matt Mackall <mpm@selenic.com>
parents: 17956
diff changeset
    10
18601
ce844e8e8af2 tests: guard against obsolete markers in the hg repo itself
Kevin Bullock <kbullock@ringworld.org>
parents: 18596
diff changeset
    11
  $ hg manifest 2>/dev/null \
ce844e8e8af2 tests: guard against obsolete markers in the hg repo itself
Kevin Bullock <kbullock@ringworld.org>
parents: 18596
diff changeset
    12
  >   | xargs "$check_code" --warnings --nolineno --per-file=0 \
ce844e8e8af2 tests: guard against obsolete markers in the hg repo itself
Kevin Bullock <kbullock@ringworld.org>
parents: 18596
diff changeset
    13
  >   || false
19022
cba222f01056 tests: run check-code on Python files without .py extension
Mads Kiilerich <madski@unity3d.com>
parents: 18602
diff changeset
    14
cba222f01056 tests: run check-code on Python files without .py extension
Mads Kiilerich <madski@unity3d.com>
parents: 18602
diff changeset
    15
Check Python files without py extension
cba222f01056 tests: run check-code on Python files without .py extension
Mads Kiilerich <madski@unity3d.com>
parents: 18602
diff changeset
    16
cba222f01056 tests: run check-code on Python files without .py extension
Mads Kiilerich <madski@unity3d.com>
parents: 18602
diff changeset
    17
  $ cp \
cba222f01056 tests: run check-code on Python files without .py extension
Mads Kiilerich <madski@unity3d.com>
parents: 18602
diff changeset
    18
  >   hg \
cba222f01056 tests: run check-code on Python files without .py extension
Mads Kiilerich <madski@unity3d.com>
parents: 18602
diff changeset
    19
  >   hgweb.cgi \
cba222f01056 tests: run check-code on Python files without .py extension
Mads Kiilerich <madski@unity3d.com>
parents: 18602
diff changeset
    20
  >   contrib/convert-repo \
cba222f01056 tests: run check-code on Python files without .py extension
Mads Kiilerich <madski@unity3d.com>
parents: 18602
diff changeset
    21
  >   contrib/dumprevlog \
cba222f01056 tests: run check-code on Python files without .py extension
Mads Kiilerich <madski@unity3d.com>
parents: 18602
diff changeset
    22
  >   contrib/hgweb.fcgi \
cba222f01056 tests: run check-code on Python files without .py extension
Mads Kiilerich <madski@unity3d.com>
parents: 18602
diff changeset
    23
  >   contrib/hgweb.wsgi \
cba222f01056 tests: run check-code on Python files without .py extension
Mads Kiilerich <madski@unity3d.com>
parents: 18602
diff changeset
    24
  >   contrib/simplemerge \
cba222f01056 tests: run check-code on Python files without .py extension
Mads Kiilerich <madski@unity3d.com>
parents: 18602
diff changeset
    25
  >   contrib/undumprevlog \
cba222f01056 tests: run check-code on Python files without .py extension
Mads Kiilerich <madski@unity3d.com>
parents: 18602
diff changeset
    26
  >   "$TESTTMP"/
cba222f01056 tests: run check-code on Python files without .py extension
Mads Kiilerich <madski@unity3d.com>
parents: 18602
diff changeset
    27
  $ for f in "$TESTTMP"/*; do cp "$f" "$f.py"; done
cba222f01056 tests: run check-code on Python files without .py extension
Mads Kiilerich <madski@unity3d.com>
parents: 18602
diff changeset
    28
  $ "$check_code" --warnings --nolineno --per-file=0 "$TESTTMP"/*.py \
cba222f01056 tests: run check-code on Python files without .py extension
Mads Kiilerich <madski@unity3d.com>
parents: 18602
diff changeset
    29
  >   || false