/[jscoverage]/trunk/tests/store-unreadable-json.sh
ViewVC logotype

Diff of /trunk/tests/store-unreadable-json.sh

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

revision 181 by siliconforks, Sun Sep 21 18:42:02 2008 UTC revision 570 by siliconforks, Mon May 24 03:13:28 2010 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/sh
2  #    store-unreadable-json.sh - test store when jscoverage.json is not readable  #    store-unreadable-json.sh - test store when jscoverage.json is not readable
3  #    Copyright (C) 2008 siliconforks.com  #    Copyright (C) 2008, 2009, 2010 siliconforks.com
4  #  #
5  #    This program is free software; you can redistribute it and/or modify  #    This program is free software; you can redistribute it and/or modify
6  #    it under the terms of the GNU General Public License as published by  #    it under the terms of the GNU General Public License as published by
# Line 18  Line 18 
18    
19  set -e  set -e
20    
21    . ./common.sh
22    
23  # skip on windows  # skip on windows
24  uname=`uname`  uname=`uname`
25  case "$uname" in  case "$uname" in
# Line 37  Line 39 
39    
40  trap 'cleanup' 0 1 2 3 15  trap 'cleanup' 0 1 2 3 15
41    
 export PATH=.:..:../js:$PATH  
   
 if [ -z "$VALGRIND" ]  
 then  
   delay=0.2  
 else  
   delay=2  
 fi  
   
42  rm -fr DIR  rm -fr DIR
43  $VALGRIND jscoverage-server --no-highlight --document-root=recursive --report-dir=DIR > OUT 2> ERR &  $VALGRIND jscoverage-server --no-highlight --document-root=recursive --report-dir=DIR > OUT 2> ERR &
44  server_pid=$!  server_pid=$!
45  server_port=8080  server_port=8080
46    
47  sleep $delay  wait_for_server http://127.0.0.1:8080/jscoverage.html
48    
49  cat store.json | sed "s/@PREFIX@/\\//g" > TMP  cat store.json | sed "s/@PREFIX@/\\//g" > TMP
50  wget --post-file=TMP -q -O- http://127.0.0.1:8080/jscoverage-store > /dev/null  wget --post-file=TMP -q -O- http://127.0.0.1:8080/jscoverage-store > /dev/null
51  cat store.expected.json | sed "s/@PREFIX@/\\//g" > TMP  cat store.expected.json | sed "s/@PREFIX@/\\//g" > TMP
52  js json-cmp.js TMP DIR/jscoverage.json  json_cmp TMP DIR/jscoverage.json
53    
54  chmod -r DIR/jscoverage.json  chmod -r DIR/jscoverage.json
55    

Legend:
Removed from v.181  
changed lines
  Added in v.570

  ViewVC Help
Powered by ViewVC 1.1.24