set for each test separately under the sections ``[wrapper.outputtreecompare.<name>]``. """ if __name__ == "__main__": import sys from dune.testtools.wrapper.argumentparser import get_args from dune.testtools.wrapper.call_executable import call from dune.testtools.wrapper.compareini import compare_ini, fuzzy_compare_ini from dune.testtools.parser import parse_ini_file # Parse the given arguments args = get_args() # Execute the actual test! ret = call(args["exec"], args["ini"]) # do the outputtree comparison if execution was succesful if ret is 0: # Parse the inifile to learn about where the output file and its reference are located. ini = parse_ini_file(args["ini"]) try: # get reference solutions names = ini["wrapper.outputtreecompare.name"].split(' ') exts = ini.get("wrapper.outputtreecompare.extension", "out " * len(names)).split(' ') references = ini["wrapper.outputtreecompare.reference"].split(' ') except KeyError: sys.stdout.write( "The test wrapper outputtreecompare assumes keys wrapper.outputtreecompare.name \ and wrapper.outputtreecompare.reference to be existent in the inifile"
#!/usr/bin/env python """ This wrapper script does simply call the executable and forwards the return code. This is used as the default wrapper script in the dune-testtools project. If you want to explitly specify the wrapper for clarity use .. code-block:: cmake dune_add_system_test(... SCRIPT dune_execute.py ...) """ if __name__ == "__main__": import sys from dune.testtools.wrapper.argumentparser import get_args from dune.testtools.wrapper.call_executable import call # Parse the given arguments args = get_args() sys.exit(call(args["exec"], args["ini"]))