Skip to content

Commit e7874e8

Browse files
committed
Merge branch 'develop' of https://github.com/ecmwf/fdb into develop
2 parents dfa687d + 2e63a01 commit e7874e8

File tree

10 files changed

+117
-4
lines changed

10 files changed

+117
-4
lines changed

tests/pychunked_data_view/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ function(add_py_test test)
1212
#prevent findlibs in pyfdb to pickup any globally installed fdb
1313
"FDB5_DIR=${CMAKE_BINARY_DIR}"
1414
#prevent findlibs in eccodes-python to pickup any globally installed eccodes
15-
"ECCODES_PYTHON_USE_FINDLIBS=1"
16-
"ECCODES_DIR=${CMAKE_BINARY_DIR}"
15+
"FINDLIBS_DISABLE_PACKAGE=yes"
16+
"ECCODES_DIR=$<TARGET_FILE_DIR:eccodes>/.."
1717
)
1818
set_tests_properties(pychunked_data_view_${stem}
1919
PROPERTIES

tests/regressions/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ if (HAVE_FDB_BUILD_TOOLS) # test scripts use the fdb tools
2222
add_subdirectory(FDB-307)
2323
add_subdirectory(FDB-310)
2424
add_subdirectory(FDB-332)
25+
add_subdirectory(FDB-533)
2526
add_subdirectory(FDB-535)
2627
add_subdirectory(FDB-541)
2728
endif()
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
ecbuild_configure_file( FDB-533.sh.in FDB-533.sh @ONLY )
2+
3+
ecbuild_add_test(
4+
TYPE SCRIPT
5+
COMMAND FDB-533.sh
6+
ENVIRONMENT "${test_environment}" )
7+
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/usr/bin/env bash
2+
3+
set -eux
4+
5+
fdbread="$<TARGET_FILE:fdb-read>"
6+
fdbwrite="$<TARGET_FILE:fdb-write>"
7+
fdblist="$<TARGET_FILE:fdb-list>"
8+
fdbdumptoc="$<TARGET_FILE:fdb-dump-toc>"
9+
10+
gribls="$<TARGET_FILE:grib_ls>"
11+
gribset="$<TARGET_FILE:grib_set>"
12+
13+
srcdir=@CMAKE_CURRENT_SOURCE_DIR@
14+
bindir=@CMAKE_CURRENT_BINARY_DIR@
15+
wdir=$bindir/FDB-533
16+
17+
### cleanup and prepare test
18+
19+
rm -rf $bindir/localroot
20+
mkdir localroot
21+
22+
for f in config.yaml schema x.grib ok.req fail.req
23+
do
24+
cp $srcdir/$f $bindir
25+
done
26+
27+
export FDB5_CONFIG_FILE=config.yaml
28+
29+
$fdbwrite x.grib
30+
31+
! $fdbread fail.req out.grib
32+
33+
$fdbread ok.req out.grib
34+
35+
cmp out.grib x.grib
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
type: local
2+
engine: toc
3+
schema: ./schema
4+
spaces:
5+
- regex: .*
6+
handler: Default
7+
roots:
8+
- path: ./localroot
9+
wipe: true
10+
archive: true
11+
list: true
12+
retrieve: true

tests/regressions/FDB-533/fail.req

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
retrieve,
2+
class=od,
3+
domain=g,
4+
type=fc,
5+
stream=oper,
6+
expver=xxxx,
7+
levtype=ml,
8+
levelist=0,
9+
param=75/76/77,
10+
step=-9,
11+
date=20250614,
12+
time=1200

tests/regressions/FDB-533/ok.req

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
retrieve,
2+
class=od,
3+
domain=g,
4+
type=fc,
5+
stream=oper,
6+
expver=xxxx,
7+
levtype=ml,
8+
levelist=0,
9+
param=75/76/77,
10+
step=9,
11+
date=20250614,
12+
time=1200

tests/regressions/FDB-533/schema

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Default types
2+
3+
param: Param;
4+
step: Step;
5+
date: Date;
6+
hdate: Date;
7+
refdate: Date;
8+
latitude: Double;
9+
longitude: Double;
10+
levelist: Double;
11+
grid: Grid;
12+
expver: Expver;
13+
14+
time: Time;
15+
fcmonth: Integer;
16+
17+
number: Integer;
18+
frequency: Integer;
19+
direction: Integer;
20+
channel: Integer;
21+
22+
instrument: Integer;
23+
ident: Integer;
24+
25+
diagnostic: Integer;
26+
iteration: Integer;
27+
system: Integer;
28+
method: Integer;
29+
30+
# this schema looks odd because we need to ensure the 3rd level key is too large to fit in 32 bytes
31+
[ class, domain?
32+
[ type
33+
[ step, levelist, param, stream, expver, date, time, levtype ]]
34+
]

tests/regressions/FDB-533/x.grib

3.14 MB
Binary file not shown.

tests/z3fdb/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ function(add_py_test test)
1212
#prevent findlibs in pyfdb to pickup any globally installed fdb
1313
"FDB5_DIR=${CMAKE_BINARY_DIR}"
1414
#prevent findlibs in eccodes-python to pickup any globally installed eccodes
15-
"ECCODES_PYTHON_USE_FINDLIBS=1"
16-
"ECCODES_DIR=${CMAKE_BINARY_DIR}"
15+
"FINDLIBS_DISABLE_PACKAGE=yes"
16+
"ECCODES_DIR=$<TARGET_FILE_DIR:eccodes>/.."
1717
)
1818
set_tests_properties(pychunked_data_view_${stem}
1919
PROPERTIES

0 commit comments

Comments
 (0)