File: CMakeLists.txt

package info (click to toggle)
vtk9 9.5.2%2Bdfsg3-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 205,916 kB
  • sloc: cpp: 2,336,565; ansic: 327,116; python: 111,200; yacc: 4,104; java: 3,977; sh: 3,032; xml: 2,771; perl: 2,189; lex: 1,787; makefile: 178; javascript: 165; objc: 153; tcl: 59
file content (35 lines) | stat: -rw-r--r-- 1,316 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
set(tests
  NetCDFCF2DBounds.py
  NetCDFCFSetOutputType.py
  NetCDFCFSphericalCoords.py
  NetCDFCFUnstructured.py
  NetCDFReader.py
)

# The NetCDFCF reader tests are reused to ensure that the
# XArray interface (which operates through the NetCDFCF reader) also
# works. For these duplicated tests, add an argument for the test to
# load data through xarray and a second argument to have the test use the
# same baseline image as the original test.
foreach (name IN LISTS tests)
  string(REGEX REPLACE "(.*)\.py" "\\1" name_no_ext "${name}")
  # pass xarray to test the XArray NetCDFCFReader connection
  set("${name_no_ext}XArray_ARGS" xarray)
  # use the same baseline as the original NetCDFCFReader tests
  set("${name_no_ext}XArray_BASELINE_NAME" ${name_no_ext})
endforeach()

vtk_add_test_python(
  # Rest NetCDFCFReader
  ${tests}

  # Test XArray interface Reuse the same `.py` script but provide a
  # different name. Also note that the for loop above provides extra
  # parameters to run the XArray interface and point to the correct
  # baseline image.
  NetCDFCF2DBoundsXArray,NetCDFCF2DBounds.py
  NetCDFCFSetOutputTypeXArray,NetCDFCFSetOutputType.py
  NetCDFCFSphericalCoordsXArray,NetCDFCFSphericalCoords.py
  NetCDFReaderXArray,NetCDFReader.py
  NetCDFCFUnstructuredXArray,NetCDFCFUnstructured.py
  )