Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
shaloulcy committed May 24, 2018

Verified

This commit was signed with the committer’s verified signature. The key has expired.
kylekurz Kyle Kurz
1 parent 28d8937 commit d955b31
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion hack/make.sh
Original file line number Diff line number Diff line change
@@ -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"
@@ -269,7 +284,13 @@ function target
# If test is failed, print pouch daemon log.
set +e
$DIR/test/integration-test -test.v -check.v
if (( $? != 0 )); then

ci_result = $?

# clean the local-persist
clean_local_persist

if (( $ci_result != 0 )); then
echo "pouch daemon log:"
cat $TMP/log
return 1

0 comments on commit d955b31

Please sign in to comment.