Add OpenMP test

Change-Id: Iaca789919fbd3289c2dd2c632fa5a4096dd8bd50
diff --git a/tests/device/test-openmp/BROKEN_BUILD b/tests/device/test-openmp/BROKEN_BUILD
new file mode 100644
index 0000000..02bef2a
--- /dev/null
+++ b/tests/device/test-openmp/BROKEN_BUILD
@@ -0,0 +1 @@
+clang3.1
\ No newline at end of file
diff --git a/tests/device/test-openmp/jni/Android.mk b/tests/device/test-openmp/jni/Android.mk
new file mode 100644
index 0000000..ed7f548
--- /dev/null
+++ b/tests/device/test-openmp/jni/Android.mk
@@ -0,0 +1,9 @@
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := openmp
+LOCAL_SRC_FILES := openmp.c
+LOCAL_CFLAGS += -fopenmp
+LOCAL_LDFLAGS += -fopenmp
+include $(BUILD_EXECUTABLE)
+
diff --git a/tests/device/test-openmp/jni/Application.mk b/tests/device/test-openmp/jni/Application.mk
new file mode 100644
index 0000000..a252a72
--- /dev/null
+++ b/tests/device/test-openmp/jni/Application.mk
@@ -0,0 +1 @@
+APP_ABI := all
diff --git a/tests/device/test-openmp/jni/openmp.c b/tests/device/test-openmp/jni/openmp.c
new file mode 100644
index 0000000..ed0ed18
--- /dev/null
+++ b/tests/device/test-openmp/jni/openmp.c
@@ -0,0 +1,22 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <omp.h>
+
+int main(int argc, char *argv[])
+{
+    int iam = 0, np = 1;
+
+    if (!getenv("OMP_NUM_THREADS"))
+        omp_set_num_threads(4);
+
+  #pragma omp parallel default(shared) private(iam, np)
+    {
+      #if defined(_OPENMP)
+        np = omp_get_num_threads();
+        iam = omp_get_thread_num();
+      #endif
+        printf("Hello from thread %d out of %d\n", iam, np);
+    }
+
+    return 0;
+}