diff options
author | Ben Kochie <superq@gmail.com> | 2019-11-23 07:52:47 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-23 07:52:47 -0600 |
commit | 67d3010a7974b5b255d8a61211a3dcce36ed6410 (patch) | |
tree | 3a2e1e61995d9514d91f269b91c121890764bf96 /Makefile | |
parent | 04fbcfffa194b5a77c8de60ca38d2530a8dfeae3 (diff) | |
download | prometheus_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-- | Makefile | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -91,12 +91,16 @@ test-32bit: collector/fixtures/sys/.unpacked | |||
91 | skip-test-32bit: | 91 | skip-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 | ||
94 | collector/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 | ||
100 | update_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 |
101 | test-e2e: build collector/fixtures/sys/.unpacked | 105 | test-e2e: build collector/fixtures/sys/.unpacked |
102 | @echo ">> running end-to-end tests" | 106 | @echo ">> running end-to-end tests" |