Add an environment variable that allows us to turn off threading in c-index-test

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117449 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/c-index-test/c-index-test.c b/tools/c-index-test/c-index-test.c
index c95fb30..eae6946 100644
--- a/tools/c-index-test/c-index-test.c
+++ b/tools/c-index-test/c-index-test.c
@@ -1599,6 +1599,9 @@
   pthread_t thread;
   int res;
 
+  if (getenv("CINDEXTEST_NOTHREADS"))
+    return cindextest_main(argc, argv);
+
   client_data.argc = argc;
   client_data.argv = argv;
   res = pthread_create(&thread, 0, thread_runner, &client_data);