Merge "gfch100: fix switch counters"
diff --git a/Makefile b/Makefile
index 5de9eaa..4b56110 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,7 @@
BUILD_LOGUPLOAD?= # default off: needs libgtest
BUILD_IBEACON?= # default off: needs bluetooth.h
BUILD_WAVEGUIDE?=y
+BUILD_CACHE_WARMING?=y
BUILD_DVBUTILS?=y
BUILD_SYSMGR?=y
BUILD_STATUTILS?=y
@@ -16,7 +17,7 @@
BUILD_JSONPOLL?=n
BUILD_PRESTERASTATS?=n
export BUILD_HNVRAM BUILD_SSDP BUILD_DNSSD BUILD_LOGUPLOAD \
- BUILD_IBEACON BUILD_WAVEGUIDE BUILD_DVBUTILS BUILD_SYSMGR \
+ BUILD_IBEACON BUILD_WAVEGUIDE BUILD_CACHE_WARMING BUILD_DVBUTILS BUILD_SYSMGR \
BUILD_STATUTILS BUILD_CRYPTDEV BUILD_SIGNING BUILD_JSONPOLL \
BUILD_PRESTERASTATS
@@ -36,6 +37,10 @@
DIRS+=taxonomy
endif
+ifeq ($(BUILD_CACHE_WARMING),y)
+DIRS+=cache_warming
+endif
+
ifeq ($(BUILD_HNVRAM),y)
DIRS+=hnvram
endif
diff --git a/cache_warming/Makefile b/cache_warming/Makefile
new file mode 100644
index 0000000..7edc6e5
--- /dev/null
+++ b/cache_warming/Makefile
@@ -0,0 +1,37 @@
+INSTALL?=install
+PREFIX=$(DESTDIR)/bin
+LIBDIR=$(PREFIX)/cache_warming
+PYTHON?=python
+GPYLINT=$(shell \
+ if which gpylint >/dev/null; then \
+ echo gpylint; \
+ else \
+ echo 'echo "(gpylint-missing)" >&2'; \
+ fi \
+)
+
+all:
+
+%.test: %_test.py
+ $(PYTHON) $<
+
+runtests: $(patsubst %_test.py,%.test,$(wildcard *_test.py))
+
+lint: $(filter-out options.py,$(wildcard *.py))
+ $(GPYLINT) $^
+
+test_only: all
+ PYTHONPATH=..:$(PYTHONPATH) ./wvtest/wvtestrun $(MAKE) runtests
+
+test: all
+ $(MAKE) test_only lint
+
+install:
+ mkdir -p $(LIBDIR)
+ $(INSTALL) -m 0755 -D cache_warming.py $(LIBDIR)/
+
+install-libs:
+ @echo "No libs to install."
+
+clean:
+ rm -rf *~ .*~ *.pyc