Skip to content

Commit 00fe24c

Browse files
committed
tests(Makefile): add test-style shellcheck target
1 parent 07d1a27 commit 00fe24c

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

Makefile

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ IMAGE_PREFIX ?= deis
88

99
include versioning.mk
1010

11+
SHELL_SCRIPTS = $(wildcard _scripts/*.sh) rootfs/bin/backup rootfs/bin/is_running
12+
13+
# The following variables describe the containerized development environment
14+
# and other build options
15+
DEV_ENV_IMAGE := quay.io/deis/go-dev:0.11.0
16+
DEV_ENV_WORK_DIR := /go/src/${REPO_PATH}
17+
DEV_ENV_CMD := docker run --rm -v ${CURDIR}:${DEV_ENV_WORK_DIR} -w ${DEV_ENV_WORK_DIR} ${DEV_ENV_IMAGE}
18+
DEV_ENV_CMD_INT := docker run -it --rm -v ${CURDIR}:${DEV_ENV_WORK_DIR} -w ${DEV_ENV_WORK_DIR} ${DEV_ENV_IMAGE}
19+
1120
all: docker-build docker-push
1221

1322
# For cases where we're building from local
@@ -16,7 +25,15 @@ docker-build:
1625
docker build --rm -t ${IMAGE} rootfs
1726
docker tag -f ${IMAGE} ${MUTABLE_IMAGE}
1827

19-
test:
28+
test: test-style test-unit test-functional
29+
30+
test-style:
31+
${DEV_ENV_CMD} shellcheck $(SHELL_SCRIPTS)
32+
33+
test-unit:
34+
@echo "Implement functional tests in _tests directory"
35+
36+
test-functional:
2037
contrib/ci/test.sh ${IMAGE}
2138

2239
.PHONY: all docker-build docker-push test

0 commit comments

Comments
 (0)