From 0a453dce849be8cd570e7dad1596bade2a3e7f90 Mon Sep 17 00:00:00 2001 From: Karsten Weiss Date: Fri, 13 Apr 2018 22:38:21 +0200 Subject: [PATCH] Build process_collector_test.go only on Linux The test case requires the /proc filesystem. The change prevents this skip message during "go test -v" on platforms other than Linux: === RUN TestProcessCollector --- SKIP: TestProcessCollector (0.00s) process_collector_test.go:15: skipping TestProcessCollector, procfs not available: could not read /proc: stat /proc: no such file or directory Signed-off-by: Karsten Weiss --- prometheus/process_collector_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/prometheus/process_collector_test.go b/prometheus/process_collector_test.go index c7acb47..d59ad77 100644 --- a/prometheus/process_collector_test.go +++ b/prometheus/process_collector_test.go @@ -1,3 +1,5 @@ +// +build linux + package prometheus import (