mirror of https://github.com/ceph/go-ceph
entrypoint: wrap main code in a function
As preparation for upcoming changes, move the main code of entrypoint.sh into functions. Best viewed by ignore whitespace. Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
parent
176e6cc198
commit
25bd9f0bed
|
@ -51,13 +51,14 @@ while true ; do
|
|||
esac
|
||||
done
|
||||
|
||||
mkdir -p /tmp/ceph
|
||||
"${MICRO_OSD_PATH}" /tmp/ceph
|
||||
export CEPH_CONF=/tmp/ceph/ceph.conf
|
||||
test_go_ceph() {
|
||||
mkdir -p /tmp/ceph
|
||||
"${MICRO_OSD_PATH}" /tmp/ceph
|
||||
export CEPH_CONF=/tmp/ceph/ceph.conf
|
||||
|
||||
if [[ ${TEST_RUN} == NONE ]]; then
|
||||
if [[ ${TEST_RUN} == NONE ]]; then
|
||||
echo "skipping test execution"
|
||||
else
|
||||
else
|
||||
go get -t -v ./...
|
||||
diff -u <(echo -n) <(gofmt -d -s .)
|
||||
#go vet ./...
|
||||
|
@ -89,8 +90,14 @@ else
|
|||
done
|
||||
mkdir -p /results/coverage
|
||||
go tool cover -html=cover.out -o /results/coverage/go-ceph.html
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ ${PAUSE} = yes ]]; then
|
||||
pause_if_needed() {
|
||||
if [[ ${PAUSE} = yes ]]; then
|
||||
sleep infinity
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
test_go_ceph
|
||||
pause_if_needed
|
||||
|
|
Loading…
Reference in New Issue