Skip to content
This repository has been archived by the owner on Oct 3, 2018. It is now read-only.

Commit

Permalink
Fixed test bench to find bash and other tools from Git/bin
Browse files Browse the repository at this point in the history
Fixed testbench to work also when there are spaces in source tree directory names.
  • Loading branch information
elhigu committed Apr 23, 2014
1 parent c1e2d1c commit 9edd932
Show file tree
Hide file tree
Showing 86 changed files with 197 additions and 174 deletions.
14 changes: 7 additions & 7 deletions cmake/FindOpenCL.cmake
Expand Up @@ -44,13 +44,6 @@ ELSE (APPLE)
SET(OPENCL_LIBRARY_SEARCH_PATHS)
SET(OPENCL_LIBRARY_64_SEARCH_PATHS)

# Nvidia
IF (DEFINED ENV{CUDA_INC_PATH})
SET(OPENCL_INCLUDE_SEARCH_PATHS ${OPENCL_INCLUDE_SEARCH_PATHS} $ENV{CUDA_INC_PATH})
SET(OPENCL_LIBRARY_64_SEARCH_PATHS ${OPENCL_LIBRARY_64_SEARCH_PATHS} $ENV{CUDA_LIB_PATH}/../lib64)
SET(OPENCL_LIBRARY_SEARCH_PATHS ${OPENCL_LIBRARY_SEARCH_PATHS} $ENV{CUDA_LIB_PATH}/../lib)
ENDIF()

# Intel SDK
IF (DEFINED ENV{INTELOCSDKROOT})
SET(OPENCL_INCLUDE_SEARCH_PATHS ${OPENCL_INCLUDE_SEARCH_PATHS} $ENV{INTELOCSDKROOT}/include)
Expand All @@ -65,6 +58,13 @@ ELSE (APPLE)
SET(OPENCL_LIBRARY_SEARCH_PATHS ${OPENCL_LIBRARY_SEARCH_PATHS} $ENV{AMDAPPSDKROOT}/lib/x86)
ENDIF()

# Nvidia
IF (DEFINED ENV{CUDA_INC_PATH})
SET(OPENCL_INCLUDE_SEARCH_PATHS ${OPENCL_INCLUDE_SEARCH_PATHS} $ENV{CUDA_INC_PATH})
SET(OPENCL_LIBRARY_64_SEARCH_PATHS ${OPENCL_LIBRARY_64_SEARCH_PATHS} $ENV{CUDA_LIB_PATH}/../lib64)
SET(OPENCL_LIBRARY_SEARCH_PATHS ${OPENCL_LIBRARY_SEARCH_PATHS} $ENV{CUDA_LIB_PATH}/../lib)
ENDIF()

# Override search paths with OpenCL_INCPATH env variable
IF (DEFINED ENV{OpenCL_INCPATH})
SET(OPENCL_INCLUDE_SEARCH_PATHS $ENV{OpenCL_INCPATH})
Expand Down
2 changes: 1 addition & 1 deletion test/3d-images.cl
@@ -1,4 +1,4 @@
// RUN: %webcl-validator %s 2>&1 | grep -v CHECK | %FileCheck %s
// RUN: %webcl-validator "%s" 2>&1 | grep -v CHECK | %FileCheck "%s"

// We don't want complaints from builtin function declarations.
// CHECK-NOT: error: WebCL doesn't support 3D images.
Expand Down
6 changes: 3 additions & 3 deletions test/access-array.cl
@@ -1,6 +1,6 @@
// RUN: %opencl-validator < %s
// RUN: %webcl-validator %s | %opencl-validator
// RUN: %webcl-validator %s | grep -v CHECK | %FileCheck %s
// RUN: %opencl-validator < "%s"
// RUN: %webcl-validator "%s" | %opencl-validator
// RUN: %webcl-validator "%s" | grep -v CHECK | %FileCheck "%s"

// prototypes for apple driver
int get_indexed_value(__global int *array, int index);
Expand Down
4 changes: 2 additions & 2 deletions test/access-invalid-array.cl
@@ -1,5 +1,5 @@
// RUN: %opencl-validator < %s
// RUN: %webcl-validator %s | %opencl-validator
// RUN: %opencl-validator < "%s"
// RUN: %webcl-validator "%s" | %opencl-validator

//prototypes for apple driver
int get_incorrectly_indexed_value(const int triple[6], int index);
Expand Down
6 changes: 3 additions & 3 deletions test/access-pointer.cl
@@ -1,6 +1,6 @@
// RUN: %opencl-validator < %s
// RUN: %webcl-validator %s | %opencl-validator
// RUN: %webcl-validator %s | grep -v CHECK | %FileCheck %s
// RUN: %opencl-validator < "%s"
// RUN: %webcl-validator "%s" | %opencl-validator
// RUN: %webcl-validator "%s" | grep -v CHECK | %FileCheck "%s"

// prototypes for apple driver
int get_pointed_value(__global int *pointer);
Expand Down
2 changes: 1 addition & 1 deletion test/atomics-base.cl
@@ -1,4 +1,4 @@
// RUN: %webcl-validator %s 2>&1 | grep -v CHECK | %FileCheck %s
// RUN: %webcl-validator "%s" 2>&1 | grep -v CHECK | %FileCheck "%s"

#pragma OPENCL EXTENSION cl_khr_int64_base_atomics : enable

Expand Down
2 changes: 1 addition & 1 deletion test/atomics-base2.cl
@@ -1,4 +1,4 @@
// RUN: %webcl-validator %s 2>&1 | grep -v CHECK | %FileCheck %s
// RUN: %webcl-validator "%s" 2>&1 | grep -v CHECK | %FileCheck "%s"

// not enabled:
//#pragma OPENCL EXTENSION cl_khr_int64_base_atomics : enable
Expand Down
2 changes: 1 addition & 1 deletion test/atomics-extended.cl
@@ -1,4 +1,4 @@
// RUN: %webcl-validator %s 2>&1 | grep -v CHECK | %FileCheck %s
// RUN: %webcl-validator "%s" 2>&1 | grep -v CHECK | %FileCheck "%s"

#pragma OPENCL EXTENSION cl_khr_int64_extended_atomics : enable

Expand Down
2 changes: 1 addition & 1 deletion test/atomics-extended2.cl
@@ -1,4 +1,4 @@
// RUN: %webcl-validator %s 2>&1 | grep -v CHECK | %FileCheck %s
// RUN: %webcl-validator "%s" 2>&1 | grep -v CHECK | %FileCheck "%s"

// Not enabled:
//#pragma OPENCL EXTENSION cl_khr_int64_extended_atomics : enable
Expand Down
2 changes: 1 addition & 1 deletion test/atomics.cl
@@ -1,4 +1,4 @@
// RUN: %webcl-validator %s 2>&1 | grep -v CHECK | %FileCheck %s
// RUN: %webcl-validator "%s" 2>&1 | grep -v CHECK | %FileCheck "%s"

// check only one return argument per argument length, per argument type and per address space

Expand Down
6 changes: 3 additions & 3 deletions test/attack.cl
@@ -1,6 +1,6 @@
// RUN: %opencl-validator < %s
// RUN: %webcl-validator %s | %opencl-validator
// RUN: %webcl-validator %s | grep -v CHECK | %FileCheck %s
// RUN: %opencl-validator < "%s"
// RUN: %webcl-validator "%s" | %opencl-validator
// RUN: %webcl-validator "%s" | grep -v CHECK | %FileCheck "%s"

__kernel void attack(__global int *array)
{
Expand Down
8 changes: 4 additions & 4 deletions test/builtin-vload-indirect.cl
@@ -1,7 +1,7 @@
// RUN: %webcl-validator %s | %opencl-validator
// RUN: %webcl-validator %s | grep -v CHECK | %FileCheck %s
// RUN: %webcl-validator %s | %kernel-runner --webcl --kernel builtin_wrappers --global float 7 | grep '^1,2,3,4,0,0,0,0,0'
// RUN: %webcl-validator %s | %kernel-runner --webcl --kernel builtin_wrappers --global float 8 | grep '^1,2,3,4,5,6,7,8,0'
// RUN: %webcl-validator "%s" | %opencl-validator
// RUN: %webcl-validator "%s" | grep -v CHECK | %FileCheck "%s"
// RUN: %webcl-validator "%s" | %kernel-runner --webcl --kernel builtin_wrappers --global float 7 | grep '^1,2,3,4,0,0,0,0,0'
// RUN: %webcl-validator "%s" | %kernel-runner --webcl --kernel builtin_wrappers --global float 8 | grep '^1,2,3,4,5,6,7,8,0'

// We should be declaring all builtins at the moment
// CHECK-NOT: warning: implicit declaration of function
Expand Down
8 changes: 4 additions & 4 deletions test/builtin-vload-offset.cl
@@ -1,7 +1,7 @@
// RUN: %webcl-validator %s | %opencl-validator
// RUN: %webcl-validator %s | %kernel-runner --webcl --kernel builtin_wrappers --global float 7 | grep '^2,3,4,5,0,0,0,0'
// RUN: %webcl-validator %s | %kernel-runner --webcl --kernel builtin_wrappers --global float 8 | grep '^2,3,4,5,0,0,0,0'
// RUN: %webcl-validator %s | %kernel-runner --webcl --kernel builtin_wrappers --global float 9 | grep '^2,3,4,5,6,7,8,9,0'
// RUN: %webcl-validator "%s" | %opencl-validator
// RUN: %webcl-validator "%s" | %kernel-runner --webcl --kernel builtin_wrappers --global float 7 | grep '^2,3,4,5,0,0,0,0'
// RUN: %webcl-validator "%s" | %kernel-runner --webcl --kernel builtin_wrappers --global float 8 | grep '^2,3,4,5,0,0,0,0'
// RUN: %webcl-validator "%s" | %kernel-runner --webcl --kernel builtin_wrappers --global float 9 | grep '^2,3,4,5,6,7,8,9,0'

__kernel void builtin_wrappers(__global char *output,
__global float *input)
Expand Down
2 changes: 1 addition & 1 deletion test/builtin-vload-prototypes.cl
@@ -1,5 +1,5 @@
// Check that the vload functions we declare on demand have the correct parameter lists
// RUN: %webcl-validator %s 2>&1 | grep -v CHECK | %FileCheck %s
// RUN: %webcl-validator "%s" 2>&1 | grep -v CHECK | %FileCheck "%s"

// We should be declaring all builtins at the moment
// CHECK-NOT: warning: implicit declaration of function
Expand Down
2 changes: 1 addition & 1 deletion test/builtin-vload-vstore-variations.cl
Expand Up @@ -7,7 +7,7 @@
// Check that no calls produce errors in the validator, and there are no implicit decl warnings
// FIXME: we shouldn't need to -Dcl_khr_fp{16,64} here - they should be defined based on the
// corresponding extensions being enabled, as they are in the CLI validator
// RUN: %webcl-validator %s -Dcl_khr_fp16 -Dcl_khr_fp64 2>&1 | grep -v CHECK | %FileCheck %s
// RUN: %webcl-validator "%s" -Dcl_khr_fp16 -Dcl_khr_fp64 2>&1 | grep -v CHECK | %FileCheck "%s"

// CHECK-NOT: error:

Expand Down
16 changes: 8 additions & 8 deletions test/builtin-vload-wrapper.cl
@@ -1,11 +1,11 @@
// RUN: sed 's/@SIZE@/4/g' %s | %opencl-validator
// RUN: sed 's/@SIZE@/4/g' %s | %webcl-validator - | %opencl-validator
// RUN: sed 's/@SIZE@/4/g' %s | %webcl-validator - | grep -v CHECK | %FileCheck %s
// RUN: sed 's/@SIZE@/4/g' %s | %webcl-validator - | %kernel-runner --webcl --kernel builtin_wrappers --global float 7 | grep '^1,2,3,4,0,0,0,0,0'
// RUN: sed 's/@SIZE@/4/g' %s | %webcl-validator - | %kernel-runner --webcl --kernel builtin_wrappers --global float 8 | grep '^1,2,3,4,5,6,7,8,0'
// RUN: sed 's/@SIZE@/8/g' %s | %webcl-validator - | %kernel-runner --webcl --kernel builtin_wrappers --global float 7 | grep '^0,0,0,0,0,0,0,0,0'
// RUN: sed 's/@SIZE@/8/g' %s | %webcl-validator - | %kernel-runner --webcl --kernel builtin_wrappers --global float 8 | grep '^1,2,3,4,0,0,0,0,0'
// RUN: sed 's/@SIZE@/8/g' %s | %webcl-validator - | %kernel-runner --webcl --kernel builtin_wrappers --global float 16 | grep '^1,2,3,4,9,10,11,12'
// RUN: sed 's/@SIZE@/4/g' "%s" | %opencl-validator
// RUN: sed 's/@SIZE@/4/g' "%s" | %webcl-validator - | %opencl-validator
// RUN: sed 's/@SIZE@/4/g' "%s" | %webcl-validator - | grep -v CHECK | %FileCheck "%s"
// RUN: sed 's/@SIZE@/4/g' "%s" | %webcl-validator - | %kernel-runner --webcl --kernel builtin_wrappers --global float 7 | grep '^1,2,3,4,0,0,0,0,0'
// RUN: sed 's/@SIZE@/4/g' "%s" | %webcl-validator - | %kernel-runner --webcl --kernel builtin_wrappers --global float 8 | grep '^1,2,3,4,5,6,7,8,0'
// RUN: sed 's/@SIZE@/8/g' "%s" | %webcl-validator - | %kernel-runner --webcl --kernel builtin_wrappers --global float 7 | grep '^0,0,0,0,0,0,0,0,0'
// RUN: sed 's/@SIZE@/8/g' "%s" | %webcl-validator - | %kernel-runner --webcl --kernel builtin_wrappers --global float 8 | grep '^1,2,3,4,0,0,0,0,0'
// RUN: sed 's/@SIZE@/8/g' "%s" | %webcl-validator - | %kernel-runner --webcl --kernel builtin_wrappers --global float 16 | grep '^1,2,3,4,9,10,11,12'

// We should be declaring all builtins at the moment
// CHECK-NOT: warning: implicit declaration of function
Expand Down
16 changes: 8 additions & 8 deletions test/builtin-vstore-wrapper.cl
@@ -1,11 +1,11 @@
// RUN: sed 's/@SIZE@/4/g' %s | %opencl-validator
// RUN: sed 's/@SIZE@/4/g' %s | %webcl-validator - | %opencl-validator
// RUN: sed 's/@SIZE@/4/g' %s | %webcl-validator - | grep -v CHECK | %FileCheck %s
// RUN: sed 's/@SIZE@/4/g' %s | %webcl-validator - | %kernel-runner --webcl --kernel builtin_wrappers --global float 7 | grep '^1,2,3,4,-1,-1,-1,0'
// RUN: sed 's/@SIZE@/4/g' %s | %webcl-validator - | %kernel-runner --webcl --kernel builtin_wrappers --global float 8 | grep '^1,2,3,4,1,2,3,4,0'
// RUN: sed 's/@SIZE@/8/g' %s | %webcl-validator - | %kernel-runner --webcl --kernel builtin_wrappers --global float 7 | grep '^-1,-1,-1,-1,-1,-1,-1,0'
// RUN: sed 's/@SIZE@/8/g' %s | %webcl-validator - | %kernel-runner --webcl --kernel builtin_wrappers --global float 8 | grep '^1,2,3,4,5,6,7,8,0'
// RUN: sed 's/@SIZE@/8/g' %s | %webcl-validator - | %kernel-runner --webcl --kernel builtin_wrappers --global float 16 | grep '^1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8,0'
// RUN: sed 's/@SIZE@/4/g' "%s" | %opencl-validator
// RUN: sed 's/@SIZE@/4/g' "%s" | %webcl-validator - | %opencl-validator
// RUN: sed 's/@SIZE@/4/g' "%s" | %webcl-validator - | grep -v CHECK | %FileCheck "%s"
// RUN: sed 's/@SIZE@/4/g' "%s" | %webcl-validator - | %kernel-runner --webcl --kernel builtin_wrappers --global float 7 | grep '^1,2,3,4,-1,-1,-1,0'
// RUN: sed 's/@SIZE@/4/g' "%s" | %webcl-validator - | %kernel-runner --webcl --kernel builtin_wrappers --global float 8 | grep '^1,2,3,4,1,2,3,4,0'
// RUN: sed 's/@SIZE@/8/g' "%s" | %webcl-validator - | %kernel-runner --webcl --kernel builtin_wrappers --global float 7 | grep '^-1,-1,-1,-1,-1,-1,-1,0'
// RUN: sed 's/@SIZE@/8/g' "%s" | %webcl-validator - | %kernel-runner --webcl --kernel builtin_wrappers --global float 8 | grep '^1,2,3,4,5,6,7,8,0'
// RUN: sed 's/@SIZE@/8/g' "%s" | %webcl-validator - | %kernel-runner --webcl --kernel builtin_wrappers --global float 16 | grep '^1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8,0'

// We should be declaring all builtins at the moment
// CHECK-NOT: warning: implicit declaration of function
Expand Down
4 changes: 2 additions & 2 deletions test/check-empty-memory/original.cl
@@ -1,5 +1,5 @@
// RUN: %opencl-validator < %s
// RUN: %webcl-validator %s | %check-empty-memory -transformed
// RUN: %opencl-validator < "%s"
// RUN: %webcl-validator "%s" | %check-empty-memory -transformed

__kernel void copy_local_mem(
__global int *int_result,
Expand Down
10 changes: 5 additions & 5 deletions test/complete_transformation.cl
@@ -1,8 +1,8 @@
// RUN: %opencl-validator < %s
// RUN: %webcl-validator %s | %opencl-validator
// RUN: %webcl-validator %s | grep -v CHECK | %FileCheck %s
// RUN: %kernel-runner --kernel awesomize --global float4 50 --global float4 50 --nooutput --constant float4 50 --local float4 1024 --gcount 50 < %s
// RUN: %webcl-validator %s | %kernel-runner --nooutput --kernel awesomize --global float4 50 --global float4 50 --constant float4 50 --local float4 1024 --gcount 50 --webcl
// RUN: %opencl-validator < "%s"
// RUN: %webcl-validator "%s" | %opencl-validator
// RUN: %webcl-validator "%s" | grep -v CHECK | %FileCheck "%s"
// RUN: %kernel-runner --kernel awesomize --global float4 50 --global float4 50 --nooutput --constant float4 50 --local float4 1024 --gcount 50 < "%s"
// RUN: %webcl-validator "%s" | %kernel-runner --nooutput --kernel awesomize --global float4 50 --global float4 50 --constant float4 50 --local float4 1024 --gcount 50 --webcl

// run output is not validated, because the output is not deterministic output depends on driver properties
// like wgsize
Expand Down
2 changes: 1 addition & 1 deletion test/complete_transformation_instrumented.cl
@@ -1,4 +1,4 @@
// RUN: %opencl-validator < %s
// RUN: %opencl-validator < "%s"

/**
* Completely unoptimized instrumentation, which does collect all the variables
Expand Down
2 changes: 1 addition & 1 deletion test/declared-functions.cl
@@ -1,4 +1,4 @@
// RUN: %webcl-validator %s 2>/dev/null
// RUN: %webcl-validator "%s" 2>/dev/null

// ok, defined later
void foo(void);
Expand Down
2 changes: 1 addition & 1 deletion test/extension-commandline-disable.cl
@@ -1,4 +1,4 @@
// RUN: %webcl-validator %s --disable=cl_khr_fp16 2>&1 | grep -v CHECK | %FileCheck %s
// RUN: %webcl-validator "%s" --disable=cl_khr_fp16 2>&1 | grep -v CHECK | %FileCheck "%s"

// CHECK-DAG: error: WebCL or platform doesn't support enabling 'cl_khr_fp16' extension.

Expand Down
4 changes: 2 additions & 2 deletions test/extension-disable.cl
@@ -1,5 +1,5 @@
// RUN: grep -v ^#pragma %s | %opencl-validator
// RUN: %webcl-validator %s
// RUN: grep -v ^#pragma "%s" | %opencl-validator
// RUN: %webcl-validator "%s"

// All extensions are disabled by default in OpenCL. We don't complain
// if extensions are disabled explicitly afterwards.
Expand Down
2 changes: 1 addition & 1 deletion test/extension-disable2.cl
@@ -1,4 +1,4 @@
// RUN: %webcl-validator %s 2>&1 | grep -v CHECK | %FileCheck %s
// RUN: %webcl-validator "%s" 2>&1 | grep -v CHECK | %FileCheck "%s"

#pragma OPENCL EXTENSION cl_khr_fp64 : disable

Expand Down
4 changes: 2 additions & 2 deletions test/extension-enable.cl
@@ -1,5 +1,5 @@
// RUN: grep -v ^#pragma %s | %opencl-validator
// RUN: %webcl-validator %s 2>&1 | grep -v CHECK | %FileCheck %s
// RUN: grep -v ^#pragma "%s" | %opencl-validator
// RUN: %webcl-validator "%s" 2>&1 | grep -v CHECK | %FileCheck "%s"

// We allow only certain extensions to be enabled.

Expand Down
2 changes: 1 addition & 1 deletion test/extension-enable2.cl
@@ -1,4 +1,4 @@
// RUN: %webcl-validator %s >&/dev/null
// RUN: %webcl-validator "%s" >&/dev/null

#pragma OPENCL EXTENSION cl_khr_fp64 : enable

Expand Down
2 changes: 1 addition & 1 deletion test/extension-enable3.cl
@@ -1,4 +1,4 @@
// RUN: %webcl-validator %s 2>&1 | grep -v CHECK | %FileCheck %s
// RUN: %webcl-validator "%s" 2>&1 | grep -v CHECK | %FileCheck "%s"

// CHECK-DAG: error: use of undeclared identifier 'double2'
// CHECK-DAG: error: use of type 'double' requires cl_khr_fp64 extension to be enabled
Expand Down
2 changes: 1 addition & 1 deletion test/extension-enable4.cl
@@ -1,4 +1,4 @@
// RUN: %webcl-validator %s >&/dev/null
// RUN: %webcl-validator "%s" >&/dev/null

#pragma OPENCL EXTENSION cl_khr_fp16 : enable

Expand Down
2 changes: 1 addition & 1 deletion test/extension-enable5.cl
@@ -1,4 +1,4 @@
// RUN: %webcl-validator %s 2>&1 | grep -v CHECK | %FileCheck %s
// RUN: %webcl-validator "%s" 2>&1 | grep -v CHECK | %FileCheck "%s"

// do not enable halfs
//#pragma OPENCL EXTENSION cl_khr_fp16 : enable
Expand Down
6 changes: 3 additions & 3 deletions test/find-srcloc-ignores-strings-and-comments.cl
@@ -1,6 +1,6 @@
// RUN: %opencl-validator < %s
// RUN: %webcl-validator %s | %opencl-validator
// RUN: %webcl-validator %s | grep -v CHECK | %FileCheck %s
// RUN: %opencl-validator < "%s"
// RUN: %webcl-validator "%s" | %opencl-validator
// RUN: %webcl-validator "%s" | grep -v CHECK | %FileCheck "%s"

#define STRTYPE const __constant char *

Expand Down
2 changes: 1 addition & 1 deletion test/goto.cl
@@ -1,4 +1,4 @@
// RUN: %webcl-validator %s 2>&1 | grep -v CHECK | %FileCheck %s
// RUN: %webcl-validator "%s" 2>&1 | grep -v CHECK | %FileCheck "%s"

__kernel void goto_test(void)
{
Expand Down
2 changes: 1 addition & 1 deletion test/goto2.cl
@@ -1,4 +1,4 @@
// RUN: %webcl-validator %s 2>&1 | grep -v CHECK | %FileCheck %s
// RUN: %webcl-validator "%s" 2>&1 | grep -v CHECK | %FileCheck "%s"

#define paste(X, Y) X##Y

Expand Down
2 changes: 1 addition & 1 deletion test/illegal-image2d-access.cl
@@ -1,4 +1,4 @@
// RUN: %webcl-validator %s 2>&1 | grep -v CHECK | %FileCheck %s
// RUN: %webcl-validator "%s" 2>&1 | grep -v CHECK | %FileCheck "%s"

constant sampler_t sampler =
CLK_NORMALIZED_COORDS_FALSE | CLK_ADDRESS_CLAMP | CLK_FILTER_NEAREST;
Expand Down
2 changes: 1 addition & 1 deletion test/image2d-type-as-argument.cl
@@ -1,4 +1,4 @@
// RUN: %webcl-validator %s 2>&1 | grep -v CHECK | %FileCheck %s
// RUN: %webcl-validator "%s" 2>&1 | grep -v CHECK | %FileCheck "%s"

void foo(image2d_t image, int i)
{
Expand Down
2 changes: 1 addition & 1 deletion test/image2d-type-as-argument2.cl
@@ -1,4 +1,4 @@
// RUN: %webcl-validator %s 2>&1 | grep -v CHECK | %FileCheck %s
// RUN: %webcl-validator "%s" 2>&1 | grep -v CHECK | %FileCheck "%s"

void foo(image2d_t image, int i)
{
Expand Down
2 changes: 1 addition & 1 deletion test/image2d-type-relocation.cl
@@ -1,5 +1,5 @@
// image2d_t argument should not be relocated
// RUN: %webcl-validator %s 2>&1 | grep -v CHECK | %FileCheck %s
// RUN: %webcl-validator "%s" 2>&1 | grep -v CHECK | %FileCheck "%s"

void bar(image2d_t image)
{
Expand Down
2 changes: 1 addition & 1 deletion test/image2d-typedef.cl
@@ -1,4 +1,4 @@
// RUN: %webcl-validator %s 2>&1 | grep -v CHECK | %FileCheck %s
// RUN: %webcl-validator "%s" 2>&1 | grep -v CHECK | %FileCheck "%s"

typedef __read_only image2d_t myimage;

Expand Down
4 changes: 2 additions & 2 deletions test/include-directive.cl
@@ -1,5 +1,5 @@
// RUN: %opencl-validator -I%include/.. < %s
// RUN: %webcl-validator %s 2>&1 | grep -v CHECK | %FileCheck %s
// RUN: %opencl-validator -I%include/.. < "%s"
// RUN: %webcl-validator "%s" 2>&1 | grep -v CHECK | %FileCheck "%s"

// We don't allow include directives in main source files.
// CHECK: error: WebCL doesn't support the include directive.
Expand Down
6 changes: 3 additions & 3 deletions test/include-option.cl
@@ -1,6 +1,6 @@
// RUN: cat %include/1st-level.h %s | %opencl-validator -I%include
// RUN: %webcl-validator %s -I%include -include 1st-level.h | grep -v IMPLICIT | %opencl-validator
// RUN: %webcl-validator %s -I%include -include 1st-level.h 2>&1 | grep -v CHECK | %FileCheck %s
// RUN: cat %include/1st-level.h "%s" | %opencl-validator -I%include
// RUN: %webcl-validator "%s" -I%include -include 1st-level.h | grep -v IMPLICIT | %opencl-validator
// RUN: %webcl-validator "%s" -I%include -include 1st-level.h 2>&1 | grep -v CHECK | %FileCheck "%s"

// This should be OK. We aren't using the include directive.
__kernel void use_function_from_include_option(
Expand Down
6 changes: 3 additions & 3 deletions test/initialize-autovariable.cl
@@ -1,6 +1,6 @@
// RUN: %opencl-validator < %s
// RUN: %webcl-validator %s | grep -v CHECK | %FileCheck %s
// RUN: %webcl-validator %s | sed 's@////@@' | %kernel-runner --webcl --kernel zero_private --gcount 1 | grep "123,0,0,0,0,0,0,0,123"
// RUN: %opencl-validator < "%s"
// RUN: %webcl-validator "%s" | grep -v CHECK | %FileCheck "%s"
// RUN: %webcl-validator "%s" | sed 's@////@@' | %kernel-runner --webcl --kernel zero_private --gcount 1 | grep "123,0,0,0,0,0,0,0,123"

// verify that a and b are actually collected to private address space to make
// sure that there is no unintialized variables left in code
Expand Down
4 changes: 2 additions & 2 deletions test/initializer-in-for-statement.cl
@@ -1,5 +1,5 @@
// RUN: %opencl-validator < %s
// RUN: %webcl-validator %s 2>&1 | grep -v CHECK | %FileCheck %s
// RUN: %opencl-validator < "%s"
// RUN: %webcl-validator "%s" 2>&1 | grep -v CHECK | %FileCheck "%s"

__kernel void initializer_in_for_statement(__global int *array)
{
Expand Down
6 changes: 3 additions & 3 deletions test/insert-parameters.cl
@@ -1,6 +1,6 @@
// RUN: %opencl-validator < %s
// RUN: %webcl-validator %s | %opencl-validator
// RUN: %webcl-validator %s | grep -v CHECK | %FileCheck %s
// RUN: %opencl-validator < "%s"
// RUN: %webcl-validator "%s" | %opencl-validator
// RUN: %webcl-validator "%s" | grep -v CHECK | %FileCheck "%s"

// prototypes for apple driver
int no_parameters(void);
Expand Down
2 changes: 1 addition & 1 deletion test/kernel_to_kernel_call.cl
@@ -1,4 +1,4 @@
// RUN: %webcl-validator %s 2>&1 | grep -v CHECK | %FileCheck %s
// RUN: %webcl-validator "%s" 2>&1 | grep -v CHECK | %FileCheck "%s"

//CHECK: error: Calling kernels is not allowed.

Expand Down

0 comments on commit 9edd932

Please sign in to comment.