summaryrefslogtreecommitdiffstats
path: root/lldb/test
diff options
context:
space:
mode:
authorTodd Fiala <todd.fiala@gmail.com>2014-09-25 19:25:07 +0000
committerTodd Fiala <todd.fiala@gmail.com>2014-09-25 19:25:07 +0000
commitb3185e710e797b441c042a942d812eaf6b01ad4a (patch)
treeb29c7d86ca2a591ec7465edbedcf19ac85ff37f5 /lldb/test
parent1fa1ce6112a5a1550b107daae3d9ddd7017dd25c (diff)
downloadbcm5719-llvm-b3185e710e797b441c042a942d812eaf6b01ad4a.tar.gz
bcm5719-llvm-b3185e710e797b441c042a942d812eaf6b01ad4a.zip
Fixup gtest layout, add Linux ThreadStateCoordinator.cpp.
This change does the following: * Remove test/c++/... * Add gtest. * Add gtest/unittest directory for unittesting individual classes. * Add an initial Plugins/Process?linux/ThreadStateCoordinatorTest.cpp. - currently failing a test (intentional). - added a bare-bones ThreadStateCoordinator.cpp to Plugins/Process/Linux, more soon. Just enough to prove out running gtest on Ubuntu and MacOSX. * Added recursive make machinery so that doing a 'make' in gtest/ is sufficient to kick off the existing test several directories down. - Caveat - I currently short circuit from gtest/unittest/Makefile directly to the one and only gtest/unittest/Plugins/Process/Linux directory. We'll need to add the intervening layers. I haven't done this yet since to fix the Xcode test failure correspondence, I may need to add a python layer which might just handle the directory crawling. * Added an Xcode project to the lldb workspace for gtest. - Runs the recursive make system in gtest/Makefile. - Default target is 'test'. test and clean are supported. - Currently does not support test failure file/line correspondence. Requires a bit of text transformation to hook that up. llvm-svn: 218460
Diffstat (limited to 'lldb/test')
-rw-r--r--lldb/test/c++/make/Makefile.rules58
-rw-r--r--lldb/test/c++/native_process/thread_state_coordinator/Makefile14
-rw-r--r--lldb/test/c++/native_process/thread_state_coordinator/ThreadStateCoordinatorTest.cpp7
3 files changed, 0 insertions, 79 deletions
diff --git a/lldb/test/c++/make/Makefile.rules b/lldb/test/c++/make/Makefile.rules
deleted file mode 100644
index 00c8de2dbf8..00000000000
--- a/lldb/test/c++/make/Makefile.rules
+++ /dev/null
@@ -1,58 +0,0 @@
-# Retrieve this Makefile's location.
-THIS_FILE_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))/
-
-# Set default target to be test
-.DEFAULT_GOAL := test
-
-# Set up GTEST for canonical Linux and MacOSX source trees.
-ifeq ($(wildcard ../../../../llvm/utils/unittest/googletest),)
- # Assume llvm/tools/lldb (Non-MacOSX) directory form.
- LLVM_BASE_DIR := $(realpath ../../../../../..)
-else
- # Assume lldb/llvm (MacOSX Xcode) directory form.
- LLVM_BASE_DIR := $(realpath ../../../../llvm)
-endif
-
-ifeq ($(GTEST_DIR),)
- GTEST_DIR := $(LLVM_BASE_DIR)/utils/unittest/googletest
-endif
-GTEST_INCLUDE_DIR := $(GTEST_DIR)/include
-
-ifeq ($(LLVM_BUILD_DIR),)
- ifneq ($(wildcard $(THIS_FILE_DIR)../../../llvm-build/Release+Asserts/x86_64/Release+Asserts),)
- LLVM_BUILD_DIR := $(realpath $(THIS_FILE_DIR)../../../llvm-build/Release+Asserts/x86_64/Release+Asserts)
- else ifneq ($(wildcard $(THIS_FILE_DIR)../../../../../../build-debug/lib),)
- LLVM_BUILD_DIR := $(realpath $(THIS_FILE_DIR)../../../../../../build-debug)
- endif
-endif
-
-ifeq ($(LLVM_BUILD_DIR),)
- $(error Could not find LLVM build output dir, please set it with LLVM_BUILD_DIR)
-endif
-GTEST_STATIC_LIB_DIR := $(LLVM_BUILD_DIR)/lib
-
-ifeq ($(LLVM_BUILD_INCLUDE_DIR),)
- ifneq ($(wildcard $(LLVM_BUILD_DIR)/../include),)
- LLVM_BUILD_INCLUDE_DIR := $(realpath $(LLVM_BUILD_DIR)/../include)
- else ifneq ($(wildcard $(LLVM_BUILD_DIR)/include),)
- LLVM_BUILD_INCLUDE_DIR := $(realpath $(LLVM_BUILD_DIR)/include)
- endif
-endif
-
-ifeq ($(LLVM_BUILD_INCLUDE_DIR),)
- $(error Could not find LLVM build directory include dir, please set it with LLVM_BUILD_INCLUDE_DIR)
-endif
-
-$(info LLVM_BASE_DIR = $(LLVM_BASE_DIR))
-$(info LLVM_BUILD_DIR = $(LLVM_BUILD_DIR))
-$(info GTEST_DIR = $(GTEST_DIR))
-$(info GTEST_INCLUDE_DIR = $(GTEST_INCLUDE_DIR))
-$(info GTEST_STATIC_LIB_DIR = $(GTEST_STATIC_LIB_DIR))
-
-CFLAGS_EXTRAS += -I $(GTEST_INCLUDE_DIR) -I $(LLVM_BASE_DIR)/include -I $(LLVM_BUILD_INCLUDE_DIR)
-LD_EXTRAS += $(GTEST_STATIC_LIB_DIR)/libgtest.a $(GTEST_STATIC_LIB_DIR)/libgtest_main.a $(GTEST_STATIC_LIB_DIR)/libLLVMSupport.a
-
-include $(THIS_FILE_DIR)../../make/Makefile.rules
-
-test:: $(EXE)
- $(realpath $(EXE))
diff --git a/lldb/test/c++/native_process/thread_state_coordinator/Makefile b/lldb/test/c++/native_process/thread_state_coordinator/Makefile
deleted file mode 100644
index 34db314ceed..00000000000
--- a/lldb/test/c++/native_process/thread_state_coordinator/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-LEVEL = ../../make
-
-CFLAGS_EXTRAS := -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS
-ENABLE_THREADS := YES
-CXX_SOURCES := $(wildcard *.cpp)
-MAKE_DSYM :=NO
-
-OS := $(shell uname -s)
-$(info OS $(OS))
-ifeq ($(OS),Linux)
- LD_EXTRAS += -lncurses -ldl
-endif
-
-include $(LEVEL)/Makefile.rules
diff --git a/lldb/test/c++/native_process/thread_state_coordinator/ThreadStateCoordinatorTest.cpp b/lldb/test/c++/native_process/thread_state_coordinator/ThreadStateCoordinatorTest.cpp
deleted file mode 100644
index 47809f64ff4..00000000000
--- a/lldb/test/c++/native_process/thread_state_coordinator/ThreadStateCoordinatorTest.cpp
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <limits.h>
-#include "gtest/gtest.h"
-
-TEST(ThreadStateCoordinatorTest, ExpectEqualsWorks)
-{
- EXPECT_EQ(1, 1);
-}
OpenPOWER on IntegriCloud