##// END OF EJS Templates
tests: remove last two check-code warnings about killdaemons...
Kevin Bullock -
r18602:339a3fa1 default
parent child Browse files
Show More
@@ -1,20 +1,13 b''
1 $ check_code="$TESTDIR"/../contrib/check-code.py
1 $ check_code="$TESTDIR"/../contrib/check-code.py
2 $ cd "$TESTDIR"/..
2 $ cd "$TESTDIR"/..
3 $ if hg identify -q > /dev/null 2>&1; then :
3 $ if hg identify -q > /dev/null 2>&1; then :
4 > else
4 > else
5 > echo "skipped: not a Mercurial working dir" >&2
5 > echo "skipped: not a Mercurial working dir" >&2
6 > exit 80
6 > exit 80
7 > fi
7 > fi
8
8
9 New errors are not allowed. Warnings are strongly discouraged.
9 New errors are not allowed. Warnings are strongly discouraged.
10
10
11 $ hg manifest 2>/dev/null \
11 $ hg manifest 2>/dev/null \
12 > | xargs "$check_code" --warnings --nolineno --per-file=0 \
12 > | xargs "$check_code" --warnings --nolineno --per-file=0 \
13 > || false
13 > || false
14 tests/test-serve.t:0:
15 > > kill `cat hg.pid`
16 don't use kill, use killdaemons.py
17 tests/test-serve.t:0:
18 > > kill `cat hg.pid` 2>/dev/null
19 don't use kill, use killdaemons.py
20 [1]
@@ -1,84 +1,79 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1 $ "$TESTDIR/hghave" serve || exit 80
2
2
3 $ hgserve()
3 $ hgserve()
4 > {
4 > {
5 > hg serve -a localhost -d --pid-file=hg.pid -E errors.log -v $@ \
5 > hg serve -a localhost -d --pid-file=hg.pid -E errors.log -v $@ \
6 > | sed -e "s/:$HGPORT1\\([^0-9]\\)/:HGPORT1\1/g" \
6 > | sed -e "s/:$HGPORT1\\([^0-9]\\)/:HGPORT1\1/g" \
7 > -e "s/:$HGPORT2\\([^0-9]\\)/:HGPORT2\1/g" \
7 > -e "s/:$HGPORT2\\([^0-9]\\)/:HGPORT2\1/g" \
8 > -e 's/http:\/\/[^/]*\//http:\/\/localhost\//'
8 > -e 's/http:\/\/[^/]*\//http:\/\/localhost\//'
9 > cat hg.pid >> "$DAEMON_PIDS"
9 > cat hg.pid >> "$DAEMON_PIDS"
10 > echo % errors
10 > echo % errors
11 > cat errors.log
11 > cat errors.log
12 > if [ "$KILLQUIETLY" = "Y" ]; then
12 > "$TESTDIR/killdaemons.py" hg.pid
13 > kill `cat hg.pid` 2>/dev/null
14 > else
15 > kill `cat hg.pid`
16 > fi
17 > while kill -0 `cat hg.pid` 2>/dev/null; do sleep 0; done
18 > }
13 > }
19
14
20 $ hg init test
15 $ hg init test
21 $ cd test
16 $ cd test
22 $ echo '[web]' > .hg/hgrc
17 $ echo '[web]' > .hg/hgrc
23 $ echo 'accesslog = access.log' >> .hg/hgrc
18 $ echo 'accesslog = access.log' >> .hg/hgrc
24 $ echo "port = $HGPORT1" >> .hg/hgrc
19 $ echo "port = $HGPORT1" >> .hg/hgrc
25
20
26 Without -v
21 Without -v
27
22
28 $ hg serve -a localhost -p $HGPORT -d --pid-file=hg.pid -E errors.log
23 $ hg serve -a localhost -p $HGPORT -d --pid-file=hg.pid -E errors.log
29 $ cat hg.pid >> "$DAEMON_PIDS"
24 $ cat hg.pid >> "$DAEMON_PIDS"
30 $ if [ -f access.log ]; then
25 $ if [ -f access.log ]; then
31 > echo 'access log created - .hg/hgrc respected'
26 > echo 'access log created - .hg/hgrc respected'
32 > fi
27 > fi
33 access log created - .hg/hgrc respected
28 access log created - .hg/hgrc respected
34
29
35 errors
30 errors
36
31
37 $ cat errors.log
32 $ cat errors.log
38
33
39 With -v
34 With -v
40
35
41 $ hgserve
36 $ hgserve
42 listening at http://localhost/ (bound to 127.0.0.1:HGPORT1)
37 listening at http://localhost/ (bound to 127.0.0.1:HGPORT1)
43 % errors
38 % errors
44
39
45 With -v and -p HGPORT2
40 With -v and -p HGPORT2
46
41
47 $ hgserve -p "$HGPORT2"
42 $ hgserve -p "$HGPORT2"
48 listening at http://localhost/ (bound to 127.0.0.1:HGPORT2)
43 listening at http://localhost/ (bound to 127.0.0.1:HGPORT2)
49 % errors
44 % errors
50
45
51 With -v and -p daytime (should fail because low port)
46 With -v and -p daytime (should fail because low port)
52
47
53 $ KILLQUIETLY=Y
48 $ KILLQUIETLY=Y
54 $ hgserve -p daytime
49 $ hgserve -p daytime
55 abort: cannot start server at 'localhost:13': Permission denied
50 abort: cannot start server at 'localhost:13': Permission denied
56 abort: child process failed to start
51 abort: child process failed to start
57 % errors
52 % errors
58 $ KILLQUIETLY=N
53 $ KILLQUIETLY=N
59
54
60 With --prefix foo
55 With --prefix foo
61
56
62 $ hgserve --prefix foo
57 $ hgserve --prefix foo
63 listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1)
58 listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1)
64 % errors
59 % errors
65
60
66 With --prefix /foo
61 With --prefix /foo
67
62
68 $ hgserve --prefix /foo
63 $ hgserve --prefix /foo
69 listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1)
64 listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1)
70 % errors
65 % errors
71
66
72 With --prefix foo/
67 With --prefix foo/
73
68
74 $ hgserve --prefix foo/
69 $ hgserve --prefix foo/
75 listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1)
70 listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1)
76 % errors
71 % errors
77
72
78 With --prefix /foo/
73 With --prefix /foo/
79
74
80 $ hgserve --prefix /foo/
75 $ hgserve --prefix /foo/
81 listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1)
76 listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1)
82 % errors
77 % errors
83
78
84 $ cd ..
79 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now