Skip to content

Commit

Permalink
enhance: clean the local-persist after integration tests
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Li <lcy041536@gmail.com>
  • Loading branch information
shaloulcy committed May 24, 2018
1 parent 28d8937 commit 6a1128e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions hack/make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,21 @@ function install_local_persist
mv /tmp/local-persist /usr/local/bin/
}

# clean the local-persist
function clean_local_persist
{
echo "Try cleaning local-persist"
pid=`ps axu|grep local-persist |grep -v grep|awk '{print $2}'`

if [ -n "$pid" ]; then
echo "Try killing local-persist process"
kill -9 $pid
fi

echo "Try removing local-persist.sock"
rm -rf /var/run/docker/plugins/local-persist.sock
}

function install_nsenter
{
echo "Try installing nsenter"
Expand Down Expand Up @@ -269,6 +284,11 @@ function target
# If test is failed, print pouch daemon log.
set +e
$DIR/test/integration-test -test.v -check.v

# clean the local-persist
clean_local_persist


if (( $? != 0 )); then
echo "pouch daemon log:"
cat $TMP/log
Expand Down

0 comments on commit 6a1128e

Please sign in to comment.