Skip to content

Commit

Permalink
Re-revert "Refactor debuginfo-tests."
Browse files Browse the repository at this point in the history
This is still breaking greendragon.

At this point I give up until someone can fix the greendragon
bots, and I will probably abandon this effort in favor of using
a private github repository.

llvm-svn: 318722
  • Loading branch information
Zachary Turner committed Nov 21, 2017
1 parent f874bd6 commit 79708b5
Show file tree
Hide file tree
Showing 28 changed files with 29 additions and 174 deletions.
8 changes: 0 additions & 8 deletions clang/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,6 @@ set(CLANG_TEST_PARAMS
clang_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
)

if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/debuginfo-tests/CMakeLists.txt")
# This is a hack to keep existing build build infrastructure working while we
# can migrate to the new standard workflow of checking out debuginfo-tests into
# llvm/projects or using it in a mono-repo
set(DEBUGINFO_TESTS_EXCLUDE_FROM_ALL ON)
add_subdirectory(debuginfo-tests)
endif()

if( NOT CLANG_BUILT_STANDALONE )
list(APPEND CLANG_TEST_DEPS
llvm-config
Expand Down
2 changes: 2 additions & 0 deletions clang/test/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@

tools = [
'c-index-test', 'clang-check', 'clang-diff', 'clang-format', 'opt',
ToolSubst('%test_debuginfo', command=os.path.join(
config.llvm_src_root, 'utils', 'test_debuginfo.pl')),
ToolSubst('%clang_func_map', command=FindTool(
'clang-func-mapping'), unresolved='ignore'),
]
Expand Down
46 changes: 0 additions & 46 deletions debuginfo-tests/CMakeLists.txt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %clangxx %target_itanium_abi_host_triple -O0 -g %s -c -o %t.o
// RUN: %clangxx %target_itanium_abi_host_triple %t.o -o %t.out
// RUN: %test_debuginfo %s %t.out
// RUN: %test_debuginfo %s %t.out
// Radar 8945514
// DEBUGGER: break 22
// DEBUGGER: r
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %clang %target_itanium_abi_host_triple -O0 -g %s -c -o %t.o
// RUN: %clang %target_itanium_abi_host_triple %t.o -o %t.out -framework Foundation
// RUN: %test_debuginfo %s %t.out
// RUN: %test_debuginfo %s %t.out

// REQUIRES: system-darwin

Expand Down
8 changes: 4 additions & 4 deletions debuginfo-tests/tests/blocks.m → debuginfo-tests/blocks.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %clang %target_itanium_abi_host_triple -O0 -g %s -c -o %t.o
// RUN: %clang %target_itanium_abi_host_triple %t.o -o %t.out -framework Foundation
// RUN: %test_debuginfo %s %t.out
// RUN: %test_debuginfo %s %t.out

// REQUIRES: system-darwin
// Radar 9279956
Expand All @@ -24,9 +24,9 @@ - (void) helper {
int master = 0;
__block int m2 = 0;
__block int dbTransaction = 0;
int (^x)(void) = ^(void) { (void) self;
(void) master;
(void) dbTransaction;
int (^x)(void) = ^(void) { (void) self;
(void) master;
(void) dbTransaction;
m2++;
return m2;
};
Expand Down
4 changes: 2 additions & 2 deletions debuginfo-tests/tests/ctor.cpp → debuginfo-tests/ctor.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// RUN: %clangxx %target_itanium_abi_host_triple -O0 -g %s -c -o %t.o
// RUN: %clangxx %target_itanium_abi_host_triple %t.o -o %t.out
// RUN: %test_debuginfo %s %t.out
// RUN: %test_debuginfo %s %t.out


// DEBUGGER: break 14
// DEBUGGER: r
// DEBUGGER: p *this
// CHECK-NEXT-NOT: Cannot access memory at address
// CHECK-NEXT-NOT: Cannot access memory at address

class A {
public:
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions debuginfo-tests/tests/foreach.m → debuginfo-tests/foreach.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %clang %target_itanium_abi_host_triple -O0 -g %s -c -o %t.o
// RUN: %clang %target_itanium_abi_host_triple %t.o -o %t.out -framework Foundation
// RUN: %test_debuginfo %s %t.out
// RUN: %test_debuginfo %s %t.out
//
// REQUIRES: system-darwin
// Radar 8757124
Expand All @@ -19,7 +19,7 @@ int main (int argc, const char * argv[]) {
for (NSString *thing in things) {
NSLog (@"%@", thing);
}

things = [NSArray arrayWithObjects:@"aaa", @"bbb", @"ccc" , nil];
for (NSString *thing in things) {
NSLog (@"%@", thing);
Expand Down
File renamed without changes.
59 changes: 0 additions & 59 deletions debuginfo-tests/lit.cfg.py

This file was deleted.

File renamed without changes.
25 changes: 0 additions & 25 deletions debuginfo-tests/lit.site.cfg.py.in

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions debuginfo-tests/tests/sret.cpp → debuginfo-tests/sret.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %clangxx %target_itanium_abi_host_triple -O0 -g %s -c -o %t.o
// RUN: %clangxx %target_itanium_abi_host_triple %t.o -o %t.out
// RUN: %test_debuginfo %s %t.out
// RUN: %test_debuginfo %s %t.out
// Radar 8775834
// DEBUGGER: break 62
// DEBUGGER: r
Expand All @@ -24,7 +24,7 @@ class A
int m_int;
};

A::A (int i) :
A::A (int i) :
m_int(i)
{
}
Expand All @@ -50,11 +50,11 @@ class B
{
public:
B () {}

A AInstance();
};

A
A
B::AInstance()
{
A a(12);
Expand All @@ -65,7 +65,7 @@ int main (int argc, char const *argv[])
{
B b;
int return_val = b.AInstance().get_int();

A a(b.AInstance());
return return_val;
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion debuginfo-tests/tests/vla.c → debuginfo-tests/vla.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This test case verifies the debug location for variable-length arrays.
// RUN: %clang %target_itanium_abi_host_triple -O0 -g %s -c -o %t.o
// RUN: %clang %target_itanium_abi_host_triple %t.o -o %t.out
// RUN: %test_debuginfo %s %t.out
// RUN: %test_debuginfo %s %t.out
//
// DEBUGGER: break 18
// DEBUGGER: r
Expand Down
19 changes: 7 additions & 12 deletions llvm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ endif()
# LLVM_EXTERNAL_${project}_SOURCE_DIR using LLVM_ALL_PROJECTS
# This allows an easy way of setting up a build directory for llvm and another
# one for llvm+clang+... using the same sources.
set(LLVM_ALL_PROJECTS "clang;libcxx;libcxxabi;lldb;compiler-rt;debuginfo-tests;lld;polly")
set(LLVM_ALL_PROJECTS "clang;libcxx;libcxxabi;lldb;compiler-rt;lld;polly")
set(LLVM_ENABLE_PROJECTS "" CACHE STRING
"Semicolon-separated list of projects to build (${LLVM_ALL_PROJECTS}), or \"all\".")
if( LLVM_ENABLE_PROJECTS STREQUAL "all" )
Expand Down Expand Up @@ -885,18 +885,13 @@ if( LLVM_INCLUDE_EXAMPLES )
endif()

if( LLVM_INCLUDE_TESTS )
if(TARGET clang)
if(EXISTS ${LLVM_MAIN_SRC_DIR}/projects/test-suite AND TARGET clang)
include(LLVMExternalProjectUtils)
if (EXISTS ${LLVM_MAIN_SRC_DIR}/projects/test-suite)
llvm_ExternalProject_Add(test-suite ${LLVM_MAIN_SRC_DIR}/projects/test-suite
USE_TOOLCHAIN
TOOLCHAIN_TOOLS clang lld clang-cl
EXCLUDE_FROM_ALL
NO_INSTALL
ALWAYS_CLEAN)
endif()

add_llvm_external_project(debuginfo-tests projects/debuginfo-tests)
llvm_ExternalProject_Add(test-suite ${LLVM_MAIN_SRC_DIR}/projects/test-suite
USE_TOOLCHAIN
EXCLUDE_FROM_ALL
NO_INSTALL
ALWAYS_CLEAN)
endif()
add_subdirectory(utils/lit)
add_subdirectory(test)
Expand Down
1 change: 0 additions & 1 deletion llvm/projects/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ foreach(entry ${entries})
(NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/libcxxabi) AND
(NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/libunwind) AND
(NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/test-suite) AND
(NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/debuginfo-tests) AND
(NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/parallel-libs) AND
(NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/openmp))
add_subdirectory(${entry})
Expand Down
9 changes: 3 additions & 6 deletions llvm/utils/lit/lit/llvm/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ def __init__(self, lit_config, config):
# For tests that require Windows to run.
features.add('system-windows')

lit_tools_dir = getattr(config, 'lit_tools_dir', None)
# Seek sane tools in directories and set to $PATH.
path = self.lit_config.getToolsPath(lit_tools_dir,
path = self.lit_config.getToolsPath(config.lit_tools_dir,
config.environment['PATH'],
['cmp.exe', 'grep.exe', 'sed.exe'])
if path is not None:
Expand Down Expand Up @@ -414,10 +413,8 @@ def use_clang(self, required=True):
self.config.substitutions.append(
('%target_itanium_abi_host_triple', ''))

clang_src_dir = getattr(self.config, 'clang_src_dir', None)
if clang_src_dir:
self.config.substitutions.append(
('%src_include_dir', os.path.join(clang_src_dir, 'include')))
self.config.substitutions.append(
('%src_include_dir', self.config.clang_src_dir + '/include'))

# FIXME: Find nicer way to prohibit this.
self.config.substitutions.append(
Expand Down
2 changes: 1 addition & 1 deletion llvm/utils/test_debuginfo.pl
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
if (!$my_debugger) {
if ($use_lldb) {
my $path = dirname(Cwd::abs_path($0));
$my_debugger = "/usr/bin/env python $path/../tools/clang/test/debuginfo-tests/tests/llgdb.py";
$my_debugger = "/usr/bin/env python $path/../tools/clang/test/debuginfo-tests/llgdb.py";
} else {
$my_debugger = "gdb";
}
Expand Down

0 comments on commit 79708b5

Please sign in to comment.