2024-02-29 20:03:12 +01:00
|
|
|
#!/usr/bin/env bash
|
2019-02-18 01:11:47 +01:00
|
|
|
#
|
2021-08-10 10:12:48 -04:00
|
|
|
# Integration test for villas signal tool
|
2019-02-18 01:11:47 +01:00
|
|
|
#
|
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
|
2019-02-18 01:11:47 +01:00
|
|
|
|
2021-08-10 10:12:48 -04:00
|
|
|
set -e
|
|
|
|
|
|
|
|
DIR=$(mktemp -d)
|
|
|
|
pushd ${DIR}
|
|
|
|
|
|
|
|
function finish {
|
2024-02-29 21:54:10 +01:00
|
|
|
popd
|
|
|
|
rm -rf ${DIR}
|
2021-08-10 10:12:48 -04:00
|
|
|
}
|
|
|
|
trap finish EXIT
|
|
|
|
|
|
|
|
cat > input.dat <<EOF
|
|
|
|
# seconds.nanoseconds(sequence) sine
|
|
|
|
1635933135.006234199(0) 0.00000000000000000
|
|
|
|
1635933135.106234199(1) 0.58778525229247314
|
|
|
|
1635933135.206234199(2) 0.95105651629515353
|
|
|
|
1635933135.306234199(3) 0.95105651629515353
|
|
|
|
1635933135.406234199(4) 0.58778525229247325
|
|
|
|
1635933135.506234199(5) 0.00000000000000012
|
|
|
|
1635933135.606234199(6) -0.58778525229247336
|
|
|
|
1635933135.706234199(7) -0.95105651629515353
|
|
|
|
1635933135.806234199(8) -0.95105651629515364
|
|
|
|
1635933135.906234199(9) -0.58778525229247336
|
|
|
|
EOF
|
|
|
|
|
|
|
|
villas signal sine -nl 10 > output.dat
|
|
|
|
|
|
|
|
villas compare -T input.dat output.dat
|