Skip to content

Commit

Permalink
Do not use cat for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
reikdas committed Oct 23, 2020
1 parent e6dcc49 commit 9bbc9f8
Show file tree
Hide file tree
Showing 23 changed files with 23 additions and 25 deletions.
2 changes: 1 addition & 1 deletion test/Autoloading/AutoForwarding.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: %cat %s | %cling -I%S -Xclang -verify
// RUN: %cling -I%S -Xclang -verify < %s
// XFAIL: vanilla-cling
// Test FwdPrinterTest

Expand Down
2 changes: 1 addition & 1 deletion test/CodeGeneration/Statics.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: %cat %s | %cling -Xclang -verify 2>&1 | FileCheck %s
// RUN: %cling -Xclang -verify 2>&1 < %s | FileCheck %s

#include <stdio.h>

Expand Down
4 changes: 2 additions & 2 deletions test/CodeUnloading/AtExit.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: %cat %s | %cling -Xclang -verify 2>&1 | FileCheck %s
// FIXME: %cat %s | %cling -fsyntax-only -Xclang -verify 2>&1
// RUN: %cling -Xclang -verify 2>&1 < %s | FileCheck %s
// FIXME: %cling -fsyntax-only -Xclang -verify 2>&1 < %s

// Test to check functions registered via atexit are intercepted, and __dso_handle
// is properly overridden in for child interpreters.
Expand Down
2 changes: 1 addition & 1 deletion test/Interfaces/evaluate.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: %cat %s | %cling -Xclang -verify | FileCheck %s
// RUN: %cling -Xclang -verify < %s | FileCheck %s

#include "cling/Interpreter/Interpreter.h"
#include "cling/Interpreter/Value.h"
Expand Down
2 changes: 1 addition & 1 deletion test/Interfaces/transactionReuse.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: %cat %s | %built_cling -fno-rtti | FileCheck %s
// RUN: %built_cling -fno-rtti < %s | FileCheck %s

// This test makes sure the interpreter doesn't create many useless empty
// transactions.
Expand Down
2 changes: 1 addition & 1 deletion test/Lookup/data.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: %cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s
// RUN: %built_cling -fno-rtti 2>&1 < %s | FileCheck %s
// Test lookupData

.rawInput 1
Expand Down
2 changes: 1 addition & 1 deletion test/Lookup/named.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: %cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s
// RUN: %built_cling -fno-rtti 2>&1 < %s | FileCheck %s
// Test Lookup::Named and Namespace, used in quick simple lookups.

#include "cling/Interpreter/Interpreter.h"
Expand Down
2 changes: 1 addition & 1 deletion test/Lookup/scope.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: %cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s
// RUN: %built_cling -fno-rtti 2>&1 < %s | FileCheck %s
// Test findScope, which is essentially is a DeclContext.
#include "cling/Interpreter/Interpreter.h"
#include "cling/Interpreter/LookupHelper.h"
Expand Down
2 changes: 1 addition & 1 deletion test/Lookup/tag.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: %cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s
// RUN: %built_cling -fno-rtti 2>&1 < %s | FileCheck %s
// Test Lookup::Named and Namespace, used in quick simple lookups.

#include "cling/Interpreter/Interpreter.h"
Expand Down
2 changes: 1 addition & 1 deletion test/Lookup/template.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: %cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s
// RUN: %built_cling -fno-rtti 2>&1 < %s | FileCheck %s
// Test findClassTemplate, which is esentially is a DeclContext.
#include "cling/Interpreter/Interpreter.h"
#include "cling/Interpreter/LookupHelper.h"
Expand Down
2 changes: 1 addition & 1 deletion test/NullDeref/BinOp.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: %cat %s | %cling -Xclang -verify
// RUN: %cling -Xclang -verify < %s
// XFAIL: powerpc64
//This file checks a pointer load operation for null prt dereference.
int *p = 0;
Expand Down
2 changes: 1 addition & 1 deletion test/NullDeref/Cast.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: %cat %s | %cling -Xclang -verify
// RUN: %cling -Xclang -verify < %s
// XFAIL: powerpc64
//This file checks a pointer load operation for null prt dereference.
int *p = 0;;
Expand Down
2 changes: 1 addition & 1 deletion test/NullDeref/ExecutionTermination.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: %cat %s | %cling -Xclang -verify
// RUN: %cling -Xclang -verify < %s
// XFAIL: powerpc64
//This file checks that the execution ends after a null prt dereference.

Expand Down
2 changes: 1 addition & 1 deletion test/NullDeref/InvalidMemoryAddress.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: %cat %s | %cling -Xclang -verify
// RUN: %cling -Xclang -verify < %s
// XFAIL: powerpc64
//This file checks a dereference of an invalid memory address pointer..
int *p = (int*)0x1;
Expand Down
2 changes: 1 addition & 1 deletion test/NullDeref/Load.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: %cat %s | %cling -Xclang -verify
// RUN: %cling -Xclang -verify < %s
// XFAIL: powerpc64
//This file checks a pointer load operation for null prt dereference.
int *p;
Expand Down
2 changes: 1 addition & 1 deletion test/NullDeref/MethodCalls.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: %cat %s | %cling -Xclang -verify
// RUN: %cling -Xclang -verify < %s
// XFAIL: powerpc64
// This test verifies that we get nice warning if a method on null ptr object is
// called.
Expand Down
2 changes: 1 addition & 1 deletion test/NullDeref/NonNullArg.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: %cat %s | %cling -Xclang -verify | FileCheck %s
// RUN: %cling -Xclang -verify < %s | FileCheck %s
// XFAIL: powerpc64
//This file checks a call instruction. The called function has arguments with nonnull attribute.
extern "C" int printf(const char* fmt, ...);
Expand Down
2 changes: 1 addition & 1 deletion test/NullDeref/NonNullArgCustom.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: %cat %s | %cling -Xclang -verify
// RUN: %cling -Xclang -verify < %s
// XFAIL: powerpc64

// We must be able to handle cases where, there is a custom function that has
Expand Down
2 changes: 1 addition & 1 deletion test/Plugins/Simple.C
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %cat %s | %cling -fplugin=%cling_obj_root/tools/plugins/example/libclingDemoPlugin%shlibext | FileCheck %s
// RUN: %cling -fplugin=%cling_obj_root/tools/plugins/example/libclingDemoPlugin%shlibext < %s | FileCheck %s

// CHECK:Action::ParseArgs
// CHECK-NEXT:Action::CreateASTConsumer
Expand Down
2 changes: 1 addition & 1 deletion test/Prompt/ValuePrinter/Regression.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: %cat %s | %cling 2>&1 | FileCheck %s
// RUN: %cling 2>&1 < %s | FileCheck %s

// This file should be used as regression test for the value printing subsystem
// Reproducers of fixed bugs should be put here
Expand Down
2 changes: 1 addition & 1 deletion test/Prompt/ValuePrinter/Strings.C
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//------------------------------------------------------------------------------

// Windows wants -Wno-deprecated-declarations
//RUN: %cat %s | %cling -Wno-deprecated-declarations -Xclang -verify 2>&1 | FileCheck %s
//RUN: %cling -Wno-deprecated-declarations -Xclang -verify 2>&1 < %s | FileCheck %s

#include <stdlib.h>
#ifdef _WIN32
Expand Down
2 changes: 1 addition & 1 deletion test/Utils/Transform.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// RUN: %cat %s | %built_cling -fno-rtti | FileCheck %s
// RUN: %built_cling -fno-rtti < %s | 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.
Expand Down
2 changes: 0 additions & 2 deletions test/lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,9 @@ else:
if platform.system() in ['Windows']:
config.substitutions.append(('%dllexport', '"__declspec(dllexport)"'))
config.substitutions.append(('%fPIC', ''))
config.substitutions.append(('%cat', 'type'))
else:
config.substitutions.append(('%dllexport', ''))
config.substitutions.append(('%fPIC', '-fPIC'))
config.substitutions.append(('%cat', 'cat'))

if IsWindows and execute_external:
config.substitutions.append(('%mkdir', 'mkdir'))
Expand Down

0 comments on commit 9bbc9f8

Please sign in to comment.