Makefile 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 -xmJf $<
  15. $(BUILDDIR)/runltp: $(SRCDIR)/configure
  16. cd $(SRCDIR) && ./configure
  17. cd $(SRCDIR) && make all
  18. cd $(SRCDIR) && make "DESTDIR=$(PWD)" SKIP_IDCHECK=1 install
  19. patch -d $(dir $@) < runltp.patch
  20. $(BUILDDIR)/bin/run_in_graphene.awk: run_in_graphene.awk $(BUILDDIR)/runltp
  21. cp -f $< $@
  22. $(TESTCASEDIR)/pal_loader: $(BUILDDIR)/runltp
  23. ln -sf $(call relative-to,$(dir $@),../../../Runtime/pal_loader) $@
  24. build-manifest: $(TESTCASEDIR)/manifest.template $(TESTCASEDIR)/Makefile
  25. cd $(TESTCASEDIR) && make
  26. $(TESTCASEDIR)/manifest.template: manifest.template
  27. cp -f $< $@
  28. $(TESTCASEDIR)/Makefile: Makefile.testcases
  29. ln -sf ../../../../$< $@
  30. regression:
  31. @echo "\n\nBuilding LTP..."
  32. @$(MAKE) >> /dev/null 2>&1
  33. @echo "\n\nLTP tests for system calls:"
  34. ./syscalls.sh
  35. clean-build:
  36. rm -rf $(BUILDDIR)