2016-10-17 06:28:36 -06:00
|
|
|
TARGETS = bpf
|
|
|
|
TARGETS += breakpoints
|
2015-11-17 07:35:42 -07:00
|
|
|
TARGETS += capabilities
|
2013-04-30 16:27:06 -06:00
|
|
|
TARGETS += cpu-hotplug
|
|
|
|
TARGETS += efivarfs
|
2014-12-18 17:17:43 -07:00
|
|
|
TARGETS += exec
|
|
|
|
TARGETS += firmware
|
|
|
|
TARGETS += ftrace
|
2015-05-12 22:07:55 -06:00
|
|
|
TARGETS += futex
|
2015-11-17 07:35:43 -07:00
|
|
|
TARGETS += ipc
|
2013-02-27 18:05:56 -07:00
|
|
|
TARGETS += kcmp
|
2015-11-06 17:30:32 -07:00
|
|
|
TARGETS += lib
|
2015-09-11 14:07:42 -06:00
|
|
|
TARGETS += membarrier
|
2014-08-08 15:25:32 -06:00
|
|
|
TARGETS += memfd
|
2013-04-30 16:27:06 -06:00
|
|
|
TARGETS += memory-hotplug
|
2014-07-29 16:50:44 -06:00
|
|
|
TARGETS += mount
|
2014-12-18 17:17:43 -07:00
|
|
|
TARGETS += mqueue
|
2013-03-20 13:07:56 -06:00
|
|
|
TARGETS += net
|
2016-09-06 01:47:16 -06:00
|
|
|
TARGETS += nsfs
|
2014-12-18 17:17:43 -07:00
|
|
|
TARGETS += powerpc
|
2015-10-02 05:46:39 -06:00
|
|
|
TARGETS += pstore
|
2013-04-30 16:28:00 -06:00
|
|
|
TARGETS += ptrace
|
2015-06-16 11:54:14 -06:00
|
|
|
TARGETS += seccomp
|
2016-04-14 14:20:05 -06:00
|
|
|
TARGETS += sigaltstack
|
2014-12-18 17:17:43 -07:00
|
|
|
TARGETS += size
|
2015-09-09 07:06:25 -06:00
|
|
|
TARGETS += static_keys
|
2014-12-18 17:17:43 -07:00
|
|
|
TARGETS += sysctl
|
2015-06-19 13:13:43 -06:00
|
|
|
ifneq (1, $(quicktest))
|
2013-06-27 18:06:43 -06:00
|
|
|
TARGETS += timers
|
2015-06-19 13:13:43 -06:00
|
|
|
endif
|
2014-01-23 16:54:38 -07:00
|
|
|
TARGETS += user
|
2014-12-18 17:17:43 -07:00
|
|
|
TARGETS += vm
|
2015-04-07 00:11:06 -06:00
|
|
|
TARGETS += x86
|
2015-08-18 01:01:59 -06:00
|
|
|
TARGETS += zram
|
2014-12-18 17:17:43 -07:00
|
|
|
#Please keep the TARGETS list alphabetically sorted
|
2015-06-19 13:13:43 -06:00
|
|
|
# Run "make quicktest=1 run_tests" or
|
|
|
|
# "make quicktest=1 kselftest from top level Makefile
|
2012-01-12 18:20:44 -07:00
|
|
|
|
2014-07-02 09:51:38 -06:00
|
|
|
TARGETS_HOTPLUG = cpu-hotplug
|
|
|
|
TARGETS_HOTPLUG += memory-hotplug
|
|
|
|
|
2015-03-18 11:57:39 -06:00
|
|
|
# Clear LDFLAGS and MAKEFLAGS if called from main
|
|
|
|
# Makefile to avoid test build failures when test
|
|
|
|
# Makefile doesn't have explicit build rules.
|
|
|
|
ifeq (1,$(MAKELEVEL))
|
2015-05-14 13:55:18 -06:00
|
|
|
override LDFLAGS =
|
2015-03-18 11:57:39 -06:00
|
|
|
override MAKEFLAGS =
|
|
|
|
endif
|
|
|
|
|
2012-01-12 18:20:44 -07:00
|
|
|
all:
|
|
|
|
for TARGET in $(TARGETS); do \
|
|
|
|
make -C $$TARGET; \
|
|
|
|
done;
|
|
|
|
|
2012-03-28 15:42:54 -06:00
|
|
|
run_tests: all
|
2012-03-28 15:42:54 -06:00
|
|
|
for TARGET in $(TARGETS); do \
|
|
|
|
make -C $$TARGET run_tests; \
|
|
|
|
done;
|
|
|
|
|
2014-07-02 09:51:38 -06:00
|
|
|
hotplug:
|
|
|
|
for TARGET in $(TARGETS_HOTPLUG); do \
|
|
|
|
make -C $$TARGET; \
|
|
|
|
done;
|
|
|
|
|
|
|
|
run_hotplug: hotplug
|
|
|
|
for TARGET in $(TARGETS_HOTPLUG); do \
|
|
|
|
make -C $$TARGET run_full_test; \
|
|
|
|
done;
|
|
|
|
|
|
|
|
clean_hotplug:
|
|
|
|
for TARGET in $(TARGETS_HOTPLUG); do \
|
|
|
|
make -C $$TARGET clean; \
|
|
|
|
done;
|
|
|
|
|
2015-10-02 05:46:41 -06:00
|
|
|
run_pstore_crash:
|
|
|
|
make -C pstore run_crash
|
|
|
|
|
2015-03-10 22:06:00 -06:00
|
|
|
INSTALL_PATH ?= install
|
|
|
|
INSTALL_PATH := $(abspath $(INSTALL_PATH))
|
|
|
|
ALL_SCRIPT := $(INSTALL_PATH)/run_kselftest.sh
|
|
|
|
|
|
|
|
install:
|
|
|
|
ifdef INSTALL_PATH
|
|
|
|
@# Ask all targets to install their files
|
|
|
|
mkdir -p $(INSTALL_PATH)
|
|
|
|
for TARGET in $(TARGETS); do \
|
|
|
|
make -C $$TARGET INSTALL_PATH=$(INSTALL_PATH)/$$TARGET install; \
|
|
|
|
done;
|
|
|
|
|
|
|
|
@# Ask all targets to emit their test scripts
|
|
|
|
echo "#!/bin/bash" > $(ALL_SCRIPT)
|
|
|
|
echo "cd \$$(dirname \$$0)" >> $(ALL_SCRIPT)
|
|
|
|
echo "ROOT=\$$PWD" >> $(ALL_SCRIPT)
|
|
|
|
|
|
|
|
for TARGET in $(TARGETS); do \
|
|
|
|
echo "echo ; echo Running tests in $$TARGET" >> $(ALL_SCRIPT); \
|
|
|
|
echo "echo ========================================" >> $(ALL_SCRIPT); \
|
|
|
|
echo "cd $$TARGET" >> $(ALL_SCRIPT); \
|
|
|
|
make -s --no-print-directory -C $$TARGET emit_tests >> $(ALL_SCRIPT); \
|
|
|
|
echo "cd \$$ROOT" >> $(ALL_SCRIPT); \
|
|
|
|
done;
|
|
|
|
|
|
|
|
chmod u+x $(ALL_SCRIPT)
|
|
|
|
else
|
|
|
|
$(error Error: set INSTALL_PATH to use install)
|
|
|
|
endif
|
|
|
|
|
2012-01-12 18:20:44 -07:00
|
|
|
clean:
|
|
|
|
for TARGET in $(TARGETS); do \
|
|
|
|
make -C $$TARGET clean; \
|
|
|
|
done;
|
2015-03-10 22:06:00 -06:00
|
|
|
|
|
|
|
.PHONY: install
|