/[jscoverage]/trunk/tests/server.sh
ViewVC logotype

Diff of /trunk/tests/server.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 114 by siliconforks, Sat May 31 21:39:39 2008 UTC revision 218 by siliconforks, Fri Oct 3 02:27:00 2008 UTC
# Line 18  Line 18 
18    
19  set -e  set -e
20    
21  function shutdown() {  shutdown() {
22    wget -q -O- --post-data= "http://127.0.0.1:${server_port}/jscoverage-shutdown" > /dev/null    wget -q -O- --post-data= "http://127.0.0.1:${server_port}/jscoverage-shutdown" > /dev/null
23    wait $server_pid    wait $server_pid
24  }  }
25    
26  function cleanup() {  cleanup() {
27    rm -fr EXPECTED ACTUAL DIR OUT    rm -fr EXPECTED ACTUAL DIR OUT
28    # kill $server_pid    # kill $server_pid
29    shutdown    shutdown
# Line 42  Line 42 
42    
43  rm -fr EXPECTED DIR OUT  rm -fr EXPECTED DIR OUT
44  mkdir DIR  mkdir DIR
45  $VALGRIND jscoverage-server --document-root=recursive --report-dir=DIR &  $VALGRIND jscoverage-server --no-highlight --document-root=recursive --report-dir=DIR &
46  server_pid=$!  server_pid=$!
47  server_port=8080  server_port=8080
48    
# Line 53  Line 53 
53  wget -q -O- http://127.0.0.1:8080/unix.txt | diff recursive/unix.txt -  wget -q -O- http://127.0.0.1:8080/unix.txt | diff recursive/unix.txt -
54  wget -q -O- http://127.0.0.1:8080/windows.txt | diff recursive/windows.txt -  wget -q -O- http://127.0.0.1:8080/windows.txt | diff recursive/windows.txt -
55  wget -q -O- http://127.0.0.1:8080/image.png | diff recursive/image.png -  wget -q -O- http://127.0.0.1:8080/image.png | diff recursive/image.png -
56    wget -q -O- http://127.0.0.1:8080/x | diff recursive/x -
57  wget -q -O- http://127.0.0.1:8080/1/1.html | diff recursive/1/1.html -  wget -q -O- http://127.0.0.1:8080/1/1.html | diff recursive/1/1.html -
58  wget -q -O- http://127.0.0.1:8080/1/1.css | diff recursive/1/1.css -  wget -q -O- http://127.0.0.1:8080/1/1.css | diff recursive/1/1.css -
59  wget -q -O- http://127.0.0.1:8080/1/2/2.html | diff recursive/1/2/2.html -  wget -q -O- http://127.0.0.1:8080/1/2/2.html | diff recursive/1/2/2.html -
# Line 63  Line 64 
64    
65  # test javascript  # test javascript
66  wget -q -O- http://127.0.0.1:8080/script.js > OUT  wget -q -O- http://127.0.0.1:8080/script.js > OUT
67  cat recursive.expected/script.js ../report.js | sed 's/@PREFIX@/\//g' | diff - OUT  cat ../report.js recursive.expected/script.js | sed 's/@PREFIX@/\//g' | diff - OUT
68  wget -q -O- http://127.0.0.1:8080/1/1.js > OUT  wget -q -O- http://127.0.0.1:8080/1/1.js > OUT
69  cat recursive.expected/1/1.js ../report.js | sed 's/@PREFIX@/\//g' | diff - OUT  cat ../report.js recursive.expected/1/1.js | sed 's/@PREFIX@/\//g' | diff - OUT
70  wget -q -O- http://127.0.0.1:8080/1/2/2.js > OUT  wget -q -O- http://127.0.0.1:8080/1/2/2.js > OUT
71  cat recursive.expected/1/2/2.js ../report.js | sed 's/@PREFIX@/\//g' | diff - OUT  cat ../report.js recursive.expected/1/2/2.js | sed 's/@PREFIX@/\//g' | diff - OUT
72    
73  # test jscoverage  # test jscoverage
74  wget -q -O- http://127.0.0.1:8080/jscoverage.html | diff ../jscoverage.html -  wget -q -O- http://127.0.0.1:8080/jscoverage.html | diff ../jscoverage.html -
# Line 82  Line 83 
83  diff ../jscoverage.html DIR/jscoverage.html  diff ../jscoverage.html DIR/jscoverage.html
84  diff ../jscoverage.css DIR/jscoverage.css  diff ../jscoverage.css DIR/jscoverage.css
85  diff ../jscoverage-throbber.gif DIR/jscoverage-throbber.gif  diff ../jscoverage-throbber.gif DIR/jscoverage-throbber.gif
 diff ../jscoverage-sh_main.js DIR/jscoverage-sh_main.js  
 diff ../jscoverage-sh_javascript.js DIR/jscoverage-sh_javascript.js  
 diff ../jscoverage-sh_nedit.css DIR/jscoverage-sh_nedit.css  
86  echo -e 'jscoverage_isReport = true;\r' | cat ../jscoverage.js - | diff - DIR/jscoverage.js  echo -e 'jscoverage_isReport = true;\r' | cat ../jscoverage.js - | diff - DIR/jscoverage.js
87    
88  # 404 not found  # 404 not found
# Line 110  Line 108 
108    
109  rm -fr DIR  rm -fr DIR
110  mkdir DIR  mkdir DIR
111  $VALGRIND jscoverage-server --port=8081 --document-root=recursive --report-dir=DIR --no-instrument=/1/ &  case `uname` in
112      MINGW*)
113        $VALGRIND jscoverage-server --no-highlight --port=8081 --document-root=recursive --report-dir=DIR --no-instrument=1/ &
114        ;;
115      *)
116        $VALGRIND jscoverage-server --no-highlight --port=8081 --document-root=recursive --report-dir=DIR --no-instrument=/1/ &
117        ;;
118    esac
119  server_pid=$!  server_pid=$!
120  server_port=8081  server_port=8081
121    
122  sleep $delay  sleep $delay
123    
124  wget -q -O- http://127.0.0.1:8081/script.js > OUT  wget -q -O- http://127.0.0.1:8081/script.js > OUT
125  cat recursive.expected/script.js ../report.js | sed 's/@PREFIX@/\//g' | diff - OUT  cat ../report.js recursive.expected/script.js | sed 's/@PREFIX@/\//g' | diff - OUT
126  wget -q -O- http://127.0.0.1:8081/1/1.js | diff recursive/1/1.js -  wget -q -O- http://127.0.0.1:8081/1/1.js | diff recursive/1/1.js -
127  wget -q -O- http://127.0.0.1:8081/1/2/2.js | diff recursive/1/2/2.js -  wget -q -O- http://127.0.0.1:8081/1/2/2.js | diff recursive/1/2/2.js -
128    
129  # kill $server_pid  # kill $server_pid
130  shutdown  shutdown
131    
132  $VALGRIND jscoverage-server --port 8082 --document-root recursive --report-dir DIR --no-instrument 1/ &  $VALGRIND jscoverage-server --no-highlight --port 8082 --document-root recursive --report-dir DIR --no-instrument 1/ &
133  server_pid=$!  server_pid=$!
134  server_port=8082  server_port=8082
135    
136  sleep $delay  sleep $delay
137    
138  wget -q -O- http://127.0.0.1:8082/script.js > OUT  wget -q -O- http://127.0.0.1:8082/script.js > OUT
139  cat recursive.expected/script.js ../report.js | sed 's/@PREFIX@/\//g' | diff - OUT  cat ../report.js recursive.expected/script.js | sed 's/@PREFIX@/\//g' | diff - OUT
140  wget -q -O- http://127.0.0.1:8082/1/1.js | diff recursive/1/1.js -  wget -q -O- http://127.0.0.1:8082/1/1.js | diff recursive/1/1.js -
141  wget -q -O- http://127.0.0.1:8082/1/2/2.js | diff recursive/1/2/2.js -  wget -q -O- http://127.0.0.1:8082/1/2/2.js | diff recursive/1/2/2.js -

Legend:
Removed from v.114  
changed lines
  Added in v.218

  ViewVC Help
Powered by ViewVC 1.1.24