Commit 2afdff6b authored by Arpad Lovassy's avatar Arpad Lovassy
Browse files

fixed indentation


Signed-off-by: Arpad Lovassy's avatarzlovarp <arpad.lovassy@semcon.com>
parent 5aa8b31d
###############################################################################
# Copyright (c) 2000-2019 Ericsson Telecom AB
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v2.0
# which accompanies this distribution, and is available at
# https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
#
# Contributors:
# Lovassy, Arpad
#
###############################################################################
# EDIT THESE LINES TO SET CORRECT JAR LOCATIONS
#---------------------------------------------------------------------
# DO NOT EDIT AFTER THIS LINE
# check if JAVA exists
# http://stackoverflow.com/questions/7334754/correct-way-to-check-java-version-from-bash-script
if type -p java; then
echo found java executable in PATH
_java=java
elif [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then
echo found java executable in JAVA_HOME
_java="$JAVA_HOME/bin/java"
else
echo "no java, exiting"; exit 1;
fi
# check java version (>=1.7)
if [[ "$_java" ]]; then
version=$("$_java" -version 2>&1 | awk -F '"' '/version/ {print $2}')
echo version "$version"
if [[ "$version" > "1.7" ]]; then
echo "version is at least 1.7, OK";
else
echo "version is less than 1.7, NOT OK, exiting"; exit 1;
fi
fi
# check java version (>=1.7) in another way
[ $(java -version 2>&1 | sed 's/java version "\(.*\)\.\(.*\)\..*"/\1\2/; 1q') -ge 17 ] && echo "version is at least 1.7, OK" || { echo "version is less than 1.7, NOT OK, exiting"; exit 1; }
# checks if file exists, exits if not
# @param $1 file full path
function file_exist {
[ -f "$1" ] && echo "$1 FOUND, OK" || { echo "$1 NOT FOUND, exiting"; exit 1; }
}
# checks if directory exists, exits if not
# @param $1 directory full path
function dir_exist {
[ -d "$1" ] && echo "$1 DIRECTORY FOUND, OK" || { echo "$1 DIRECTORY NOT FOUND, exiting"; exit 1; }
}
# check TITAN dependencies
[ ! -z "${TTCN3_DIR}" ] && echo "\$TTCN3_DIR is set to ${TTCN3_DIR}, OK" \
|| { echo "\$TTCN3_DIR is not set, NOT OK, exiting"; exit 1; }
dir_exist ${TTCN3_DIR}
file_exist ${TTCN3_DIR}/lib/libmctrjninative.so
[[ "${LD_LIBRARY_PATH}" == *"${TTCN3_DIR}/lib"* ]] && echo "\$TTCN3_DIR/lib is added to \$LD_LIBRARY_PATH=${LD_LIBRARY_PATH}, OK" \
|| { echo "\$TTCN3_DIR is NOT added to \$LD_LIBRARY_PATH=${LD_LIBRARY_PATH}, NOT OK, exiting"; exit 1; }
# make sure, that the demo is compiled, which is cleaned in make install
pushd ${TTCN3_DIR}/demo
make
popd
file_exist ${TTCN3_DIR}/demo/MyExample
# Check if HelloWorld demo binary is compiled in parallel mode: output of MyExample -v contains "(parallel mode)"
[ `${TTCN3_DIR}/demo/MyExample -v 2>&1 | grep "(parallel mode)" | wc -l` != 0 ] && echo "${TTCN3_DIR}/demo/MyExample is compiled in parallel mode, OK" \
|| { echo "${TTCN3_DIR}/demo/MyExample is compiled in single mode, NOT in parallel mode, NOT OK, exiting"; exit 1; }
# run demo (and build its dependencies if needed)
BASEDIR=$(dirname $0)
echo BASEDIR: $BASEDIR
ant \
-f $BASEDIR/build.xml \
Main
...@@ -168,7 +168,7 @@ public class DemoFrame extends JFrame { ...@@ -168,7 +168,7 @@ public class DemoFrame extends JFrame {
} }
mVerdicts = null; mVerdicts = null;
// Showing “JOptionPane.showMessageDialog” without stopping flow of execution, // Showing OptionPane.showMessageDialog without stopping flow of execution,
// this line would block the thread: // this line would block the thread:
//JOptionPane.showMessageDialog(DemoFrame.this, sb.toString(), "Verdict statistics", JOptionPane.INFORMATION_MESSAGE); //JOptionPane.showMessageDialog(DemoFrame.this, sb.toString(), "Verdict statistics", JOptionPane.INFORMATION_MESSAGE);
EventQueue.invokeLater(new Runnable(){ EventQueue.invokeLater(new Runnable(){
...@@ -1016,7 +1016,7 @@ public class DemoFrame extends JFrame { ...@@ -1016,7 +1016,7 @@ public class DemoFrame extends JFrame {
*/ */
private void addVerdict(final String aTestcase, final VerdictTypeEnum aVerdictType) { private void addVerdict(final String aTestcase, final VerdictTypeEnum aVerdictType) {
if ( mVerdicts == null ) { if ( mVerdicts == null ) {
mVerdicts = new ArrayList<>(); mVerdicts = new ArrayList<Verdict>();
} }
Verdict v = new Verdict(); Verdict v = new Verdict();
v.mTestcase = aTestcase; v.mTestcase = aTestcase;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment