1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00
VILLASnode/tests/integration/convert.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
710 B
Bash
Raw Permalink Normal View History

#!/bin/bash
#
2021-09-22 10:42:03 +02:00
# Integration test for villas convert tool
#
2022-03-15 09:18:01 -04:00
# Author: Steffen Vogel <post@steffenvogel.de>
2022-03-15 09:28:57 -04:00
# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University
2022-07-04 18:20:03 +02:00
# SPDX-License-Identifier: Apache-2.0
set -e
DIR=$(mktemp -d)
pushd ${DIR}
function finish {
popd
rm -rf ${DIR}
}
trap finish EXIT
FORMATS="villas.human csv tsv json opal.asyncip"
villas signal -v5 -n -l20 mixed > input.dat
2018-12-23 00:08:28 +01:00
for FORMAT in ${FORMATS}; do
villas convert -o ${FORMAT} < input.dat | tee ${TEMP} | \
villas convert -i ${FORMAT} > output.dat
2018-12-23 00:08:28 +01:00
2022-02-24 07:31:00 -05:00
CMP_FLAGS=""
if [ ${FORMAT} = "opal.asyncip" ]; then
CMP_FLAGS+=-T
fi
villas compare ${CMP_FLAGS} input.dat output.dat
done