[Piglit] [PATCH] Don't attempt to execute vector-arithmetic-[floating|integer].cl include files.

Aaron Watry awatry at gmail.com
Sun Dec 2 19:35:37 PST 2012


This corrects test failures after the all_cl.tests change last week.
Previously, tests were hard-coded, but now the test runner just runs each cl
and program_test file in the specified directories.

The .cl files in this commit were previously only included in
vector-arithmetic-*.program_test, never executed directly. They are missing a
config section, and are guaranteed to fail on their own.
---
 .../execute/vector-arithmetic-float4.program_test  |    2 +-
 .../program/execute/vector-arithmetic-floating.cl  |   25 -----------
 .../execute/vector-arithmetic-floating.cl.inc      |   25 +++++++++++
 .../execute/vector-arithmetic-int4.program_test    |    2 +-
 .../program/execute/vector-arithmetic-integer.cl   |   45 --------------------
 .../execute/vector-arithmetic-integer.cl.inc       |   45 ++++++++++++++++++++
 6 files changed, 72 insertions(+), 72 deletions(-)
 delete mode 100644 tests/cl/program/execute/vector-arithmetic-floating.cl
 create mode 100644 tests/cl/program/execute/vector-arithmetic-floating.cl.inc
 delete mode 100644 tests/cl/program/execute/vector-arithmetic-integer.cl
 create mode 100644 tests/cl/program/execute/vector-arithmetic-integer.cl.inc

diff --git a/tests/cl/program/execute/vector-arithmetic-float4.program_test b/tests/cl/program/execute/vector-arithmetic-float4.program_test
index 610500e..c2e614a 100644
--- a/tests/cl/program/execute/vector-arithmetic-float4.program_test
+++ b/tests/cl/program/execute/vector-arithmetic-float4.program_test
@@ -2,7 +2,7 @@
 name: Float4 arithmetic
 clc_version_min: 10
 
-program_source_file: vector-arithmetic-floating.cl
+program_source_file: vector-arithmetic-floating.cl.inc
 build_options: -D VECTOR_TYPE=float4
 
 dimensions: 1
diff --git a/tests/cl/program/execute/vector-arithmetic-floating.cl b/tests/cl/program/execute/vector-arithmetic-floating.cl
deleted file mode 100644
index 458fbe7..0000000
--- a/tests/cl/program/execute/vector-arithmetic-floating.cl
+++ /dev/null
@@ -1,25 +0,0 @@
-typedef VECTOR_TYPE vector_t;
-
-kernel void add(global vector_t* out, vector_t a, vector_t b) {
-	out[0] = a + b;
-}
-
-kernel void sub(global vector_t* out, vector_t a, vector_t b) {
-	out[0] = a - b;
-}
-
-kernel void mul(global vector_t* out, vector_t a, vector_t b) {
-	out[0] = a * b;
-}
-
-kernel void div(global vector_t* out, vector_t a, vector_t b) {
-	out[0] = a / b;
-}
-
-kernel void plus(global vector_t* out, vector_t in) {
-	out[0] = +in;
-}
-
-kernel void minus(global vector_t* out, vector_t in) {
-	out[0] = -in;
-}
diff --git a/tests/cl/program/execute/vector-arithmetic-floating.cl.inc b/tests/cl/program/execute/vector-arithmetic-floating.cl.inc
new file mode 100644
index 0000000..458fbe7
--- /dev/null
+++ b/tests/cl/program/execute/vector-arithmetic-floating.cl.inc
@@ -0,0 +1,25 @@
+typedef VECTOR_TYPE vector_t;
+
+kernel void add(global vector_t* out, vector_t a, vector_t b) {
+	out[0] = a + b;
+}
+
+kernel void sub(global vector_t* out, vector_t a, vector_t b) {
+	out[0] = a - b;
+}
+
+kernel void mul(global vector_t* out, vector_t a, vector_t b) {
+	out[0] = a * b;
+}
+
+kernel void div(global vector_t* out, vector_t a, vector_t b) {
+	out[0] = a / b;
+}
+
+kernel void plus(global vector_t* out, vector_t in) {
+	out[0] = +in;
+}
+
+kernel void minus(global vector_t* out, vector_t in) {
+	out[0] = -in;
+}
diff --git a/tests/cl/program/execute/vector-arithmetic-int4.program_test b/tests/cl/program/execute/vector-arithmetic-int4.program_test
index 7868969..484dfdd 100644
--- a/tests/cl/program/execute/vector-arithmetic-int4.program_test
+++ b/tests/cl/program/execute/vector-arithmetic-int4.program_test
@@ -2,7 +2,7 @@
 name: Int4 arithmetic
 clc_version_min: 10
 
-program_source_file: vector-arithmetic-integer.cl
+program_source_file: vector-arithmetic-integer.cl.inc
 build_options: -D VECTOR_TYPE=int4
 
 dimensions: 1
diff --git a/tests/cl/program/execute/vector-arithmetic-integer.cl b/tests/cl/program/execute/vector-arithmetic-integer.cl
deleted file mode 100644
index 306c70e..0000000
--- a/tests/cl/program/execute/vector-arithmetic-integer.cl
+++ /dev/null
@@ -1,45 +0,0 @@
-typedef VECTOR_TYPE vector_t;
-
-kernel void add(global vector_t* out, vector_t a, vector_t b) {
-	out[0] = a + b;
-}
-
-kernel void sub(global vector_t* out, vector_t a, vector_t b) {
-	out[0] = a - b;
-}
-
-kernel void mul(global vector_t* out, vector_t a, vector_t b) {
-	out[0] = a * b;
-}
-
-kernel void div(global vector_t* out, vector_t a, vector_t b) {
-	out[0] = a / b;
-}
-
-kernel void mod(global vector_t* out, vector_t a, vector_t b) {
-	out[0] = a % b;
-}
-
-kernel void plus(global vector_t* out, vector_t in) {
-	out[0] = +in;
-}
-
-kernel void minus(global vector_t* out, vector_t in) {
-	out[0] = -in;
-}
-
-kernel void postinc(global vector_t* out, vector_t in) {
-	out[0] = in++;
-}
-
-kernel void preinc(global vector_t* out, vector_t in) {
-	out[0] = ++in;
-}
-
-kernel void postdec(global vector_t* out, vector_t in) {
-	out[0] = in--;
-}
-
-kernel void predec(global vector_t* out, vector_t in) {
-	out[0] = --in;
-}
diff --git a/tests/cl/program/execute/vector-arithmetic-integer.cl.inc b/tests/cl/program/execute/vector-arithmetic-integer.cl.inc
new file mode 100644
index 0000000..306c70e
--- /dev/null
+++ b/tests/cl/program/execute/vector-arithmetic-integer.cl.inc
@@ -0,0 +1,45 @@
+typedef VECTOR_TYPE vector_t;
+
+kernel void add(global vector_t* out, vector_t a, vector_t b) {
+	out[0] = a + b;
+}
+
+kernel void sub(global vector_t* out, vector_t a, vector_t b) {
+	out[0] = a - b;
+}
+
+kernel void mul(global vector_t* out, vector_t a, vector_t b) {
+	out[0] = a * b;
+}
+
+kernel void div(global vector_t* out, vector_t a, vector_t b) {
+	out[0] = a / b;
+}
+
+kernel void mod(global vector_t* out, vector_t a, vector_t b) {
+	out[0] = a % b;
+}
+
+kernel void plus(global vector_t* out, vector_t in) {
+	out[0] = +in;
+}
+
+kernel void minus(global vector_t* out, vector_t in) {
+	out[0] = -in;
+}
+
+kernel void postinc(global vector_t* out, vector_t in) {
+	out[0] = in++;
+}
+
+kernel void preinc(global vector_t* out, vector_t in) {
+	out[0] = ++in;
+}
+
+kernel void postdec(global vector_t* out, vector_t in) {
+	out[0] = in--;
+}
+
+kernel void predec(global vector_t* out, vector_t in) {
+	out[0] = --in;
+}
-- 
1.7.10.4



More information about the Piglit mailing list