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>
This commit is contained in:
parent
04fbcfffa1
commit
67d3010a79
2 changed files with 12 additions and 16 deletions
12
Makefile
12
Makefile
|
|
@ -91,12 +91,16 @@ test-32bit: collector/fixtures/sys/.unpacked
|
|||
skip-test-32bit:
|
||||
@echo ">> SKIP running tests in 32-bit mode: not supported on $(GOHOSTOS)/$(GOHOSTARCH)"
|
||||
|
||||
collector/fixtures/sys/.unpacked: collector/fixtures/sys.ttar
|
||||
@echo ">> extracting sysfs fixtures"
|
||||
if [ -d collector/fixtures/sys ] ; then rm -r collector/fixtures/sys ; fi
|
||||
./ttar -C collector/fixtures -x -f collector/fixtures/sys.ttar
|
||||
%/.unpacked: %.ttar
|
||||
@echo ">> extracting fixtures"
|
||||
if [ -d $(dir $@) ] ; then rm -r $(dir $@) ; fi
|
||||
./ttar -C $(dir $*) -x -f $*.ttar
|
||||
touch $@
|
||||
|
||||
update_fixtures:
|
||||
rm -vf collector/fixtures/sys/.unpacked
|
||||
./ttar -C collector/fixtures -c -f collector/fixtures/sys.ttar sys
|
||||
|
||||
.PHONY: test-e2e
|
||||
test-e2e: build collector/fixtures/sys/.unpacked
|
||||
@echo ">> running end-to-end tests"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue