##// END OF EJS Templates
test-serve: add missing globs...
Augie Fackler -
r29563:839380cc default
parent child Browse files
Show More
@@ -1,81 +1,81
1 #require serve
1 #require serve
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 > killdaemons.py hg.pid
12 > killdaemons.py hg.pid
13 > }
13 > }
14
14
15 $ hg init test
15 $ hg init test
16 $ cd test
16 $ cd test
17 $ echo '[web]' > .hg/hgrc
17 $ echo '[web]' > .hg/hgrc
18 $ echo 'accesslog = access.log' >> .hg/hgrc
18 $ echo 'accesslog = access.log' >> .hg/hgrc
19 $ echo "port = $HGPORT1" >> .hg/hgrc
19 $ echo "port = $HGPORT1" >> .hg/hgrc
20
20
21 Without -v
21 Without -v
22
22
23 $ 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
24 $ cat hg.pid >> "$DAEMON_PIDS"
24 $ cat hg.pid >> "$DAEMON_PIDS"
25 $ if [ -f access.log ]; then
25 $ if [ -f access.log ]; then
26 > echo 'access log created - .hg/hgrc respected'
26 > echo 'access log created - .hg/hgrc respected'
27 > fi
27 > fi
28 access log created - .hg/hgrc respected
28 access log created - .hg/hgrc respected
29
29
30 errors
30 errors
31
31
32 $ cat errors.log
32 $ cat errors.log
33
33
34 With -v
34 With -v
35
35
36 $ hgserve
36 $ hgserve
37 listening at http://localhost/ (bound to 127.0.0.1:HGPORT1)
37 listening at http://localhost/ (bound to 127.0.0.1:HGPORT1) (glob)
38 % errors
38 % errors
39
39
40 With -v and -p HGPORT2
40 With -v and -p HGPORT2
41
41
42 $ hgserve -p "$HGPORT2"
42 $ hgserve -p "$HGPORT2"
43 listening at http://localhost/ (bound to 127.0.0.1:HGPORT2)
43 listening at http://localhost/ (bound to 127.0.0.1:HGPORT2) (glob)
44 % errors
44 % errors
45
45
46 With -v and -p daytime (should fail because low port)
46 With -v and -p daytime (should fail because low port)
47
47
48 #if no-root
48 #if no-root
49 $ KILLQUIETLY=Y
49 $ KILLQUIETLY=Y
50 $ hgserve -p daytime
50 $ hgserve -p daytime
51 abort: cannot start server at 'localhost:13': Permission denied
51 abort: cannot start server at 'localhost:13': Permission denied
52 abort: child process failed to start
52 abort: child process failed to start
53 % errors
53 % errors
54 $ KILLQUIETLY=N
54 $ KILLQUIETLY=N
55 #endif
55 #endif
56
56
57 With --prefix foo
57 With --prefix foo
58
58
59 $ hgserve --prefix foo
59 $ hgserve --prefix foo
60 listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1)
60 listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1) (glob)
61 % errors
61 % errors
62
62
63 With --prefix /foo
63 With --prefix /foo
64
64
65 $ hgserve --prefix /foo
65 $ hgserve --prefix /foo
66 listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1)
66 listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1) (glob)
67 % errors
67 % errors
68
68
69 With --prefix foo/
69 With --prefix foo/
70
70
71 $ hgserve --prefix foo/
71 $ hgserve --prefix foo/
72 listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1)
72 listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1) (glob)
73 % errors
73 % errors
74
74
75 With --prefix /foo/
75 With --prefix /foo/
76
76
77 $ hgserve --prefix /foo/
77 $ hgserve --prefix /foo/
78 listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1)
78 listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1) (glob)
79 % errors
79 % errors
80
80
81 $ cd ..
81 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now