Switch to unified view

a/run_tests b/run_tests
1
#!/bin/bash
1
#!/bin/bash
2
2
3
function check_port() {
4
    PORT=$1
5
    echo 'quit' |telnet localhost $PORT >/dev/null 2>&1
6
}
7
8
if [ -z "$VIRTUAL_ENV" ]; then
9
    source /var/local/env-allura/bin/activate
10
fi
11
12
# If this is sandbox and local SOLR isn't running, start it
13
if [ -n "$SF_SYSTEM_FUNC" ]; then
3
if [ -n "$SF_SYSTEM_FUNC" ]; then
14
    if ! check_port 50065; then
4
  if [ -z "$VIRTUAL_ENV" ]; then
15
        SOLRCONFIG="/var/local/allura/solr_config"
5
        source /var/local/env-allura/bin/activate
16
        SOLRLOG=/usr/local/solr/logs/console.log
6
  fi
17
        echo "Starting SOLR, log is at $SOLRLOG"
18
        pushd /usr/local/solr
19
        /usr/java/jdk1.5.0_15/bin/java -Dsolr.solr.home="$SOLRCONFIG" -jar start.jar >$SOLRLOG 2>&1 &
20
        popd
21
        sleep 15
22
    fi
23
fi
7
fi
24
8
25
# main
9
# main
26
10
27
if [ "$TEST_MODULES"  == "" ]; then
11
if [ "$TEST_MODULES"  == "" ]; then