-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path081_runSwingModuleClasses.sh
28 lines (24 loc) · 1.07 KB
/
081_runSwingModuleClasses.sh
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
26
27
#!/bin/bash
set -ex
set -o pipefail
## resolve folder of this script, following all symlinks,
## http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in
SCRIPT_SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SCRIPT_SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
SCRIPT_DIR="$( cd -P "$( dirname "$SCRIPT_SOURCE" )" && pwd )"
SCRIPT_SOURCE="$(readlink "$SCRIPT_SOURCE")"
# if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
[[ $SCRIPT_SOURCE != /* ]] && SCRIPT_SOURCE="$SCRIPT_DIR/$SCRIPT_SOURCE"
done
readonly SCRIPT_DIR="$( cd -P "$( dirname "$SCRIPT_SOURCE" )" && pwd )"
source "$SCRIPT_DIR/testlib.bash"
parseArguments "$@"
processArguments
setup
skipOnHeadless
skipOnGithubActions
# we are all good on headless, and even have swing compiled, now run it
runModule swinghello/org.jlink.swingdemo.SwingHello 2>&1| tee "$REPORT_FILE"
# warning, the exception is from different thread, so program terminates via zero!
assertSwingHello
assertNoExceptionInReportFile