mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
add integration test for hdf5 node-type
Signed-off-by: Alexandra <alexandra.bach@eonerc.rwth-aachen.de>
This commit is contained in:
parent
0181b66eb0
commit
ece0102ec9
1 changed files with 17 additions and 26 deletions
|
@ -1,16 +1,13 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Test for the example node-type
|
||||
# Test for the hdf5 node-type.
|
||||
#
|
||||
# Author: Steffen Vogel <post@steffenvogel.de>
|
||||
# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University
|
||||
# Author: Alexandra Bach <alexandra.bach@eonerc.rwth-aachen.de>
|
||||
# SPDX-FileCopyrightText: 2014-2024 Institute for Automation of Complex Power Systems, RWTH Aachen University
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -e
|
||||
|
||||
echo "The example node does nothing useful which we could test"
|
||||
exit 99
|
||||
|
||||
DIR=$(mktemp -d)
|
||||
pushd ${DIR}
|
||||
|
||||
|
@ -20,36 +17,30 @@ function finish {
|
|||
}
|
||||
trap finish EXIT
|
||||
|
||||
cat > expect.dat <<EOF
|
||||
1553690684.041211800-4.313770e-02(5) 6.303265 0.492616 0.309017 -1.000000 0.800000 0.050000
|
||||
1553690684.051211800-5.287260e-02(6) 5.673902 0.148827 0.368125 -1.000000 0.760000 0.060000
|
||||
1553690684.061211800-6.266780e-02(7) 5.896198 0.232320 0.425779 -1.000000 0.720000 0.070000
|
||||
1553690684.071211800-7.256350e-02(8) 5.788125 0.152309 0.481754 -1.000000 0.680000 0.080000
|
||||
1553690684.081211800-8.251890e-02(9) 6.748635 0.608491 0.535827 -1.000000 0.640000 0.090000
|
||||
EOF
|
||||
|
||||
cat > config.json <<EOF
|
||||
{
|
||||
"nodes": {
|
||||
"example_node1": {
|
||||
"type": "example",
|
||||
|
||||
"setting1": 66
|
||||
},
|
||||
"file": {
|
||||
"type": "file",
|
||||
"uri": "output.dat"
|
||||
"hdf5_node": {
|
||||
"type": "hdf5",
|
||||
"file": "test.h5",
|
||||
"dataset": "test,
|
||||
"unit": "none
|
||||
}
|
||||
},
|
||||
"siggen": {
|
||||
"type": "signal",
|
||||
"signal": "sine",
|
||||
"values": 1,
|
||||
"limit": 3,
|
||||
"rate": 10
|
||||
}
|
||||
"paths": [
|
||||
{
|
||||
"in": "example_node1",
|
||||
"out": "file",
|
||||
"in": "siggen",
|
||||
"out": "hdf5_node",
|
||||
}
|
||||
]
|
||||
}
|
||||
EOF
|
||||
|
||||
villas node config.json
|
||||
|
||||
villas compare output.dat expect.dat
|
||||
|
|
Loading…
Add table
Reference in a new issue