summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2015-11-02 13:43:32 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2015-11-02 13:43:32 +0000
commitb0eae8d6f4cfbd25e521f86e5e1cfce2a7865316 (patch)
tree88423afbf8f5f44b8e74a238868b909d6285cef1
parent54d263c61cb06b2713a1afbdc5f2bbe775fd98b2 (diff)
downloadbcm5719-llvm-b0eae8d6f4cfbd25e521f86e5e1cfce2a7865316.tar.gz
bcm5719-llvm-b0eae8d6f4cfbd25e521f86e5e1cfce2a7865316.zip
[OPENMP] Add dependency to clang/clang-headers etc. for in-tree build of libomp.
Add additional dependency to clang/clang-headers/FileCheck to avoid possible troubles with in-tree build/test of libomp + allow parallel testing of libomp. Also includes bugfixes for tests + improvements to avoid possible race conditions. Differential Revision: http://reviews.llvm.org/D14055 llvm-svn: 251797
-rw-r--r--openmp/runtime/test/CMakeLists.txt7
-rw-r--r--openmp/runtime/test/api/omp_get_wtime.c2
-rw-r--r--openmp/runtime/test/omp_testsuite.h2
-rw-r--r--openmp/runtime/test/worksharing/for/omp_for_schedule_auto.c2
4 files changed, 6 insertions, 7 deletions
diff --git a/openmp/runtime/test/CMakeLists.txt b/openmp/runtime/test/CMakeLists.txt
index c5877cff13c..ce917ee4790 100644
--- a/openmp/runtime/test/CMakeLists.txt
+++ b/openmp/runtime/test/CMakeLists.txt
@@ -34,7 +34,7 @@ if(${LIBOMP_STANDALONE_BUILD})
# The -j 1 lets the actual tests run with the entire machine.
# We have one test thread that spawns the tests serially. This allows
# Each test to use the entire machine.
- set(LIBOMP_LIT_ARGS_DEFAULT "-sv --show-unsupported --show-xfail -j 1")
+ set(LIBOMP_LIT_ARGS_DEFAULT "-sv --show-unsupported --show-xfail")
if(MSVC OR XCODE)
set(LIBOMP_LIT_ARGS_DEFAULT "${LIBOMP_LIT_ARGS_DEFAULT} --no-progress-bar")
endif()
@@ -56,11 +56,10 @@ else()
endif()
set(LIBOMP_TEST_OPENMP_FLAG -fopenmp=libomp)
# Use add_lit_testsuite() from LLVM CMake.
- add_lit_testsuite(check-libomp
+ add_lit_testsuite(check-libomp
"Running libomp tests"
${CMAKE_CURRENT_BINARY_DIR}
- ARGS "-j 1"
- DEPENDS omp
+ DEPENDS clang clang-headers FileCheck omp
)
endif()
diff --git a/openmp/runtime/test/api/omp_get_wtime.c b/openmp/runtime/test/api/omp_get_wtime.c
index c93c2a5b4b3..d91312b2f77 100644
--- a/openmp/runtime/test/api/omp_get_wtime.c
+++ b/openmp/runtime/test/api/omp_get_wtime.c
@@ -9,7 +9,7 @@ int test_omp_get_wtime()
double start;
double end;
double measured_time;
- double wait_time = 0.25;
+ double wait_time = 1.0;
start = 0;
end = 0;
start = omp_get_wtime();
diff --git a/openmp/runtime/test/omp_testsuite.h b/openmp/runtime/test/omp_testsuite.h
index 53e0b78b6cf..3f2dfe68e41 100644
--- a/openmp/runtime/test/omp_testsuite.h
+++ b/openmp/runtime/test/omp_testsuite.h
@@ -12,7 +12,7 @@
#define REPETITIONS 10 /* Number of times to run each test */
/* following times are in seconds */
-#define SLEEPTIME 0.1
+#define SLEEPTIME 1
/* Definitions for tasks */
/**********************************************************/
diff --git a/openmp/runtime/test/worksharing/for/omp_for_schedule_auto.c b/openmp/runtime/test/worksharing/for/omp_for_schedule_auto.c
index 67c2d21e28c..38d03c6d91c 100644
--- a/openmp/runtime/test/worksharing/for/omp_for_schedule_auto.c
+++ b/openmp/runtime/test/worksharing/for/omp_for_schedule_auto.c
@@ -17,7 +17,6 @@ int test_omp_for_auto()
sum = 0;
sum0 = 12345;
- sum1 = 0;
// array which keeps track of which threads participated in the for loop
// e.g., given 4 threads, [ 0 | 1 | 1 | 0 ] implies
@@ -30,6 +29,7 @@ int test_omp_for_auto()
#pragma omp parallel
{
int i;
+ sum1 = 0;
#pragma omp for firstprivate(sum0) schedule(auto)
for (i = 1; i <= LOOPCOUNT; i++) {
active_threads[omp_get_thread_num()] = 1;
OpenPOWER on IntegriCloud