aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/onos/tools/test/bin/stc-launcher
blob: 6e473cdf4bc75a37ae20a49bf9ce82ba8ca997e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
#-------------------------------------------------------------------------------
#   System Test Coordinator process launcher
#-------------------------------------------------------------------------------

#sleep 5 && exit 0;

env=$1 && shift
cwd=$1 && shift

if [ $env != "-" -a $env != "~" ]; then
    [ ! -f $env ] && echo "$env file not found" && exit 1
    source $env
fi

if [ $cwd != "-" ]; then
    [ ! -d $cwd ] && echo "$cwd directory not found" && exit 1
    cd $cwd
fi

"$@" 2>&1
status=$?

[ $env != "~" ] && exit $status
exit 0