From 6247ce2d6a0a6603df45acc76218801efc225dff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Toma=C5=BEi=C4=8D?= Date: Wed, 29 Aug 2012 22:40:58 +0200 Subject: doc: Add cl tests documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Here the OpenCL testing framework is documented in README file and each test type is documented in respective doc_type and template_type files. Signed-off-by: Blaž Tomažič --- tests/cl/README | 107 +++++++++++++++++++++++++++++++++ tests/cl/doc_api.c | 54 +++++++++++++++++ tests/cl/doc_custom.c | 46 ++++++++++++++ tests/cl/doc_program.c | 56 +++++++++++++++++ tests/cl/doc_program.cl | 89 +++++++++++++++++++++++++++ tests/cl/doc_program.program_test | 97 ++++++++++++++++++++++++++++++ tests/cl/template_api.c | 41 +++++++++++++ tests/cl/template_custom.c | 41 +++++++++++++ tests/cl/template_program.c | 41 +++++++++++++ tests/cl/template_program.cl | 9 +++ tests/cl/template_program.program_test | 8 +++ 11 files changed, 589 insertions(+) create mode 100644 tests/cl/README create mode 100644 tests/cl/doc_api.c create mode 100644 tests/cl/doc_custom.c create mode 100644 tests/cl/doc_program.c create mode 100644 tests/cl/doc_program.cl create mode 100644 tests/cl/doc_program.program_test create mode 100644 tests/cl/template_api.c create mode 100644 tests/cl/template_custom.c create mode 100644 tests/cl/template_program.c create mode 100644 tests/cl/template_program.cl create mode 100644 tests/cl/template_program.program_test (limited to 'tests') diff --git a/tests/cl/README b/tests/cl/README new file mode 100644 index 00000000..34a26f82 --- /dev/null +++ b/tests/cl/README @@ -0,0 +1,107 @@ + +OpenCL testing framework +------------------------ +1. About +2. Test types +3. How to run tests +4. How to write tests + + +1. About +-------- + +This framework is used to write OpenCL tests for Piglit framework. + +The framework supports creating tests to run once or per each platform (if +cl_khr_icd is supported, else only one platform is tested) or per each +device. Each test can be limited to a particular group of platforms or +devices. + +There are different test types which can be used to write a test. These +test types automate checking for different implementation functionality +(OpenCL version, extensions, filter by platform name,...) and creating +objects (context creation, program creation and building, source code +loading, buffer creation and buffer data initialization,...). + +2. Test types +------------- + +Currently there are three different types of tests: + + * API tests: + These type of tests are meant for testing the API functions. + Documentation is located at tests/cl/doc_api.c. + + * Program tests: + These type of tests are meant for testing compilation of OpenCL C + programs and kernel execution. These tests can be normal C/C++ programs + or special files that are parsed by program-tester + (bin/cl-program-tester). This program takes in an ini-like file + (test.program_test) or an OpenCL source code (test.cl) with a special + comment. The binary programs (test.bin) can be referenced from + program_test files. + Documentation is located at tests/cl/doc_program.c, + test/cl/doc_program.cl and test/cl/doc_program.program_test. + + * Custom tests: + These type of tests are for tests that don't fit well in any other test + type. + Documentation is located at tests/cl/doc_custom.c. + +3. How to run tests +------------------- + +All compilable tests are compiled to the bin/ folder. Each test has a +prefix applied to it, depending on its type: + * API: cl-api- + * Program: cl-program- + * Custom: cl-custom- + +The OpenCL C and program_test tests are parsed and run by program-tester +that is located at bin/cl-program-tester. + +Each test can be run independently or they can all be run by Piglit as a +test set. The test set is located at tests/all_cl.tests. + +Each test accepts the following environment variables: + * PIGLIT_CL_PLATFORM: Only run test on platforms whose platform name + begins with PIGLIT_CL_PLATFORM. (This variable + is accepted only when the test is run per platform + or per device) + * PIGLIT_CL_DEVICE: Only run tests on devices whose device name begins + with PIGLIT_CL_DEVICE. (This variable is accepted only + when the test is run per device) + * PIGLIT_CL_VERSION: Test against OpenCL version PIGLIT_CL_VERSION. This + variable is a normal OprnCL versioning number + (example: 1.1). + +The same variables are accepted as program arguments: + * -platform name: Same as PIGLIT_CL_PLATFORM. + * -device name: Same as PIGLIT_CL_DEVICE. + * -version ver: Same as PIGLIT_CL_VERSION. + +4. How to write tests +--------------------- + +Tests should be created in appropriate folder in cl/tests: + * api/: API tests + * program/: Program tests + * program/build/: Program-tester compilation tests + * program/build/fail/: Program-tester compilation tests that should fail + * program/execute: Program-tester kernel execution tests + +Templates for the different types of tests and documentation for them is +located at tests/cl/doc_* and tests/cl/template_*. + +To cover the widest range of OpenCL versions with one test, each compiled +test is passed an env->version variable which contains a version number +against which the test should test. Also the PIGLIT_CL_VERSION macro +present in piglit-util-cl.h contains a version number against which Piglit +was compiled. Both numbers are multiples of 10 of OpenCL version (1.1 -> 11). + +The program tests run by program-tester (bin/cl-program-tester) are compiled +with a macro __OPENCL_C_VERSION__ which tells against which version the +source will be compiled. To comply with OpenCL spec this version number is a +multiple of 100 of OpenCL C version (1.1 -> 110). + +All new tests should be added to an appropriate group in tests/all_cl.tests. diff --git a/tests/cl/doc_api.c b/tests/cl/doc_api.c new file mode 100644 index 00000000..c9e66d9a --- /dev/null +++ b/tests/cl/doc_api.c @@ -0,0 +1,54 @@ +#include "piglit-framework-cl-api.h" + +/* + * This is a file for API tests. + * This type of test should be used for testing the API functions. + * For each test uncomment the appropriate options and delete the rest. + * Empty template is in template_api.c + */ + +/* Function prototypes for config.init_func and config.clean_func */ +void init(const int argc, const char** argv, void* config); +void clean(const int argc, const char** argv,void* config); + +/* Test configuration */ +PIGLIT_CL_API_TEST_CONFIG_BEGIN + + /* Common */ + config.name = "clFunctionName"; // Name of the test + config.run_per_platform = true; // Run piglit_cl_test per each platform + config.run_per_device = true; // Run piglit_cl_test per each device + config.platform_regex = ".*Gallium.*"; // Only run on platforms that match this POSIX + // regex (if run_per_platform or run_per_device is true) + config.device_regex = ".*RV300.*"; // Only run on device that match this POSIX + // regex (if run_per_device is true) + config.require_platform_extensions = "ext1 ext2" //Space-delimited required platform extensions + config.require_device_extensions = "ext1 ext2" //Space-delimited required device extensions + init_func = init; // Function called before all the test calls + clean_func = clean; // Function called after all the test calls + + /* API */ + config.version_min = 10; // Minimum required OpenCL version + config.version_max = 12; // Maximum required OpenCL version + config.create_context = true; // Create struct piglit_cl_context for each test + // (if run_per_platform or run_per_device are defined) + config.program_source = "kernel void test(){}"; // Create a program for each test + // (if run_per_platform or run_per_device are true) + config.build_options = "-D DEF"; // Build options for the program + +PIGLIT_CL_API_TEST_CONFIG_END + + +/* Test function */ +enum piglit_result +piglit_cl_test(const int argc, + const char** argv, + const struct piglit_cl_api_test_config* config, + const struct piglit_cl_api_test_env* env) // look at piglit-framework-cl-api.h +{ + enum piglit_result result = PIGLIT_PASS; + + /* Code for test */ + + return result; +} diff --git a/tests/cl/doc_custom.c b/tests/cl/doc_custom.c new file mode 100644 index 00000000..1e714a78 --- /dev/null +++ b/tests/cl/doc_custom.c @@ -0,0 +1,46 @@ +#include "piglit-framework-cl-custom.h" + +/* + * This is a file for Custom tests. + * This type of test should be used for tests that don't quite fit + * in other OpenCL tests (api and program tests in the time of writing). + * For each test uncomment the appropriate options and delete the rest. + * Empty template is in template_custom.c + */ + +/* Function prototypes for config.init_func and config.clean_func */ +void init(const int argc, const char** argv, void* config); +void clean(const int argc, const char** argv,void* config); + +/* Test configuration */ +PIGLIT_CL_CUSTOM_TEST_CONFIG_BEGIN + + /* Common */ + config.name = "Test name"; // Name of the test + config.run_per_platform = true; // Run piglit_cl_test per each platform + config.run_per_device = true; // Run piglit_cl_test per each device + config.platform_regex = ".*Gallium.*"; // Only run on platforms that match this POSIX + // regex (if run_per_platform or run_per_device is true) + config.device_regex = ".*RV300.*"; // Only run on device that match this POSIX + // regex (if run_per_device is true) + config.require_platform_extensions = "ext1 ext2" //Space-delimited required platform extensions + config.require_device_extensions = "ext1 ext2" //Space-delimited required device extensions + init_func = init; // Function called before all the test calls + clean_func = clean; // Function called after all the test calls + +PIGLIT_CL_CUSTOM_TEST_CONFIG_END + + +/* Test function */ +enum piglit_result +piglit_cl_test(const int argc, + const char** argv, + const struct piglit_cl_custom_test_config* config, + const struct piglit_cl_custom_test_env* env) // look at piglit-framework-cl-custom.h +{ + enum piglit_result result = PIGLIT_PASS; + + /* Code for test */ + + return result; +} diff --git a/tests/cl/doc_program.c b/tests/cl/doc_program.c new file mode 100644 index 00000000..b44fa1fd --- /dev/null +++ b/tests/cl/doc_program.c @@ -0,0 +1,56 @@ +#include "piglit-framework-cl-program.h" + +/* + * This is a file for program tests. + * This type of test should be used for testing program building and + * kernel execution. + * Empty template is in template_program.c + */ + +/* Function prototypes for config.init_func and config.clean_func */ +void init(const int argc, const char** argv, void* config); +void clean(const int argc, const char** argv,void* config); + +/* Test configuration */ +PIGLIT_CL_PROGRAM_TEST_CONFIG_BEGIN + + /* Common */ + config.name = "Add and subtract"; // Name of the test + config.run_per_platform = true; // Run piglit_cl_test per each platform + config.run_per_device = true; // Run piglit_cl_test per each device + config.platform_regex = ".*Gallium.*"; // Only run on platforms that match this POSIX + // regex (if run_per_platform or run_per_device is true) + config.device_regex = ".*RV300.*"; // Only run on device that match this POSIX + // regex (if run_per_device is true) + config.require_platform_extensions = "ext1 ext2"; //Space-delimited required platform extensions + config.require_device_extensions = "ext1 ext2"; //Space-delimited required device extensions + init_func = init; // Function called before all the test calls + clean_func = clean; // Function called after all the test calls + + /* Program */ + config.clc_version_min = 10; // Minimum required OpenCL C version + config.clc_version_max = 12; // Maximum required OpenCL C version + config.program_source = "kernel void test(){}"; // Create a program from string for each test + config.program_source_file = "test.clc"; // Create a program from file for each test + config.program_binary = "kernel void test(){}"; // Create a program from string for each test (binary) + config.program_binary_file = "test.bin"; // Create a program from file for each test (binary) + config.build_options = "-D DEF"; // Build options for the program + config.expect_build_fail = true; // Expect that build will fail + config.kernel_name = "test"; // Create a kernel + +PIGLIT_CL_PROGRAM_TEST_CONFIG_END + + +/* Test function */ +enum piglit_result +piglit_cl_test(const int argc, + const char** argv, + const struct piglit_cl_program_test_config* config, + const struct piglit_cl_program_test_env* env) // look at piglit-framework-cl-program.h +{ + enum piglit_result result = PIGLIT_PASS; + + /* Code for test */ + + return result; +} diff --git a/tests/cl/doc_program.cl b/tests/cl/doc_program.cl new file mode 100644 index 00000000..84e92eeb --- /dev/null +++ b/tests/cl/doc_program.cl @@ -0,0 +1,89 @@ +/*! +#^^ Configuration start + +# This is an OpenCL C file for program-tester tests +# This type of test should be used for testing program building and/or +# kernel execution. +# Empty template is in template_program.cl + +# This is a comment + + +# Configuration # + +[config] + +name: Add and subtract # Name of the test +clc_version_min: 10 # Minimum requirec OpenCL C version +clc_version_max: 12 # Maximum required OpenCL C version +#platform_regex: .*Gallium.* # Only run on platforms that match this POSIX regex +#device_regex: .*RV300.* # Only run on devices that match this POSIX regex +#require_platform_extensions: ext1 ext2 # Space-delimited required platform extensions +#require_device_extensions: ext1 ext2 # Space-delimited required device extensions + +build_options: -D DEF # Build options for the program +#expect_build_fail: true # Expect that build will fail + +kernel_name: add # Default kernel to run +expect_test_fail: true # Expect that tests will fail (arguments won't check out) + +dimensions: 3 # Number of dimensions for ND kernel (default: 1) +global_size: 10 10 10 # Global work size for ND kernel (default: 1 0 0) +local_size: 2 2 2 # Local work size for ND kernel (default: NULL) + + +# Execution tests # + +[test] +name: Add # Execution test name +kernel_name: add # Override kernel_name from [config] +expect_test_fail: false # Override expect_test_fail from [config] +dimensions: 1 # Override dimensions from [config] +global_size: 15 15 15 # Override global_size from [config] +local_size: 1 1 1 # Override global_size from [config] + +arg_in: 0 buffer int[15] 0 1 2 3 4 \ # Buffer argument with data to initialize it. + 5 6 7 8 9 \ # \ is used for a multiline value. + 0XA 0XB 0XC 0XD 0XE # Hex values are supported. +arg_in: 2 float 1.0 # Float argument +arg_out: 1 buffer uint[15] 1 2 3 4 5 \ # Buffer argument with expected data. + 6 7 8 9 10 \ # Same argument can have different types as long + 11 12 13 14 15 # as the size of the data is correct. For example + # arg_in can be of type int[4] and arg_out of type uchar[16] + +[test] +name: Subtract # Execution test name +kernel_name: sub # Override kernel_name from [config] +expect_test_fail: false # Override expect_test_fail from [config] +dimensions: 1 # Override dimensions from [config] +global_size: 6 6 6 # Override global_size from [config] +local_size: 2 2 2 # Override global_size from [config] + +arg_in: 0 buffer float2[6] repeat 5 4 # Buffer argument with repeated data to initialize it (5 4 5 4 5 4) +arg_in: 1 buffer float2[6] random # Buffer argument with random data to initialize it + # (not needed here, but provided as example) +arg_in: 2 float2 1 1 # Int argument +arg_out: 1 buffer float2[6] repeat 4.1 3.1 \ # Buffer argument with repeated expected data (4.1 3.1 4.1 3.1 4.1 3.1) + tolerance 0.1 # Tolerate result data with +-0.1 offset + +#ˇˇ Configuration end +!*/ + +/* + * Every test is passed an OpenCL C version. + * For example version 1.2 is passed as 120 in + * __OPENCL_C_VERSION__ + */ +#if __OPENCL_C_VERSION__ >= 120 +const double d = 15; +#endif + +kernel void add(global int* x, global int* y, float z) { + int i = get_global_id(0); + y[i] = x[i]+z; +} + +kernel void sub(global float2* x, global float2* y, float2 z) { + int i = get_global_id(0); + y[i] = x[i]-z; +} diff --git a/tests/cl/doc_program.program_test b/tests/cl/doc_program.program_test new file mode 100644 index 00000000..3ff67a61 --- /dev/null +++ b/tests/cl/doc_program.program_test @@ -0,0 +1,97 @@ +# This is an OpenCL C file for program-tester tests +# This type of test should be used for testing program building and/or +# kernel execution. +# Empty template is in template_program.program_test + +# This is a comment + + +# Configuration # + +[config] + +name: Add and subtract # Name of the test +clc_version_min: 10 # Minimum requirec OpenCL C version +clc_version_max: 12 # Maximum required OpenCL C version +#platform_regex: .*Gallium.* # Only run on platforms that match this POSIX regex +#device_regex: .*RV300.* # Only run on devices that match this POSIX regex +#require_platform_extensions: ext1 ext2 # Space-delimited required platform extensions +#require_device_extensions: ext1 ext2 # Space-delimited required device extensions + +build_options: -D DEF # Build options for the program +#expect_build_fail: true # Expect that build will fail + +kernel_name: add # Default kernel to run +expect_test_fail: true # Expect that tests will fail (arguments won't check out) + +dimensions: 3 # Number of dimensions for ND kernel (default: 1) +global_size: 10 10 10 # Global work size for ND kernel (default: 1 0 0) +local_size: 2 2 2 # Local work size for ND kernel (default: NULL) + +#program_source_file: "program.cl" # Program source file path to use as source (relative to this file) +#program_binary_file: "program.bin" # Program binary file path to use as binary (relative to this file) + + +# Execution tests # + +[test] +name: Add # Execution test name +kernel_name: add # Override kernel_name from [config] +expect_test_fail: false # Override expect_test_fail from [config] +dimensions: 1 # Override dimensions from [config] +global_size: 15 15 15 # Override global_size from [config] +local_size: 1 1 1 # Override global_size from [config] + +arg_in: 0 buffer int[15] 0 1 2 3 4 \ # Buffer argument with data to initialize it. + 5 6 7 8 9 \ # \ is used for a multiline value. + 0XA 0XB 0XC 0XD 0XE # Hex values are supported. +arg_in: 2 float 1.0 # Float argument +arg_out: 1 buffer uint[15] 1 2 3 4 5 \ # Buffer argument with expected data. + 6 7 8 9 10 \ # Same argument can have different types as long + 11 12 13 14 15 # as the size of the data is correct. For example + # arg_in can be of type int[4] and arg_out of type uchar[16] + +[test] +name: Subtract # Execution test name +kernel_name: sub # Override kernel_name from [config] +expect_test_fail: false # Override expect_test_fail from [config] +dimensions: 1 # Override dimensions from [config] +global_size: 6 6 6 # Override global_size from [config] +local_size: 2 2 2 # Override global_size from [config] + +arg_in: 0 buffer float2[6] repeat 5 4 # Buffer argument with repeated data to initialize it (5 4 5 4 5 4) +arg_in: 1 buffer float2[6] random # Buffer argument with random data to initialize it + # (not needed here, but provided as example) +arg_in: 2 float2 1 1 # Int argument +arg_out: 1 buffer float2[6] repeat 4.1 3.1 \ # Buffer argument with repeated expected data (4.1 3.1 4.1 3.1 4.1 3.1) + tolerance 0.1 # Tolerate result data with +-0.1 offset + + +# Program section # + +# You can use 'program source' or 'program binary' + +#[program binary] +# +# /* Binary 'code' */ + +[program source] + +/* + * Every test is passed an OpenCL C version. + * For example version 1.2 is passed as 120 in + * __OPENCL_C_VERSION__ + */ +#if __OPENCL_C_VERSION__ >= 120 +const double d = 15; +#endif + +kernel void add(global int* x, global int* y, float z) { + int i = get_global_id(0); + y[i] = x[i]+z; +} + +kernel void sub(global float2* x, global float2* y, float2 z) { + int i = get_global_id(0); + y[i] = x[i]-z; +} diff --git a/tests/cl/template_api.c b/tests/cl/template_api.c new file mode 100644 index 00000000..471490eb --- /dev/null +++ b/tests/cl/template_api.c @@ -0,0 +1,41 @@ +/* + * Copyright © + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#include "piglit-framework-cl-api.h" + +PIGLIT_CL_API_TEST_CONFIG_BEGIN + + config.name = ""; + +PIGLIT_CL_API_TEST_CONFIG_END + +enum piglit_result +piglit_cl_test(const int argc, + const char** argv, + const struct piglit_cl_api_test_config* config, + const struct piglit_cl_api_test_env* env) +{ + enum piglit_result result = PIGLIT_PASS; + + return result; +} diff --git a/tests/cl/template_custom.c b/tests/cl/template_custom.c new file mode 100644 index 00000000..96043587 --- /dev/null +++ b/tests/cl/template_custom.c @@ -0,0 +1,41 @@ +/* + * Copyright © + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#include "piglit-framework-cl-custom.h" + +PIGLIT_CL_CUSTOM_TEST_CONFIG_BEGIN + + config.name = ""; + +PIGLIT_CL_CUSTOM_TEST_CONFIG_END + +enum piglit_result +piglit_cl_test(const int argc, + const char** argv, + const struct piglit_cl_custom_test_config* config, + const struct piglit_cl_custom_test_env* env) +{ + enum piglit_result result = PIGLIT_PASS; + + return result; +} diff --git a/tests/cl/template_program.c b/tests/cl/template_program.c new file mode 100644 index 00000000..a188b616 --- /dev/null +++ b/tests/cl/template_program.c @@ -0,0 +1,41 @@ +/* + * Copyright © + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#include "piglit-framework-cl-program.h" + +PIGLIT_CL_PROGRAM_TEST_CONFIG_BEGIN + + config.name = ""; + +PIGLIT_CL_PROGRAM_TEST_CONFIG_END + +enum piglit_result +piglit_cl_test(const int argc, + const char** argv, + const struct piglit_cl_program_test_config* config, + const struct piglit_cl_program_test_env* env) +{ + enum piglit_result result = PIGLIT_PASS; + + return result; +} diff --git a/tests/cl/template_program.cl b/tests/cl/template_program.cl new file mode 100644 index 00000000..d2395dbb --- /dev/null +++ b/tests/cl/template_program.cl @@ -0,0 +1,9 @@ +/*! +[config] +name: + +kernel_name: + +[test] +name: +!*/ diff --git a/tests/cl/template_program.program_test b/tests/cl/template_program.program_test new file mode 100644 index 00000000..befb7899 --- /dev/null +++ b/tests/cl/template_program.program_test @@ -0,0 +1,8 @@ +[config] +name: + +program_source_file: +kernel_name: + +[test] +name: -- cgit v1.2.3