Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
piglit
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
17
Issues
17
List
Boards
Labels
Milestones
Merge Requests
33
Merge Requests
33
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mesa
piglit
Commits
5fa0abc6
Commit
5fa0abc6
authored
Mar 27, 2018
by
Dylan Baker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
framework/test: use relative paths for GLSLParser tests
Tested-by:
Rafael Antognolli
<
rafael.antognolli@intel.com
>
parent
229b3b3d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
framework/test/glsl_parser_test.py
framework/test/glsl_parser_test.py
+10
-3
tests/all.py
tests/all.py
+2
-2
No files found.
framework/test/glsl_parser_test.py
View file @
5fa0abc6
...
...
@@ -33,7 +33,7 @@ import six
from
framework
import
exceptions
from
.base
import
TestIsSkip
from
.opengl
import
FastSkipMixin
from
.piglit_test
import
PiglitBaseTest
,
TEST_BIN_DIR
from
.piglit_test
import
PiglitBaseTest
,
TEST_BIN_DIR
,
ROOT_DIR
__all__
=
[
'GLSLParserTest'
,
...
...
@@ -95,11 +95,12 @@ class Parser(object):
self
.
gl_required
=
set
()
self
.
glsl_es_version
=
None
self
.
glsl_version
=
None
abs_filepath
=
os
.
path
.
join
(
ROOT_DIR
,
filepath
)
try
:
with
io
.
open
(
filepath
,
mode
=
'r'
,
encoding
=
'utf-8'
)
as
testfile
:
with
io
.
open
(
abs_
filepath
,
mode
=
'r'
,
encoding
=
'utf-8'
)
as
testfile
:
testfile
=
testfile
.
read
()
self
.
config
=
self
.
parse
(
testfile
,
filepath
)
self
.
config
=
self
.
parse
(
testfile
,
abs_
filepath
)
self
.
command
=
self
.
get_command
(
filepath
)
except
GLSLParserInternalError
as
e
:
raise
exceptions
.
PiglitFatalError
(
...
...
@@ -278,6 +279,12 @@ class GLSLParserTest(FastSkipMixin, PiglitBaseTest):
command
,
run_concurrent
=
True
,
gl_required
=
gl_required
,
glsl_version
=
glsl_version
,
glsl_es_version
=
glsl_es_version
)
@
PiglitBaseTest
.
command
.
getter
def
command
(
self
):
command
=
super
(
GLSLParserTest
,
self
)
.
command
glslfile
=
os
.
path
.
join
(
ROOT_DIR
,
command
[
1
])
return
[
command
[
0
],
glslfile
]
+
command
[
2
:]
@
classmethod
def
new
(
cls
,
filepath
):
parsed
=
Parser
(
filepath
)
...
...
tests/all.py
View file @
5fa0abc6
...
...
@@ -305,8 +305,8 @@ for basedir in [TESTS_DIR, GENERATED_TESTS_DIR]:
groupname
=
grouptools
.
from_path
(
os
.
path
.
relpath
(
dirpath
,
basedir
))
for
filename
in
filenames
:
testname
,
ext
=
os
.
path
.
splitext
(
filename
)
dirname
=
os
.
path
.
relpath
(
dirpath
,
ROOT_DIR
)
if
ext
==
'.shader_test'
:
dirname
=
os
.
path
.
relpath
(
dirpath
,
ROOT_DIR
)
if
PROCESS_ISOLATION
:
test
=
ShaderTest
.
new
(
os
.
path
.
join
(
dirname
,
filename
))
else
:
...
...
@@ -314,7 +314,7 @@ for basedir in [TESTS_DIR, GENERATED_TESTS_DIR]:
continue
elif
ext
in
[
'.vert'
,
'.tesc'
,
'.tese'
,
'.geom'
,
'.frag'
,
'.comp'
]:
try
:
test
=
GLSLParserTest
.
new
(
os
.
path
.
join
(
dir
path
,
filename
))
test
=
GLSLParserTest
.
new
(
os
.
path
.
join
(
dir
name
,
filename
))
except
GLSLParserNoConfigError
:
# In the event that there is no config assume that it is a
# legacy test, and continue
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment