/[jscoverage]/trunk/tests/store-bad-response-headers.sh
ViewVC logotype

Diff of /trunk/tests/store-bad-response-headers.sh

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

revision 609 by siliconforks, Mon May 24 03:13:28 2010 UTC revision 610 by siliconforks, Fri Sep 24 20:35:36 2010 UTC
# Line 33  Line 33 
33  trap 'cleanup' 0 1 2 3 15  trap 'cleanup' 0 1 2 3 15
34    
35  rm -fr DIR  rm -fr DIR
36  $VALGRIND jscoverage-server --proxy --report-dir=DIR > OUT 2> ERR &  server_port=`perl unused-port.pl`
37    $VALGRIND jscoverage-server --port=$server_port --proxy --report-dir=DIR > OUT 2> ERR &
38  server_pid=$!  server_pid=$!
39  server_port=8080  origin_server_port=`perl unused-port.pl`
40  ./http-server-bad-headers &  ./http-server-bad-headers $origin_server_port &
41  origin_server_pid=$!  origin_server_pid=$!
42    
43  wait_for_server http://127.0.0.1:8080/jscoverage.html  wait_for_server http://127.0.0.1:${server_port}/jscoverage.html
44  wait_for_server http://127.0.0.1:8000/ping  wait_for_server http://127.0.0.1:${origin_server_port}/ping
45    
46  # server sending malformed headers  # server sending malformed headers
47  cat store.json | sed "s/@PREFIX@/http:\\/\\/127.0.0.1:8000\\//g" > TMP  cat store.json | sed "s/@PREFIX@/http:\\/\\/127.0.0.1:${origin_server_port}\\//g" > TMP
48  wget --post-file=TMP -q -O- -e 'http_proxy=http://127.0.0.1:8080/' http://127.0.0.1:8000/jscoverage-store > /dev/null  wget --post-file=TMP -q -O- -e "http_proxy=http://127.0.0.1:${server_port}/" http://127.0.0.1:${origin_server_port}/jscoverage-store > /dev/null
49  json_cmp store-source-urls.expected.json DIR/jscoverage.json  cat store-source-urls.expected.json  | sed "s/@PREFIX@/http:\\/\\/127.0.0.1:${origin_server_port}\\//g" > TMP
50    json_cmp TMP DIR/jscoverage.json
51  sort ERR -o ERR  sort ERR -o ERR
52  diff --strip-trailing-cr store-source-urls.expected.err ERR  cat store-source-urls.expected.err  | sed "s/@PREFIX@/http:\\/\\/127.0.0.1:${origin_server_port}\\//g" > TMP
53    diff --strip-trailing-cr TMP ERR

Legend:
Removed from v.609  
changed lines
  Added in v.610

  ViewVC Help
Powered by ViewVC 1.1.24