tests/test-check-code-hg.t
author Kevin Bullock <kbullock@ringworld.org>
Fri, 08 Feb 2013 19:32:56 +0000
changeset 18575 667063b22a69
parent 17977 a6180647ead4
child 18576 97761496c65a
permissions -rw-r--r--
check-code: warn to use killdaemons instead of kill `cat PIDFILE` We have a bunch of tests that still use kill `cat hg.pid` or worse, kill `cat hg.pid`; while kill -0 `cat hg.pid`; sleep 0; done Cleaning these up to use tests/killdaemons.py is non-trivial, so for now we just add a warning.
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"/..
16485
f48b075ff088 tests: solaris sh can not negate exit status with '!'
Mads Kiilerich <mads@kiilerich.com>
parents: 16306
diff changeset
     3
  $ if hg identify -q > /dev/null; then :
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
a6180647ead4 tests: only call check-code once
Matt Mackall <mpm@selenic.com>
parents: 17956
diff changeset
    11
  $ hg manifest | xargs "$check_code" --warnings --nolineno --per-file=0
18575
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    12
  tests/test-hgweb-raw.t:0:
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    13
   >   $ while kill `cat hg.pid` 2>/dev/null; do sleep 0; done
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    14
   don't use kill, use killdaemons.py
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    15
   don't use kill, use killdaemons.py
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    16
  tests/test-https.t:0:
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    17
   >   $ while kill `cat hg1.pid` 2>/dev/null; do sleep 0; done
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    18
   don't use kill, use killdaemons.py
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    19
  tests/test-inotify-debuginotify.t:0:
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    20
   >   $ kill `cat hg.pid`
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    21
   don't use kill, use killdaemons.py
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    22
  tests/test-inotify-issue1371.t:0:
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    23
   >   $ kill `cat hg.pid`
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    24
   don't use kill, use killdaemons.py
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    25
  tests/test-inotify-issue1542.t:0:
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    26
   >   $ kill `cat hg.pid`
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    27
   don't use kill, use killdaemons.py
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    28
  tests/test-inotify-issue1556.t:0:
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    29
   >   $ kill `cat hg.pid`
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    30
   don't use kill, use killdaemons.py
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    31
  tests/test-inotify-lookup.t:0:
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    32
   >   $ kill `cat .hg/inotify.pid`
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    33
   don't use kill, use killdaemons.py
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    34
  tests/test-inotify.t:0:
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    35
   >   $ kill `cat ../hg2.pid`
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    36
   don't use kill, use killdaemons.py
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    37
  tests/test-inotify.t:0:
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    38
   >   $ kill `cat hg.pid`
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    39
   don't use kill, use killdaemons.py
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    40
  tests/test-inotify.t:0:
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    41
   >   $ kill `cat hg3.pid`
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    42
   don't use kill, use killdaemons.py
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    43
  tests/test-obsolete.t:0:
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    44
   >   $ kill `cat hg.pid`
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    45
   don't use kill, use killdaemons.py
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    46
   don't use kill, use killdaemons.py
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    47
  tests/test-serve.t:0:
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    48
   >   >        kill `cat hg.pid`
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    49
   don't use kill, use killdaemons.py
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    50
  tests/test-serve.t:0:
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    51
   >   >        kill `cat hg.pid` 2>/dev/null
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    52
   don't use kill, use killdaemons.py
667063b22a69 check-code: warn to use killdaemons instead of kill `cat PIDFILE`
Kevin Bullock <kbullock@ringworld.org>
parents: 17977
diff changeset
    53
  [1]