From a951e210872adb18dbca7eb8b0832bd3a6fde416 Mon Sep 17 00:00:00 2001 From: Andrey Churbanov Date: Wed, 29 Apr 2015 14:36:38 +0000 Subject: UH OpenMP testsuite update llvm-svn: 236105 --- openmp/runtime/Makefile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'openmp/runtime/Makefile') diff --git a/openmp/runtime/Makefile b/openmp/runtime/Makefile index 16d71ab6668..64de70fac59 100644 --- a/openmp/runtime/Makefile +++ b/openmp/runtime/Makefile @@ -47,3 +47,31 @@ endif @echo mode=$(mode) @echo jobs=$(jobs) + + +libiomp5_path=$(shell $(omp_root)/tools/check-openmp.pl) +test_path=$(shell $(omp_root)/tools/check-openmp-test.pl) + +# Please do not change this rule. +# ------------------------------- +# Intentionally changing directory into "testsuite" in order to generate output results and errors +# over there and keep this directory clean. +test: omp + @$(Verb) if which llvm-lit &> /dev/null; then \ + if [ -d "$(omp_root)$(SLASH)..$(SLASH)testsuite$(SLASH)LLVM-IR" ] ; then \ + export TESTSUITE_TEMP=$(realpath $(omp_root))$(SLASH)tmp ; \ + export LIBRARY_PATH=$(libiomp5_path):$(LIBRARY_PATH) ; \ + export LD_LIBRARY_PATH=$(libiomp5_path):$(LD_LIBRARY_PATH) ; \ + export DYLD_LIBRARY_PATH=$(libiomp5_path):$(DYLD_LIBRARY_PATH) ; \ + cd $(omp_root)$(SLASH)..$(SLASH)testsuite ; \ + make ctest ; \ + python adding_xfails.py ; \ + llvm-lit -j 1 $(realpath $(omp_root))$(SLASH)..$(SLASH)testsuite$(SLASH)LLVM-IR$(SLASH)$(test_path) -v ; \ + else \ + echo "No test directory" ; exit 1; \ + fi; else echo "No llvm-lit in $(PATH)"; exit 1; fi + +test-clean: + make -C ..$(SLASH)testsuite cleanall + + -- cgit v1.2.3