Commit 39f6e021 authored by Nicolai's avatar Nicolai Committed by Nicolai Hähnle

Build test executables in a dedicated bin directory

parent 22fbbb5e
......@@ -5,4 +5,7 @@ include(${CMAKE_ROOT}/Modules/FindOpenGL.cmake)
include(${CMAKE_ROOT}/Modules/FindTIFF.cmake)
include(${CMAKE_ROOT}/Modules/FindGLUT.cmake)
set(EXECUTABLE_OUTPUT_PATH ${piglit_SOURCE_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${piglit_SOURCE_DIR}/bin)
add_subdirectory (tests)
......@@ -67,6 +67,7 @@ def testPathToResultName(path):
pyname = 'testrun.results' + "".join(map(lambda s: "['"+s+"']", elems))
return pyname
testbin = os.path.dirname(__file__) + '/../bin/'
#############################################################################
##### Result classes
......@@ -254,7 +255,7 @@ class PlainExecTest(Test):
##### GleanTest: Execute a sub-test of Glean
#############################################################################
def gleanExecutable():
return "./tests/glean/glean"
return testbin + 'glean'
def gleanResultDir():
return "./results/glean/"
......@@ -309,6 +310,7 @@ def loadTestProfile(filename):
ns = {
'__file__': filename,
'__dir__': os.path.dirname(filename),
'testbin': testbin,
'Test': Test,
'Group': Group,
'GleanTest': GleanTest,
......@@ -319,7 +321,7 @@ def loadTestProfile(filename):
return ns['tests']
except:
traceback.print_exc()
raise FatalError('Could not read tests profile')
raise Exception('Could not read tests profile')
def loadTestResults(filename):
try:
......@@ -347,4 +349,4 @@ def loadTestResults(filename):
return testrun
except:
traceback.print_exc()
raise FatalError('Could not read tests results')
raise Exception('Could not read tests results')
......@@ -8,6 +8,8 @@ import subprocess
# Glean sub-tests
glean_fragprog1 = Group()
print gleanExecutable()
out,err = subprocess.Popen(
[gleanExecutable(), "-t", "+fragProg1", "--listdetails"],
stdout=subprocess.PIPE
......@@ -67,19 +69,19 @@ glean['vertattrib'] = GleanTest('vertattrib')
glean['vertProg1'] = GleanTest('vertProg1')
mesa = Group()
mesa['crossbar'] = PlainExecTest([__dir__ + '/mesa/tests/crossbar', '-auto'])
mesa['crossbar'] = PlainExecTest([testbin + 'crossbar', '-auto'])
shaders = Group()
shaders['trinity-fp1'] = PlainExecTest([__dir__ + '/shaders/trinity-fp1', '-auto'])
shaders['fp-lit-mask'] = PlainExecTest([__dir__ + '/shaders/fp-lit-mask', '-auto'])
shaders['fp-fragment-position'] = PlainExecTest([__dir__ + '/shaders/fp-fragment-position', '-auto'])
shaders['fp-kil'] = PlainExecTest([__dir__ + '/shaders/fp-kil', '-auto'])
shaders['fp-incomplete-tex'] = PlainExecTest([__dir__ + '/shaders/fp-incomplete-tex', '-auto'])
shaders['trinity-fp1'] = PlainExecTest([testbin + 'trinity-fp1', '-auto'])
shaders['fp-lit-mask'] = PlainExecTest([testbin + 'fp-lit-mask', '-auto'])
shaders['fp-fragment-position'] = PlainExecTest([testbin + 'fp-fragment-position', '-auto'])
shaders['fp-kil'] = PlainExecTest([testbin + 'fp-kil', '-auto'])
shaders['fp-incomplete-tex'] = PlainExecTest([testbin + 'fp-incomplete-tex', '-auto'])
shaders['glean-fragProg1'] = glean_fragprog1
bugs = Group()
bugs['fdo9833'] = PlainExecTest([__dir__ + '/bugs/fdo9833', '-auto'])
bugs['fdo10370'] = PlainExecTest([__dir__ + '/bugs/fdo10370', '-auto'])
bugs['fdo9833'] = PlainExecTest([testbin + 'fdo9833', '-auto'])
bugs['fdo10370'] = PlainExecTest([testbin + 'fdo10370', '-auto'])
tests = Group()
tests['bugs'] = bugs
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment