criu/test/compel/Makefile
Dmitry Safonov 6fe6a283e1 compel: add tests for compel
Yet they only test for ELF header, but soon I'll add more of them.
It's build with
  $ make test/compel/handle_binary
and test output is in TAP format:
  $ ./test/compel/handle_binary
  ok 1 - check zero ELF header
  ok 2 - check non-supported ELF header
  ok 3 - check non-relocatable ELF header
  ok 4 - check zero ELF header
  ok 5 - check non-supported ELF header
  ok 6 - check non-relocatable ELF header
(here two runs for x86_64 and x86_32 ELF binaries)
I'm planning to integrate it with Travis, so we will be
sure that compel is properly working (as this tests doesn't need
any ns and may be run on qemu-static).

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-14 21:03:29 +03:00

18 lines
548 B
Makefile

# Relative path to original objects
define compel_obj_path
$(addprefix ../../compel/,$(1))
endef
host-ccflags-y += -iquote test/compel/arch/$(ARCH)/include
test_objs := $(filter-out main.o,$(compel-objs))
hostprogs-y += handle_binary
handle_binary-objs += $(call compel_obj_path,$(test_objs))
handle_binary-objs += main.o
handle_binary-objs += handle_binary.o
ifeq ($(ARCH),x86)
handle_binary-objs += handle_binary_32.o
HOSTCFLAGS_handle_binary.o += -DCONFIG_X86_64
HOSTCFLAGS_handle_binary_32.o += -DCONFIG_X86_32
endif