Commit 55b3940b authored by David E. DeMarle's avatar David E. DeMarle

Fixes for xdmf3 regression test data.

Make tests generate data in the temporary instead of current directory.
Add test input data via cmake ExternalData.
Make XdmfSystemUtils.cpp get realpath do nothing to prevent it from
looking for heavy data in the symbolically linked md5 directory.

Change-Id: Id284b917491eab1e75fd72c393957e6fbe995488
parent 471a8303
......@@ -10,6 +10,9 @@ if(VTK_MPI_MAX_NUMPROCS GREATER 1 AND VTK_USE_LARGE_DATA)
include(vtkMPI)
vtk_module_test_executable(${vtk-module}Cxx-${test} ${test}.cxx)
ExternalData_Expand_Arguments(VTKData _
"DATA{${VTK_TEST_INPUT_DIR}/XDMF/Iron/,REGEX:.*}"
)
ExternalData_add_test(VTKData
NAME ${vtk-module}Cxx-${test}
COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 2 ${MPIEXEC_PREFLAGS}
......
set(vtk_test_prefix XML)
set(VToXLoop_ARGS -ldl=1000)
vtk_add_test_python(
VToXLoop.py NO_OUTPUT NO_VALID NO_RT NO_DATA
VToXLoop.py NO_VALID NO_RT NO_DATA
)
unset(vtk_test_prefix)
set(vtk_test_prefix H5)
set(VToXLoop_ARGS -ldl=0)
vtk_add_test_python(
VToXLoop.py NO_OUTPUT NO_VALID NO_RT NO_DATA
VToXLoop.py NO_VALID NO_RT NO_DATA
)
unset(vtk_test_prefix)
if (VTK_USE_LARGE_DATA)
set(_ManyFiles_ARGS "--do_big_files")
set(_BigFiles "DATA{${VTK_TEST_INPUT_DIR}/XDMF/Big/,REGEX:.*}")
endif()
ExternalData_Expand_Arguments(VTKData _
"DATA{${VTK_TEST_INPUT_DIR}/XDMF/,REGEX:.*}"
"${_BigFiles}"
)
vtk_add_test_python(
ManyFiles.py NO_OUTPUT NO_VALID NO_RT ${_ManyFiles_ARGS}
)
......@@ -44,14 +44,13 @@ largeFiles = [
"Iron/Iron_Protein.RectilinearGrid.Collection.xmf",
"Iron/Iron_Protein.StructuredGrid.xmf",
"Iron/Iron_Protein.StructuredGrid.Collection.xmf",
"Scenario1_p1.xmf",
"Big/Scenario1_p1.xmf",
]
testfilenames = smallFiles
import sys
if "--do_big_files" in sys.argv:
print "DO LARGE TOO"
testfilenames = smallFiles + largeFiles
if __name__ == "__main__":
......
......@@ -9,9 +9,6 @@ import os
import sys
import vtk
#from vtk.util.misc import vtkGetDataRoot
#VTK_DATA_ROOT = vtkGetDataRoot() #just to avoid unused arg ctest error
hasresource = True
try:
import resource
......@@ -27,6 +24,7 @@ from vtk.test import Testing
CleanUpGood = True
LightDataLimit = 10000
OutputDir = ""
timer = vtk.vtkTimerLog()
......@@ -194,6 +192,7 @@ def DoDataObjectsDiffer(dobj1, dobj2):
def TestXdmfConversion(dataInput, fileName):
global CleanUpGood, timer
fileName = OutputDir + fileName
xdmfFile = fileName + ".xmf"
hdf5File = fileName + ".h5"
vtkFile = fileName + ".vtk"
......@@ -247,19 +246,22 @@ if __name__ == "__main__":
after testing complete (Default = False)",\
action="store_true")
parser.add_argument("-ldl", "--lightDataLimit", nargs=1, dest="lightDataLimit")
parser.add_argument("-T", nargs=1, dest="outputDir")
args = parser.parse_args()
if args.dontClean:
CleanUpGood = False
if args.lightDataLimit:
LightDataLimit = int(args.lightDataLimit[0])
if args.outputDir:
OutputDir = args.outputDir[0] + "/"
fail = False
print "TEST SET 1 - verify reader/writer work for range of canonical datasets"
print MemUsage("Before starting TEST SET 1")
dog = vtk.vtkDataObjectGenerator()
i = 0
for testObject in testObjects:
i = 0
fileName = "xdmfIOtest_" + str(i)
print "Test vtk object", testObject
dog.SetProgram(testObject)
......@@ -273,9 +275,9 @@ if __name__ == "__main__":
gsrc = vtk.vtkRandomGraphSource()
gsrc.DirectedOn()
gsrc.Update()
gFilePrefix = "xdmfIOTest_Graph"
gFileName = gFilePrefix + ".xdmf"
ghFileName = gFilePrefix + ".h5"
gFilePrefix = "xdmfIOtest_Graph"
gFileName = OutputDir + gFilePrefix + ".xdmf"
ghFileName = OutputDir + gFilePrefix + ".h5"
xWriter = vtk.vtkXdmf3Writer()
xWriter.SetLightDataLimit(LightDataLimit)
xWriter.SetFileName(gFileName)
......@@ -302,8 +304,8 @@ if __name__ == "__main__":
tsrc.GrowingOn()
tsrc.SetXAmplitude(2.0)
tFilePrefix = "xdmfIOTest_Temporal"
tFileName = tFilePrefix + ".xdmf"
thFileName = tFilePrefix + ".h5"
tFileName = OutputDir + tFilePrefix + ".xdmf"
thFileName = OutputDir + tFilePrefix + ".h5"
xWriter = vtk.vtkXdmf3Writer()
xWriter.SetLightDataLimit(LightDataLimit)
xWriter.WriteAllTimeStepsOn()
......
fc9248b91f33f992805f0b742a07f61e
16735570b7fa5a581317ab7e7c9bef51
a1596bf68cfac819d2225f3eac61c3d6
45a567e0ede3e3d3793fe57ca7111342
3a35bf660889f96278f46f4080b4e706
238259414fa7277d5ba7833fc867976d
b37f4e6fe7c8339bc44cafa2103637a6
afa8c5ab48297f23237544e3908663e6
1409c17a3e8c9df03cfc3f6b9a16e4af
7bbf7e74a209120a39a07b45dce3c8de
ccc0a98df4a0dbc50d5790b612efed3d
cb3ceccafe3c3e934f587bcd9f3e186c
1b344ab92eaa341258f1918e5a221f79
441dc8150b824483e9b736f236e785c7
ea4c5d1727a6426b5cd56b22eac6c400
1172a4d3f6187b4f82c3bf438a14b91a
7f3a0d7a102049f66bd7631ec9d6c9a8
9986cdd40c65ae3cfb0c5ff467bf4211
8af89a22896bdea6810fc4828b8260d5
a5b92809b37384d246aef66f1657c4c9
2777f648259063cd55e44abbb98a12d5
be2fe75642c06e0256eb96c0e279d3b4
c179856b1bf27db50ff379e6c20f569c
be572b77245d753692fc4102f7055111
57cc55d3cf09829f7e4199ff7c9157b5
58e84edb167aca27609bb7c0b3bd1cb6
dcaecbe1c6946e04b53b3a8a2de3e86d
31b8da6ab7fdd2c0f322e2367d42cc16
1474ae944ecf7cd9286b844e2f5454e1
79fd93396a78fe51c2b82de5f7edb8ac
698e9ba0521ef252709bf234acff29a1
3203f45a55426a38e34173464b32efce
5a184e18ed836a51c6b450f1b76e94f3
......@@ -25,6 +25,7 @@
#include <limits.h>
#include <stdlib.h>
#include "XdmfSystemUtils.hpp"
#include <iostream>
XdmfSystemUtils::XdmfSystemUtils()
{
......@@ -40,10 +41,8 @@ XdmfSystemUtils::getRealPath(const std::string & path)
xmlURIPtr ref = NULL;
ref = xmlCreateURI();
xmlParseURIReference(ref, path.c_str());
char realPath[PATH_MAX];
realpath(ref->path, realPath);
char *rp = realpath(ref->path, realPath);
xmlFreeURI(ref);
return realPath;
return path;
}
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