[Piglit] [PATCH] tests/deqp: use --deqp-case when generating case-list
apinheiro
apinheiro at igalia.com
Thu Jun 6 14:38:44 UTC 2019
I have realized that this solution have a big problem. You can pass
extra args to deqp, so several people are already using it to pass
--deqp-case through extra args. This patch would affect them.
So Im dropping this patch. sorry for the noise.
On 6/6/19 14:48, Alejandro PiƱeiro wrote:
> Without this commit, generating the case list is called without any
> parameter by default, so it would generate all the caselist, even if
> you don't need it, or if you have just called the method before (like
> in khr_gles where you call several time gen_caselist).
>
> For the latter an alternative would just check if the caselist files
> are already created, and return if they exist. But in that case, we
> would need to add a mechanism to force creating them.
> ---
> framework/test/deqp.py | 6 ++++--
> tests/cts_gl.py | 20 ++++++++++----------
> tests/cts_gl45.py | 2 +-
> tests/cts_gles.py | 9 ++++-----
> tests/gtf_gles.py | 6 +++---
> tests/khr_gl.py | 22 +++++++++++-----------
> tests/khr_gles.py | 11 +++++------
> tests/khr_noctx.py | 2 +-
> 8 files changed, 39 insertions(+), 39 deletions(-)
>
> diff --git a/framework/test/deqp.py b/framework/test/deqp.py
> index 5db2a922f..7c1a82c2a 100644
> --- a/framework/test/deqp.py
> +++ b/framework/test/deqp.py
> @@ -114,7 +114,7 @@ def gen_caselist_txt(bin_, caselist, extra_args):
> # differ then we cannot pre-generate the caselist on the build host:
> # we must *dynamically* generate it during the testrun.
> basedir = os.path.dirname(bin_)
> - caselist_path = os.path.join(basedir, caselist)
> + caselist_path = os.path.join(basedir, caselist + '-cases.txt')
>
> # TODO: need to catch some exceptions here...
> with open(os.devnull, 'w') as d:
> @@ -123,8 +123,10 @@ def gen_caselist_txt(bin_, caselist, extra_args):
> env['MESA_GLES_VERSION_OVERRIDE'] = '3.2'
>
> subprocess.check_call(
> - [bin_, '--deqp-runmode=txt-caselist'] + extra_args, cwd=basedir,
> + [bin_, '--deqp-runmode=txt-caselist' , '--deqp-case=' , caselist, '.*']
> + + extra_args, cwd=basedir,
> stdout=d, stderr=d, env=env)
> +
> assert os.path.exists(caselist_path)
> return caselist_path
>
> diff --git a/tests/cts_gl.py b/tests/cts_gl.py
> index 935df7a7c..fa36ea4f9 100644
> --- a/tests/cts_gl.py
> +++ b/tests/cts_gl.py
> @@ -70,24 +70,24 @@ class DEQPCTSTest(deqp.DEQPBaseTest):
> profile = deqp.make_profile( # pylint: disable=invalid-name
> itertools.chain(
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_CTS_BIN, 'GL30-CTS-cases.txt', _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_CTS_BIN, 'GL30-CTS', _EXTRA_ARGS)),
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_CTS_BIN, 'GL31-CTS-cases.txt', _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_CTS_BIN, 'GL31-CTS', _EXTRA_ARGS)),
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_CTS_BIN, 'GL32-CTS-cases.txt', _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_CTS_BIN, 'GL32-CTS', _EXTRA_ARGS)),
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_CTS_BIN, 'GL33-CTS-cases.txt', _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_CTS_BIN, 'GL33-CTS', _EXTRA_ARGS)),
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_CTS_BIN, 'GL40-CTS-cases.txt', _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_CTS_BIN, 'GL40-CTS', _EXTRA_ARGS)),
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_CTS_BIN, 'GL41-CTS-cases.txt', _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_CTS_BIN, 'GL41-CTS', _EXTRA_ARGS)),
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_CTS_BIN, 'GL42-CTS-cases.txt', _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_CTS_BIN, 'GL42-CTS', _EXTRA_ARGS)),
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_CTS_BIN, 'GL43-CTS-cases.txt', _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_CTS_BIN, 'GL43-CTS', _EXTRA_ARGS)),
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_CTS_BIN, 'GL44-CTS-cases.txt', _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_CTS_BIN, 'GL44-CTS', _EXTRA_ARGS)),
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_CTS_BIN, 'GL45-CTS-cases.txt', _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_CTS_BIN, 'GL45-CTS', _EXTRA_ARGS)),
> ),
> DEQPCTSTest)
> diff --git a/tests/cts_gl45.py b/tests/cts_gl45.py
> index d033c3efc..070ed8026 100644
> --- a/tests/cts_gl45.py
> +++ b/tests/cts_gl45.py
> @@ -64,6 +64,6 @@ class DEQPCTSTest(deqp.DEQPBaseTest):
> profile = deqp.make_profile( # pylint: disable=invalid-name
> itertools.chain(
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_CTS_BIN, 'GL45-CTS-cases.txt', _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_CTS_BIN, 'GL45-CTS', _EXTRA_ARGS)),
> ),
> DEQPCTSTest)
> diff --git a/tests/cts_gles.py b/tests/cts_gles.py
> index 4ee28a89e..d65a9d56e 100644
> --- a/tests/cts_gles.py
> +++ b/tests/cts_gles.py
> @@ -72,13 +72,12 @@ class DEQPCTSTest(deqp.DEQPBaseTest):
> profile = deqp.make_profile( # pylint: disable=invalid-name
> itertools.chain(
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_CTS_BIN, 'ES2-CTS-cases.txt', _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_CTS_BIN, 'ES2-CTS', _EXTRA_ARGS)),
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_CTS_BIN, 'ES3-CTS-cases.txt', _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_CTS_BIN, 'ES3-CTS', _EXTRA_ARGS)),
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_CTS_BIN, 'ES31-CTS-cases.txt', _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_CTS_BIN, 'ES31-CTS', _EXTRA_ARGS)),
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_CTS_BIN, 'ESEXT-CTS-cases.txt',
> - _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_CTS_BIN, 'ESEXT-CTS', _EXTRA_ARGS)),
> ),
> DEQPCTSTest)
> diff --git a/tests/gtf_gles.py b/tests/gtf_gles.py
> index ca91f14b6..0a1d4f16f 100644
> --- a/tests/gtf_gles.py
> +++ b/tests/gtf_gles.py
> @@ -74,10 +74,10 @@ class DEQPGTFTest(deqp.DEQPBaseTest):
> profile = deqp.make_profile( # pylint: disable=invalid-name
> itertools.chain(
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_GTF_BIN, 'GTF-GLES2-cases.txt', _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_GTF_BIN, 'GTF-GLES2', _EXTRA_ARGS)),
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_GTF_BIN, 'GTF-GLES3-cases.txt', _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_GTF_BIN, 'GTF-GLES3', _EXTRA_ARGS)),
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_GTF_BIN, 'GTF-GLES31-cases.txt', _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_GTF_BIN, 'GTF-GLES31', _EXTRA_ARGS)),
> ),
> DEQPGTFTest)
> diff --git a/tests/khr_gl.py b/tests/khr_gl.py
> index 235ca7c8c..80c804452 100644
> --- a/tests/khr_gl.py
> +++ b/tests/khr_gl.py
> @@ -72,26 +72,26 @@ class DEQPKHRTest(deqp.DEQPBaseTest):
> profile = deqp.make_profile( # pylint: disable=invalid-name
> itertools.chain(
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GL30-cases.txt', _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GL30', _EXTRA_ARGS)),
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GL31-cases.txt', _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GL31', _EXTRA_ARGS)),
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GL32-cases.txt', _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GL32', _EXTRA_ARGS)),
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GL33-cases.txt', _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GL33', _EXTRA_ARGS)),
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GL40-cases.txt', _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GL40', _EXTRA_ARGS)),
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GL41-cases.txt', _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GL41', _EXTRA_ARGS)),
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GL42-cases.txt', _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GL42', _EXTRA_ARGS)),
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GL43-cases.txt', _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GL43', _EXTRA_ARGS)),
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GL44-cases.txt', _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GL44', _EXTRA_ARGS)),
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GL45-cases.txt', _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GL45', _EXTRA_ARGS)),
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GL46-cases.txt', _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GL46', _EXTRA_ARGS)),
> ),
> DEQPKHRTest)
> diff --git a/tests/khr_gles.py b/tests/khr_gles.py
> index 13cae08a2..5e82ea9e0 100644
> --- a/tests/khr_gles.py
> +++ b/tests/khr_gles.py
> @@ -75,15 +75,14 @@ class DEQPKHRTest(deqp.DEQPBaseTest):
> profile = deqp.make_profile( # pylint: disable=invalid-name
> itertools.chain(
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GLES2-cases.txt', _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GLES2', _EXTRA_ARGS)),
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GLES3-cases.txt', _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GLES3', _EXTRA_ARGS)),
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GLES31-cases.txt', _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GLES31', _EXTRA_ARGS)),
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GLES32-cases.txt', _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GLES32', _EXTRA_ARGS)),
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GLESEXT-cases.txt',
> - _EXTRA_ARGS)),
> + deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GLESEXT', _EXTRA_ARGS)),
> ),
> DEQPKHRTest)
> diff --git a/tests/khr_noctx.py b/tests/khr_noctx.py
> index 04f0d3073..edd61e0e4 100644
> --- a/tests/khr_noctx.py
> +++ b/tests/khr_noctx.py
> @@ -74,7 +74,7 @@ class DEQPKHRTest(deqp.DEQPBaseTest):
> profile = deqp.make_profile( # pylint: disable=invalid-name
> itertools.chain(
> deqp.iter_deqp_test_cases(
> - deqp.gen_caselist_txt(_KHR_BIN, 'KHR-NoContext-cases.txt',
> + deqp.gen_caselist_txt(_KHR_BIN, 'KHR-NoContext',
> _EXTRA_ARGS)),
> ),
> DEQPKHRTest)
More information about the Piglit
mailing list