From 26fe2dee5908ecf3de76092944dc070f0740985d Mon Sep 17 00:00:00 2001 From: Christoph Galuschka Date: Nov 17 2011 12:44:00 +0000 Subject: Added minicom and RRD-Tools tests --- diff --git a/tests/p_rrdtool/0-install_rrdtool.sh b/tests/p_rrdtool/0-install_rrdtool.sh new file mode 100755 index 0000000..a863f6e --- /dev/null +++ b/tests/p_rrdtool/0-install_rrdtool.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# Author: Christoph Galuschka + +# Install rrdtool +t_InstallPackage rrdtool + + diff --git a/tests/p_rrdtool/rrdtool_test.sh b/tests/p_rrdtool/rrdtool_test.sh new file mode 100755 index 0000000..fe77a55 --- /dev/null +++ b/tests/p_rrdtool/rrdtool_test.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# Author: Athmane Madjoudj +# Author: Christph Galuschka +# RRD-sample from http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html + +t_Log "Running $0 - basic rrdtool test." + +# creating test RRD + +FILE="/var/tmp/temperature.rrd" + +rrdtool create $FILE --step 1 DS:temp:GAUGE:600:-273:5000 RRA:AVERAGE:0.5:1:1200 + +# insert value +rrdtool update $FILE N:30 + +# retrieve value and check +WORKING=$(rrdtool fetch $FILE AVERAGE -s -80 |grep -c '3.0000000000e+01') + +# if $WORKING > 0 -> update and retrieval works +if [ $WORKING > 0 ]; then ret_val=0; +fi + +#remove RRD-File +/bin/rm $FILE + +t_CheckExitStatus $ret_val