瀏覽代碼

perf tools: Allow shuffling the build tests

Those tests take a long time and sometimes we stop it, so allow randomly
shuffling the tests so that we have a better chance of running more of
them in partial 'make build-test' runs.

Using it just on the 'build-test' target, i.e.:

   make -C tools/perf build-test

Is equivalent to:

   make SHUF=1 -C tools/perf -f tests/make

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-ey7461i9q4k8u0987j8guun6@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Arnaldo Carvalho de Melo 10 年之前
父節點
當前提交
98916392a0
共有 2 個文件被更改,包括 6 次插入1 次删除
  1. 1 1
      tools/perf/Makefile
  2. 5 0
      tools/perf/tests/make

+ 1 - 1
tools/perf/Makefile

@@ -78,7 +78,7 @@ clean:
 # The build-test target is not really parallel, don't print the jobs info:
 # The build-test target is not really parallel, don't print the jobs info:
 #
 #
 build-test:
 build-test:
-	@$(MAKE) -f tests/make --no-print-directory
+	@$(MAKE) SHUF=1 -f tests/make --no-print-directory
 
 
 #
 #
 # All other targets get passed through:
 # All other targets get passed through:

+ 5 - 0
tools/perf/tests/make

@@ -221,6 +221,11 @@ test_O = $(if $(test_$1),$(test_$1),$(test_default_O))
 
 
 all:
 all:
 
 
+ifdef SHUF
+run := $(shell shuf -e $(run))
+run_O := $(shell shuf -e $(run_O))
+endif
+
 ifdef DEBUG
 ifdef DEBUG
 d := $(info run   $(run))
 d := $(info run   $(run))
 d := $(info run_O $(run_O))
 d := $(info run_O $(run_O))