Makefile 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. SRCURL = https://github.com/linux-test-project/ltp/releases/download/
  2. SRCVERSION = 20170116
  3. SRCDIR = ltp-full-$(SRCVERSION)
  4. BUILDDIR = opt/ltp
  5. TESTCASEDIR = $(BUILDDIR)/testcases/bin
  6. target = $(BUILDDIR)/bin/run_in_graphene.awk $(TESTCASEDIR)/pal_loader build-manifest
  7. exec_target =
  8. clean-extra = clean-build
  9. level = ../../
  10. include ../../Makefile
  11. $(SRCDIR).tar.xz:
  12. wget $(SRCURL)/$(SRCVERSION)/$@
  13. $(SRCDIR)/configure: $(SRCDIR).tar.xz
  14. tar -xJf $<
  15. cd $(SRCDIR) && make autotools
  16. $(BUILDDIR)/runltp: $(SRCDIR)/configure
  17. cd $(SRCDIR) && ./configure
  18. cd $(SRCDIR) && make all
  19. cd $(SRCDIR) && make "DESTDIR=$(PWD)" SKIP_IDCHECK=1 install
  20. patch -d $(dir $@) < runltp.patch
  21. $(BUILDDIR)/bin/run_in_graphene.awk: run_in_graphene.awk $(BUILDDIR)/runltp
  22. cp -f $< $@
  23. $(TESTCASEDIR)/pal_loader: $(BUILDDIR)/runltp
  24. ln -sf $(call relative-to,$(dir $@),../../../Runtime/pal_loader) $@
  25. build-manifest: $(TESTCASEDIR)/manifest.template $(TESTCASEDIR)/Makefile
  26. cd $(TESTCASEDIR) && make
  27. $(TESTCASEDIR)/manifest.template: manifest.template
  28. cp -f $< $@
  29. $(TESTCASEDIR)/Makefile: Makefile.testcases
  30. ln -sf ../../../../$< $@
  31. regression:
  32. @echo "\n\nBuilding LTP..."
  33. @$(MAKE) >> /dev/null 2>&1
  34. @echo "\n\nLTP tests for system calls:"
  35. ./syscalls.sh
  36. clean-build:
  37. rm -rf $(BUILDDIR)