aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhou Hao <haox.a.zhou@intel.com>2019-07-29 09:59:31 +0800
committerPhilip Li <philip.li@intel.com>2019-07-29 11:57:24 +0800
commit26ec9db82b2312e51072453e7c35ff14cd0d9b1c (patch)
treed25c6dcd94fc082e2d139c69d9614e25d7e302da
parent370febf08cb9e8249c7d4f207557c6769f189006 (diff)
downloadlkp-tests-26ec9db82b2312e51072453e7c35ff14cd0d9b1c.tar.gz
test/piglit: handling special test names
fix the following issue: ``` 2019-07-25 05:57:25 piglit run quick -t spec.ext_transform_feedback.output-type.mat3[2]-no-subscript /tmp/lkp/piglit-results -x spec.ext_transform_feedback.output-type.mat3[2]-no-subscript. [0/0] ==> /tmp/stderr <== Traceback (most recent call last): File "/lkp/benchmarks/piglit/bin/piglit", line 178, in <module> main() ``` The reason for the error is that there is a special symbol in the test name, which causes the piglit to not be recognized correctly. This can be avoided by converting it to '.' After change: ``` 2019-07-26 15:32:10 piglit run quick -t spec.ext_transform_feedback.output-type.mat3.2.-no-subscript /tmp/lkp/piglit-results -x spec.ext_transform_feedback.output-type.mat3.2.-no-subscript. [1/1] fail: 1 | [1/1] fail: 1 Thank you for running Piglit! Results have been written to /tmp/lkp/piglit-results ``` Signed-off-by: Zhou Hao <haox.a.zhou@intel.com> Signed-off-by: Philip Li <philip.li@intel.com>
-rwxr-xr-xtests/piglit.xinitrc5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/piglit.xinitrc b/tests/piglit.xinitrc
index 0316a5eb..ea95fa5c 100755
--- a/tests/piglit.xinitrc
+++ b/tests/piglit.xinitrc
@@ -39,8 +39,9 @@ fi
while read testcase
do
start_time=$(date +%s.%N)
- # recently piglit change the match method, so here we change '/' to '.'
- testcase=$(echo $testcase | sed 's/\//./g')
+ # in order for piglit to correctly identify testcase, change the special characters('/', '[', ']') in testcase to '.'
+ # change spec/ext_transform_feedback/output-type.mat3[2]-no-subscript to spec.ext_transform_feedback.output-type.mat3.2.-no-subscript
+ testcase=$(echo $testcase | tr "/[]" .)
# using excluding(-x) to avoid running all matching case
log_cmd piglit run $test -t "$testcase" "$tmp_results" -x "${testcase}."
end_time=$(date +%s.%N)