aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBen Kochie <superq@gmail.com>2019-11-23 07:52:47 -0600
committerGitHub <noreply@github.com>2019-11-23 07:52:47 -0600
commit67d3010a7974b5b255d8a61211a3dcce36ed6410 (patch)
tree3a2e1e61995d9514d91f269b91c121890764bf96 /Makefile
parent04fbcfffa194b5a77c8de60ca38d2530a8dfeae3 (diff)
downloadprometheus_node_collector-67d3010a7974b5b255d8a61211a3dcce36ed6410.tar.bz2
prometheus_node_collector-67d3010a7974b5b255d8a61211a3dcce36ed6410.tar.xz
prometheus_node_collector-67d3010a7974b5b255d8a61211a3dcce36ed6410.zip
Add fixture update helper (#1551)
* Add makefile target to update sysfs fixtures. * Use similar style for fixtures from procfs. * Re-pack fixtures ttar file. Signed-off-by: Ben Kochie <superq@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 8 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 31eae06..2e1f04f 100644
--- a/Makefile
+++ b/Makefile
@@ -91,12 +91,16 @@ test-32bit: collector/fixtures/sys/.unpacked
91skip-test-32bit: 91skip-test-32bit:
92 @echo ">> SKIP running tests in 32-bit mode: not supported on $(GOHOSTOS)/$(GOHOSTARCH)" 92 @echo ">> SKIP running tests in 32-bit mode: not supported on $(GOHOSTOS)/$(GOHOSTARCH)"
93 93
94collector/fixtures/sys/.unpacked: collector/fixtures/sys.ttar 94%/.unpacked: %.ttar
95 @echo ">> extracting sysfs fixtures" 95 @echo ">> extracting fixtures"
96 if [ -d collector/fixtures/sys ] ; then rm -r collector/fixtures/sys ; fi 96 if [ -d $(dir $@) ] ; then rm -r $(dir $@) ; fi
97 ./ttar -C collector/fixtures -x -f collector/fixtures/sys.ttar 97 ./ttar -C $(dir $*) -x -f $*.ttar
98 touch $@ 98 touch $@
99 99
100update_fixtures:
101 rm -vf collector/fixtures/sys/.unpacked
102 ./ttar -C collector/fixtures -c -f collector/fixtures/sys.ttar sys
103
100.PHONY: test-e2e 104.PHONY: test-e2e
101test-e2e: build collector/fixtures/sys/.unpacked 105test-e2e: build collector/fixtures/sys/.unpacked
102 @echo ">> running end-to-end tests" 106 @echo ">> running end-to-end tests"