Commit d748a731 authored by Dion Haefner's avatar Dion Haefner

configure testtools wrapper to find dorie executable

parent f702d210
......@@ -4,6 +4,8 @@ build-cmake/
# Exclude generated files
testing/*.mini
python/parfield/wrapper/pf_from_file.py
python/testtools/wrapper/test_dorie.py
python/testtools/wrapper/test_dorie_pfg.py
# Ignore temporary and auto-generated files #
*~
......
......@@ -11,6 +11,7 @@ install_python_package("parscraper" python_paths)
add_subdirectory(parfield/wrapper)
install_python_package("parfield" python_paths)
if(dune-testtools_FOUND)
add_subdirectory(testtools/wrapper)
install_python_package("testtools" python_paths)
endif()
......
......@@ -7,11 +7,11 @@ import time
import dorie.testtools.dorie as evaluation
def test_dorie(iniinfo,inifile):
def test_dorie(iniinfo,inifile,executable):
"""
Parses the parameter file, calls DORiE, calls the evaluation routines and exits with 0 (pass) or 1 (fail)
"""
command = ["dorie"]
command = [executable]
if "__inifile_optionkey" in iniinfo:
command.append(iniinfo["__inifile_optionkey"])
command.append(inifile)
......
......@@ -7,11 +7,11 @@ import time
import dorie.testtools.dorie_pfg as evaluation
def test_dorie_pfg(iniinfo,inifile):
def test_dorie_pfg(iniinfo,inifile,executable):
"""
Parses the parameter file, calls DORiE, calls the evaluation routines and exits with 0 (pass) or 1 (fail)
"""
command = ["dorie"]
command = [executable]
if "__inifile_optionkey" in iniinfo:
command.append(iniinfo["__inifile_optionkey"])
command.append(inifile)
......
configure_file(test_dorie.py.in ${CMAKE_CURRENT_SOURCE_DIR}/test_dorie.py)
configure_file(test_dorie_pfg.py.in ${CMAKE_CURRENT_SOURCE_DIR}/test_dorie_pfg.py)
......@@ -2,13 +2,20 @@
from __future__ import absolute_import
import sys
import os
from dune.testtools.wrapper.argumentparser import get_args
from dune.testtools.parser import parse_ini_file
from dorie.testtools.wrapper import test_dorie
# paths set by cmake
DORIEDIR = "@CMAKE_BINARY_DIR@"
#
DORIE_WRAPPER = os.path.join(DORIEDIR, "bin/dorie")
if __name__ == "__main__":
args = get_args()
iniargument = args["ini"]
iniinfo = parse_ini_file(args["ini"])
sys.exit(test_dorie.test_dorie(iniinfo,iniargument))
sys.exit(test_dorie.test_dorie(iniinfo,iniargument,DORIE_WRAPPER))
......@@ -2,13 +2,20 @@
from __future__ import absolute_import
import sys
import os
from dune.testtools.wrapper.argumentparser import get_args
from dune.testtools.parser import parse_ini_file
from dorie.testtools.wrapper import test_dorie_pfg
# paths set by cmake
DORIEDIR = "@CMAKE_BINARY_DIR@"
#
DORIE_WRAPPER = os.path.join(DORIEDIR, "bin/dorie")
if __name__ == "__main__":
args = get_args()
iniargument = args["ini"]
iniinfo = parse_ini_file(args["ini"])
sys.exit(test_dorie_pfg.test_dorie_pfg(iniinfo,iniargument))
sys.exit(test_dorie_pfg.test_dorie_pfg(iniinfo,iniargument,DORIE_WRAPPER))
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