File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed
Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ update_fixtures:
117117.PHONY : tools
118118tools :
119119@rm ./tools/tools > /dev/null 2>&1 || true
120- @$(GO ) build -o tools ./tools/...
120+ @$(GO ) build -o tools/tools ./tools/...
121121
122122.PHONY : test-e2e
123123test-e2e : build collector/fixtures/sys/.unpacked collector/fixtures/udev/.unpacked tools
Original file line number Diff line number Diff line change 33set -euf -o pipefail
44
55# Allow setting GOHOSTOS for debugging purposes.
6- GOHOSTOS=${GOHOSTOS:- $(go env GOHOSTOS)}
6+ GOHOSTOS=${GOHOSTOS:- $(go env GOHOSTOS 2> / dev / null || uname -s | tr ' [:upper:] ' ' [:lower:] ' )}
77
88# Allow setting arch for debugging purposes.
99arch=${arch:- $(uname -m)}
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ export PATH=$PATH:%{_tmppath}/go/bin
4747export GOROOT=%{_tmppath }/go
4848export GOPATH=%{_tmppath }
4949make build
50+ make tools
5051make test
5152# run cross-testing
5253%ifarch x86_64 amd64 ia32e
@@ -68,6 +69,11 @@ mkdir -p $RPM_BUILD_ROOT/opt/node_exporter_tests/collector
6869cp -r collector/fixtures $RPM_BUILD_ROOT/opt/node_exporter_tests/collector/
6970install -D -m 755 end-to-end-test.sh $RPM_BUILD_ROOT/opt/node_exporter_tests/end-to-end-test.sh
7071install -D -m 755 node_exporter $RPM_BUILD_ROOT/opt/node_exporter_tests/node_exporter
72+ mkdir -p $RPM_BUILD_ROOT/opt/node_exporter_tests/tools
73+ install -D -m 755 tools/tools $RPM_BUILD_ROOT/opt/node_exporter_tests/tools/tools
74+
75+ # remove broken symlinks
76+ find $RPM_BUILD_ROOT/opt/node_exporter_tests/collector/fixtures -xtype l -delete
7177
7278# write package version to file
7379if [[ ! -d "$RPM_BUILD_ROOT%{cl_dir }" ]]; then
You can’t perform that action at this time.
0 commit comments