Enhancing STC and scenarios.
Change-Id: I57a4d25b7fb726a1242073055474ff5c7c3c1087
diff --git a/tools/test/bin/stc-launcher b/tools/test/bin/stc-launcher
index 3ef661e..d5da4f1 100755
--- a/tools/test/bin/stc-launcher
+++ b/tools/test/bin/stc-launcher
@@ -2,4 +2,22 @@
#-------------------------------------------------------------------------------
# System Test Coordinator process launcher
#-------------------------------------------------------------------------------
+
+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