-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9866624
commit 8296036
Showing
2 changed files
with
32 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
DIR=$(dirname "$0") | ||
export JGRAB_HOME="$DIR/.jgrab" | ||
mkdir "$JGRAB_HOME" | ||
cp "$DIR"/../jgrab-runner/build/libs/jgrab.jar "$JGRAB_HOME"/jgrab.jar | ||
ls -al "$JGRAB_HOME" | ||
jgrab="$DIR"/target/debug/jgrab-client | ||
|
||
# start the daemon | ||
$jgrab -t | ||
|
||
result=$($jgrab -e "2 + 2") | ||
|
||
if test "$result" = "4" | ||
then | ||
echo "OK" | ||
else | ||
echo "Failed, result is not 4: $result" | ||
exit 1 | ||
fi | ||
|
||
# cleanup | ||
$jgrab -s | ||
|
||
# on Windows, the Java process may not die quickly enough | ||
sleep 1 | ||
|
||
rm -r "$JGRAB_HOME" |