1 |
#!/bin/sh |
#!/bin/sh |
2 |
# store-source-not-found.sh - test store with JavaScript source not found |
# store-source-not-found.sh - test store with JavaScript source not found |
3 |
# Copyright (C) 2008 siliconforks.com |
# Copyright (C) 2008, 2009 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 |
18 |
|
|
19 |
set -e |
set -e |
20 |
|
|
21 |
function shutdown() { |
. ./common.sh |
22 |
|
|
23 |
|
shutdown() { |
24 |
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 |
25 |
wait $server_pid |
wait $server_pid |
26 |
} |
} |
27 |
|
|
28 |
function cleanup() { |
cleanup() { |
29 |
shutdown |
shutdown |
30 |
} |
} |
31 |
|
|
32 |
trap 'cleanup' 0 1 2 3 15 |
trap 'cleanup' 0 1 2 3 15 |
33 |
|
|
|
export PATH=.:..:../js:$PATH |
|
|
|
|
34 |
if [ -z "$VALGRIND" ] |
if [ -z "$VALGRIND" ] |
35 |
then |
then |
36 |
delay=0.2 |
delay=0.2 |
46 |
sleep $delay |
sleep $delay |
47 |
|
|
48 |
wget --post-file=store-source-not-found.json -q -O- http://127.0.0.1:8080/jscoverage-store > /dev/null |
wget --post-file=store-source-not-found.json -q -O- http://127.0.0.1:8080/jscoverage-store > /dev/null |
49 |
js json-cmp.js store-source-not-found.expected.json DIR/jscoverage.json |
json_cmp store-source-not-found.expected.json DIR/jscoverage.json |
50 |
diff store-source-not-found.expected.err ERR |
diff --strip-trailing-cr store-source-not-found.expected.err ERR |