Repository: camel Updated Branches: refs/heads/master 76e3eeb08 -> d5118addc
CAMEL-11130: Improve kill-karaf.sh so it doesn't fail even if there is no Karaf process on CI server Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d5118add Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d5118add Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d5118add Branch: refs/heads/master Commit: d5118addca1563e725dee3ec55f9de2c40caee32 Parents: 76e3eeb Author: Tadayoshi Sato <sato.tadayo...@gmail.com> Authored: Thu Apr 13 19:13:31 2017 +0900 Committer: Tadayoshi Sato <sato.tadayo...@gmail.com> Committed: Thu Apr 13 19:13:31 2017 +0900 ---------------------------------------------------------------------- tests/camel-itest-karaf/kill-karaf.sh | 7 ++++++- tests/camel-itest-osgi/kill-karaf.sh | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/d5118add/tests/camel-itest-karaf/kill-karaf.sh ---------------------------------------------------------------------- diff --git a/tests/camel-itest-karaf/kill-karaf.sh b/tests/camel-itest-karaf/kill-karaf.sh index c1b709b..7933ff9 100755 --- a/tests/camel-itest-karaf/kill-karaf.sh +++ b/tests/camel-itest-karaf/kill-karaf.sh @@ -17,8 +17,13 @@ ## limitations under the License. ## --------------------------------------------------------------------------- +XARGS_OPTIONS="-t -n1" +if [ `uname` = "Linux" ]; then + XARGS_OPTIONS="$XARGS_OPTIONS --no-run-if-empty" +fi + echo "Listing all karaf processes" jps -l | grep karaf echo "Killing all karaf processes" -jps -l | grep karaf | cut -d ' ' -f 1 | xargs -n1 kill \ No newline at end of file +jps -l | grep karaf | cut -d ' ' -f 1 | xargs $XARGS_OPTIONS kill http://git-wip-us.apache.org/repos/asf/camel/blob/d5118add/tests/camel-itest-osgi/kill-karaf.sh ---------------------------------------------------------------------- diff --git a/tests/camel-itest-osgi/kill-karaf.sh b/tests/camel-itest-osgi/kill-karaf.sh index c1b709b..7933ff9 100755 --- a/tests/camel-itest-osgi/kill-karaf.sh +++ b/tests/camel-itest-osgi/kill-karaf.sh @@ -17,8 +17,13 @@ ## limitations under the License. ## --------------------------------------------------------------------------- +XARGS_OPTIONS="-t -n1" +if [ `uname` = "Linux" ]; then + XARGS_OPTIONS="$XARGS_OPTIONS --no-run-if-empty" +fi + echo "Listing all karaf processes" jps -l | grep karaf echo "Killing all karaf processes" -jps -l | grep karaf | cut -d ' ' -f 1 | xargs -n1 kill \ No newline at end of file +jps -l | grep karaf | cut -d ' ' -f 1 | xargs $XARGS_OPTIONS kill