monasca-analytics/Makefile
Joan Varvenne, Suksant Sae Lor and David Subiros Perez 93f184b4bf Monanas initial code release.
Co-Authored-By: Joan Varvenne <joan.varvenne@hpe.com>
Co-Authored-By: David Subiros Perez <david.perez5@hpe.com>
Co-Authored-By: Suksant Sae Lor <suksant.sae-lor@hpe.com>

Change-Id: Ib63c590d768648a46ecd007207fe8693b610af9a
2016-05-17 01:48:24 +01:00

31 lines
751 B
Makefile

ifeq (testspec,$(firstword $(MAKECMDGOALS)))
# use the rest as arguments for "run"
TEST_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
# ...and turn them into do-nothing targets
$(eval $(TEST_ARGS):;@:)
endif
PYTHON=python
all: test style
test:
$(PYTHON) -m unittest discover -v
testspec:
$(PYTHON) -m unittest -v $(TEST_ARGS)
clean:
find . -type f -name '*.pyc' -exec rm {} +
style:
find . -type f -name '*.py' -exec pep8 --max-line-length 79 {} +
start:
bash -c "sleep 5; curl -H \"Content-Type: application/json\" -d '{\"action\": \"start_streaming\"}' http://localhost:3000/" &
$(PYTHON) run.py -p ~/spark -c ./config/markov_source_config.json -l ./config/logging.json
.PHONY: all test clean style testspec