From: Tobias Oetiker Date: Thu, 3 Jan 2019 12:01:39 +0000 (+0100) Subject: update tests including verification of timestamp alignement X-Git-Tag: v1.7.1~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f79ad1541b9ece93ce198525a38f6286f6b230f7;p=thirdparty%2Frrdtool-1.x.git update tests including verification of timestamp alignement --- diff --git a/tests/.gitignore b/tests/.gitignore index f8801fac..2a97ad43 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -2,3 +2,4 @@ /*.rrd /*.out /modify5-testa*-mod.dump +/*.log \ No newline at end of file diff --git a/tests/rpn2.output b/tests/rpn2.output index 081bcc13..bcbdb2b0 100644 --- a/tests/rpn2.output +++ b/tests/rpn2.output @@ -1,6 +1,6 @@ { "about": "RRDtool graph JSON output", "meta": { - "start": 1167487200, + "start": 1167494400, "end": 1167616800, "step": 7200, "legend": [ diff --git a/tests/xport1 b/tests/xport1 index c3db4c77..1154cd10 100755 --- a/tests/xport1 +++ b/tests/xport1 @@ -10,9 +10,9 @@ function do_update { ok "update 10" $RRDTOOL update ${BUILD}.rrd 1300000401:53.017400:14.827785 1300000441:52.966100:16.301486 1300000481:52.914800:17.773855 1300000521:52.880500:19.244938 1300000561:52.829200:20.714808 1300000601:52.795000:22.183371 1300000641:52.743600:23.650719 1300000681:52.709400:25.116902 1300000721:52.658100:26.581966 1300000761:52.623800:28.045876 || return 1 ok "update 20" - $RRDTOOL update ${BUILD}.rrd 1300000801:52.589600:29.508655 1300000841:52.538300:30.970281 1300000881:52.504000:32.430871 1300000921:52.469800:33.890319 1300000961:52.418500:35.348744 1300001001:52.384200:36.806097 1300001041:52.350000:38.262274 1300001081:52.315800:39.717393 1300001121:52.264500:41.171430 1300001161:52.230200:42.624338 || return 1 + $RRDTOOL update ${BUILD}.rrd 1300000800:50:29.508655 1300000841:50:30.970281 1300000881:50:32.430871 1300000921:50:33.890319 1300000961:50:35.348744 1300001001:50:36.806097 1300001041:50:38.262274 1300001081:50:39.717393 1300001121:50:41.171430 1300001161:50:42.624338 || return 1 ok "update 30" - $RRDTOOL update ${BUILD}.rrd 1300001201:52.196000:44.076360 1300001241:52.161800:45.527372 1300001281:52.127500:46.977267 1300001321:52.076200:48.426163 1300001361:52.042000:49.874048 1300001401:52.007700:51.320802 1300001441:51.973500:52.766544 1300001481:51.939300:54.211346 1300001521:51.905100:55.655114 1300001561:51.870800:57.097893 || return 1 + $RRDTOOL update ${BUILD}.rrd 1300001201:50:44.076360 1300001241:50:45.527372 1300001281:50:46.977267 1300001321:50:48.426163 1300001361:50:49.874048 1300001401:50:51.320802 1300001441:50:52.766544 1300001481:51.939300:54.211346 1300001521:51.905100:55.655114 1300001561:51.870800:57.097893 || return 1 ok "update 40" $RRDTOOL update ${BUILD}.rrd 1300001601:51.836600:58.539579 1300001641:51.785300:59.980265 1300001681:51.751100:61.420010 1300001721:51.716800:62.858674 1300001761:51.682600:64.296280 1300001801:51.648400:65.732981 1300001841:51.614100:67.168635 1300001881:51.562800:68.603267 1300001921:51.545700:70.036945 1300001961:51.511500:71.469683 || return 1 ok "update 50" @@ -98,5 +98,5 @@ is_cached && exit 0 $RRDTOOL xport --json -s 1300000000 -e 1300015200 --step 600 DEF:dv=${BUILD}.rrd:dv:AVERAGE DEF:wh=${BUILD}.rrd:wh:AVERAGE XPORT:dv:dv XPORT:wh:wh | $DIFF9 - $BASEDIR/xport1.json.output report "xport json" -$RRDTOOL xport --enumds -s 1300000000 -e 1300015200 --step 600 DEF:dv=${BUILD}.rrd:dv:AVERAGE DEF:wh=${BUILD}.rrd:wh:AVERAGE XPORT:dv:dv XPORT:wh:wh | $DIFF9 - $BASEDIR/xport1.xml.output +$RRDTOOL xport --enumds -t -s 1300000000 -e 1300015200 --step 600 DEF:dv=${BUILD}.rrd:dv:AVERAGE DEF:wh=${BUILD}.rrd:wh:AVERAGE XPORT:dv:dv XPORT:wh:wh | $DIFF9 - $BASEDIR/xport1.xml.output report "xport xml" diff --git a/tests/xport1.json.output b/tests/xport1.json.output index b7367e5e..dab2de50 100644 --- a/tests/xport1.json.output +++ b/tests/xport1.json.output @@ -1,6 +1,6 @@ { "about": "RRDtool graph JSON output", "meta": { - "start": 1300000200, + "start": 1300000800, "end": 1300015200, "step": 600, "legend": [ @@ -9,9 +9,9 @@ ] }, "data": [ - [ -1.1709250e-03, 3.6784869e-02 ], - [ -9.6982917e-04, 3.6354246e-02 ], - [ -9.1195417e-04, 3.5968226e-02 ], + [ -5.4883500e-03, 3.6845819e-02 ], + [ 0.0000000e+00, 3.6293297e-02 ], + [ 2.4356417e-03, 3.5968226e-02 ], [ -8.5638333e-04, 3.5596562e-02 ], [ -8.8416667e-04, 3.5234040e-02 ], [ -8.2716667e-04, 3.4878341e-02 ], diff --git a/tests/xport1.xml.output b/tests/xport1.xml.output index 82fc4d43..851100d8 100644 --- a/tests/xport1.xml.output +++ b/tests/xport1.xml.output @@ -2,7 +2,7 @@ - 1300000200 + 1300000800 1300015200 600 25 @@ -13,30 +13,30 @@ - -1.1709250e-033.6784869e-02 - -9.6982917e-043.6354246e-02 - -9.1195417e-043.5968226e-02 - -8.5638333e-043.5596562e-02 - -8.8416667e-043.5234040e-02 - -8.2716667e-043.4878341e-02 - -8.5566667e-043.4524600e-02 - -8.5566667e-043.4171311e-02 - -7.9866250e-043.3823460e-02 - -7.7000417e-043.3493368e-02 - -6.5600000e-043.3196801e-02 - -5.7050000e-043.2941916e-02 - -4.5704583e-043.2729010e-02 - -3.9933333e-043.2552591e-02 - -3.4233333e-043.2397960e-02 - -3.1366667e-043.2259369e-02 - -3.1383333e-043.2127015e-02 - -3.4216667e-043.1992874e-02 - -3.4233333e-043.1852900e-02 - -3.9933333e-043.1696810e-02 - -4.5633333e-043.1520222e-02 - -5.4128333e-043.1313820e-02 - -6.5600000e-043.1065261e-02 - -9.4045833e-043.0735643e-02 - -1.6799792e-033.0233410e-02 + 1300000800-5.4883500e-033.6845819e-02 + 13000014000.0000000e+003.6293297e-02 + 13000020002.4356417e-033.5968226e-02 + 1300002600-8.5638333e-043.5596562e-02 + 1300003200-8.8416667e-043.5234040e-02 + 1300003800-8.2716667e-043.4878341e-02 + 1300004400-8.5566667e-043.4524600e-02 + 1300005000-8.5566667e-043.4171311e-02 + 1300005600-7.9866250e-043.3823460e-02 + 1300006200-7.7000417e-043.3493368e-02 + 1300006800-6.5600000e-043.3196801e-02 + 1300007400-5.7050000e-043.2941916e-02 + 1300008000-4.5704583e-043.2729010e-02 + 1300008600-3.9933333e-043.2552591e-02 + 1300009200-3.4233333e-043.2397960e-02 + 1300009800-3.1366667e-043.2259369e-02 + 1300010400-3.1383333e-043.2127015e-02 + 1300011000-3.4216667e-043.1992874e-02 + 1300011600-3.4233333e-043.1852900e-02 + 1300012200-3.9933333e-043.1696810e-02 + 1300012800-4.5633333e-043.1520222e-02 + 1300013400-5.4128333e-043.1313820e-02 + 1300014000-6.5600000e-043.1065261e-02 + 1300014600-9.4045833e-043.0735643e-02 + 1300015200-1.6799792e-033.0233410e-02