Add %built_cling substitution for lit so tests can be run from either the build or installations directories.
This commit is contained in:
parent
d7bc590e03
commit
e3265d1d8c
@ -6,7 +6,7 @@
|
||||
// LICENSE.TXT for details.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// RUN: cat %s | %cling -I%p | FileCheck %s
|
||||
// RUN: cat %s | %built_cling -I%p | FileCheck %s
|
||||
|
||||
#include "cling/Interpreter/Interpreter.h"
|
||||
#include "cling/Interpreter/InterpreterCallbacks.h"
|
||||
|
@ -6,7 +6,7 @@
|
||||
// LICENSE.TXT for details.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// RUN: cat %s | %cling -I%p | FileCheck %s
|
||||
// RUN: cat %s | %built_cling -I%p | FileCheck %s
|
||||
|
||||
// The tests shows the basic control flow structures that contain dynamic
|
||||
// expressions. There are several cases that could be distinguished.
|
||||
|
@ -6,7 +6,7 @@
|
||||
// LICENSE.TXT for details.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// RUN: cat %s | %cling -I%p | FileCheck %s
|
||||
// RUN: cat %s | %built_cling -I%p | FileCheck %s
|
||||
// We should revise the destruction of the LifetimeHandlers, because
|
||||
// its destructor uses gCling and the CompilerInstance, which are
|
||||
// already gone
|
||||
|
@ -6,7 +6,7 @@
|
||||
// LICENSE.TXT for details.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// RUN: cat %s | %cling -I%p | FileCheck %s
|
||||
// RUN: cat %s | %built_cling -I%p | FileCheck %s
|
||||
|
||||
// This test tests the hook that cling expects in clang and enables it
|
||||
// at compile time. However that is not actual dynamic lookup because
|
||||
|
@ -6,7 +6,7 @@
|
||||
// LICENSE.TXT for details.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// RUN: cat %s | %cling -I%p | FileCheck %s
|
||||
// RUN: cat %s | %built_cling -I%p | FileCheck %s
|
||||
|
||||
#include "cling/Interpreter/Interpreter.h"
|
||||
#include "cling/Interpreter/InterpreterCallbacks.h"
|
||||
|
@ -6,7 +6,7 @@
|
||||
// LICENSE.TXT for details.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// RUN: cat %s | %cling -I%p 2>&1 | FileCheck %s
|
||||
// RUN: cat %s | %built_cling -I%p 2>&1 | FileCheck %s
|
||||
|
||||
// Test failures of dynamic lookups.
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// RUN: clang -shared %S/address_lib.c -olibaddress_lib%shlibext
|
||||
// RUN: cat %s | %cling -L. -fno-rtti | FileCheck %s
|
||||
// RUN: cat %s | %built_cling -L. -fno-rtti | FileCheck %s
|
||||
extern "C" int printf(const char*,...);
|
||||
|
||||
#include "cling/Interpreter/Interpreter.h"
|
||||
|
@ -6,7 +6,7 @@
|
||||
// LICENSE.TXT for details.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// RUN: cat %s | %cling -fno-rtti | FileCheck %s
|
||||
// RUN: cat %s | %built_cling -fno-rtti | FileCheck %s
|
||||
|
||||
// This test makes sure the interpreter doesn't create many useless empty
|
||||
// transactions.
|
||||
|
@ -6,7 +6,7 @@
|
||||
// LICENSE.TXT for details.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// RUN: cat %s | %cling -fno-rtti 2>&1 | FileCheck %s
|
||||
// RUN: cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s
|
||||
// Test findArgList
|
||||
|
||||
#include "cling/Interpreter/Interpreter.h"
|
||||
|
@ -6,7 +6,7 @@
|
||||
// LICENSE.TXT for details.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// RUN: cat %s | %cling -fno-rtti 2>&1 | FileCheck %s
|
||||
// RUN: cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s
|
||||
// Test lookupData
|
||||
|
||||
.rawInput 1
|
||||
|
@ -6,7 +6,7 @@
|
||||
// LICENSE.TXT for details.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// RUN: cat %s | %cling -fno-rtti 2>&1 | FileCheck %s
|
||||
// RUN: cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s
|
||||
// Test lookupFunctionArgs()
|
||||
.rawInput
|
||||
#include "cling/Interpreter/Interpreter.h"
|
||||
|
@ -6,7 +6,7 @@
|
||||
// LICENSE.TXT for details.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// RUN: cat %s | %cling -fno-rtti 2>&1 | FileCheck %s
|
||||
// RUN: cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s
|
||||
// Test findScope, which is esentially is a DeclContext.
|
||||
#include "cling/Interpreter/Interpreter.h"
|
||||
#include "cling/Interpreter/LookupHelper.h"
|
||||
|
@ -6,7 +6,7 @@
|
||||
// LICENSE.TXT for details.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// RUN: cat %s | %cling -fno-rtti 2>&1 | FileCheck %s
|
||||
// RUN: cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s
|
||||
// Test findClassTemplate, which is esentially is a DeclContext.
|
||||
#include "cling/Interpreter/Interpreter.h"
|
||||
#include "cling/Interpreter/LookupHelper.h"
|
||||
|
@ -6,7 +6,7 @@
|
||||
// LICENSE.TXT for details.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// RUN: cat %s | %cling -fno-rtti 2>&1 | FileCheck %s
|
||||
// RUN: cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s
|
||||
// Test Interpreter::lookupType()
|
||||
//
|
||||
#include "cling/Interpreter/Interpreter.h"
|
||||
|
@ -6,7 +6,7 @@
|
||||
// LICENSE.TXT for details.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// RUN: cat %s | %cling -fno-rtti | FileCheck %s
|
||||
// RUN: cat %s | %built_cling -fno-rtti | FileCheck %s
|
||||
|
||||
// The test verifies the expected behavior in cling::utils::Transform class,
|
||||
// which is supposed to provide different transformation of AST nodes and types.
|
||||
|
11
test/lit.cfg
11
test/lit.cfg
@ -240,6 +240,17 @@ if not lit_config.quiet:
|
||||
|
||||
#Start cling with nologo
|
||||
config.substitutions.append( ('%cling', config.cling + ' --nologo') )
|
||||
if not os.getenv('CLING'):
|
||||
# Add a substitution for the builds generated include dir before install
|
||||
incDir = os.path.join(config.llvm_obj_root, 'tools', 'clang', 'include')
|
||||
config.substitutions.append( ('%built_cling', config.cling + ' --nologo -I%s'
|
||||
% os.path.normpath(incDir)) )
|
||||
if not lit_config.quiet:
|
||||
lit_config.note('Running tests from build tree')
|
||||
else:
|
||||
config.substitutions.append( ('%built_cling', config.cling + ' --nologo') )
|
||||
if not lit_config.quiet:
|
||||
lit_config.note('Running tests from installation')
|
||||
|
||||
# FIXME: Find nicer way to prohibit this.
|
||||
config.substitutions.append(
|
||||
|
Loading…
x
Reference in New Issue
Block a user