]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
perf tools: Allow shuffling the build tests
authorArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 4 Nov 2015 19:25:32 +0000 (16:25 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 5 Nov 2015 14:39:54 +0000 (11:39 -0300)
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>
tools/perf/Makefile
tools/perf/tests/make

index 480546d5f13b205b85790c9512d51f33693e73a1..dcd9a70c7193b43b5791058b01a3773da6e0d870 100644 (file)
@@ -78,7 +78,7 @@ clean:
 # The build-test target is not really parallel, don't print the jobs info:
 #
 build-test:
-       @$(MAKE) -f tests/make --no-print-directory
+       @$(MAKE) SHUF=1 -f tests/make --no-print-directory
 
 #
 # All other targets get passed through:
index 2cbd0c6901e35ff3954bf06892bb02b3c9f92cef..8ea3dffc5065fbc532ebfe5a170d64f33f18ed3d 100644 (file)
@@ -221,6 +221,11 @@ test_O = $(if $(test_$1),$(test_$1),$(test_default_O))
 
 all:
 
+ifdef SHUF
+run := $(shell shuf -e $(run))
+run_O := $(shell shuf -e $(run_O))
+endif
+
 ifdef DEBUG
 d := $(info run   $(run))
 d := $(info run_O $(run_O))