| author | Yves-Marie Haussonne <ymh.work+github@gmail.com> |
| Fri, 09 May 2014 18:34:46 +0200 | |
| changeset 655 | cac6781d8b7f |
| parent 642 | 5d037d947cd6 |
| permissions | -rwxr-xr-x |
|
609
736fdedb7774
clean the test-suite folder. create necessary files in dev env
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
1 |
#!/bin/bash |
|
736fdedb7774
clean the test-suite folder. create necessary files in dev env
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
2 |
|
|
736fdedb7774
clean the test-suite folder. create necessary files in dev env
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
3 |
echo "---------------------" |
|
736fdedb7774
clean the test-suite folder. create necessary files in dev env
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
4 |
echo "Starting test server" |
|
736fdedb7774
clean the test-suite folder. create necessary files in dev env
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
5 |
|
|
736fdedb7774
clean the test-suite folder. create necessary files in dev env
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
6 |
DEV_FOLDER="<%= @vagrant_base_path %>" |
|
736fdedb7774
clean the test-suite folder. create necessary files in dev env
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
7 |
|
|
736fdedb7774
clean the test-suite folder. create necessary files in dev env
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
8 |
pushd "$DEV_FOLDER" > /dev/null |
|
628
ecf0e467eeb8
adapt dev enviromenent to the new test-suite location
ymh <ymh.work@gmail.com>
parents:
609
diff
changeset
|
9 |
vagrant ssh -c "/srv/comt/test-suite/start-testserver.sh" |
|
609
736fdedb7774
clean the test-suite folder. create necessary files in dev env
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
10 |
popd > /dev/null |
|
736fdedb7774
clean the test-suite folder. create necessary files in dev env
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
11 |
|
|
736fdedb7774
clean the test-suite folder. create necessary files in dev env
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
12 |
|
|
642
5d037d947cd6
Integrate last change on test suite. rename specific files
ymh <ymh.work@gmail.com>
parents:
628
diff
changeset
|
13 |
TESTSERVER_STARTED=True |
|
5d037d947cd6
Integrate last change on test suite. rename specific files
ymh <ymh.work@gmail.com>
parents:
628
diff
changeset
|
14 |
WORKSPACE_INFO="workspace.info.dev.js" |
|
609
736fdedb7774
clean the test-suite folder. create necessary files in dev env
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
15 |
|
|
736fdedb7774
clean the test-suite folder. create necessary files in dev env
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
16 |
echo "---------------------" |
|
736fdedb7774
clean the test-suite folder. create necessary files in dev env
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
17 |
echo "Starting karma tests" |
|
642
5d037d947cd6
Integrate last change on test suite. rename specific files
ymh <ymh.work@gmail.com>
parents:
628
diff
changeset
|
18 |
. ./start-test-suite.sh ./karma.conf.dev.js $@ |
|
609
736fdedb7774
clean the test-suite folder. create necessary files in dev env
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
19 |
|
|
736fdedb7774
clean the test-suite folder. create necessary files in dev env
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
20 |
echo "---------------------" |
|
736fdedb7774
clean the test-suite folder. create necessary files in dev env
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
21 |
echo "stopping test server + output test server logs" |
|
736fdedb7774
clean the test-suite folder. create necessary files in dev env
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
22 |
|
|
642
5d037d947cd6
Integrate last change on test suite. rename specific files
ymh <ymh.work@gmail.com>
parents:
628
diff
changeset
|
23 |
read -p "Keep testserver (PID $TESTSERVER_PID) running ? (y/N)" -n 1 -r -t 5 |
|
5d037d947cd6
Integrate last change on test suite. rename specific files
ymh <ymh.work@gmail.com>
parents:
628
diff
changeset
|
24 |
echo # (optional) move to a new line |
|
5d037d947cd6
Integrate last change on test suite. rename specific files
ymh <ymh.work@gmail.com>
parents:
628
diff
changeset
|
25 |
|
|
5d037d947cd6
Integrate last change on test suite. rename specific files
ymh <ymh.work@gmail.com>
parents:
628
diff
changeset
|
26 |
if [[ $REPLY =~ ^[Yy]$ ]]; then |
|
5d037d947cd6
Integrate last change on test suite. rename specific files
ymh <ymh.work@gmail.com>
parents:
628
diff
changeset
|
27 |
exit 0 |
|
5d037d947cd6
Integrate last change on test suite. rename specific files
ymh <ymh.work@gmail.com>
parents:
628
diff
changeset
|
28 |
fi |
|
5d037d947cd6
Integrate last change on test suite. rename specific files
ymh <ymh.work@gmail.com>
parents:
628
diff
changeset
|
29 |
|
|
609
736fdedb7774
clean the test-suite folder. create necessary files in dev env
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
30 |
pushd "$DEV_FOLDER" > /dev/null |
|
628
ecf0e467eeb8
adapt dev enviromenent to the new test-suite location
ymh <ymh.work@gmail.com>
parents:
609
diff
changeset
|
31 |
vagrant ssh -c "/srv/comt/test-suite/clean-testserver.sh" |
|
609
736fdedb7774
clean the test-suite folder. create necessary files in dev env
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
32 |
popd /dev/null |