From: Tobias Oetiker Date: Wed, 5 Aug 2015 12:35:28 +0000 (+0200) Subject: fix test suite 32bit compatibility X-Git-Tag: v1.5.4~10^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F648%2Fhead;p=thirdparty%2Frrdtool-1.x.git fix test suite 32bit compatibility --- diff --git a/examples/Makefile.in b/examples/Makefile.in index 77d1dd8a..802590fb 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -422,7 +422,8 @@ SUBDIRS = rrdcached EXTRA_DIST = cgi-demo.cgi.in examplesdir = $(pkgdatadir)/examples examples_SCRIPTS = cgi-demo.cgi piped-demo.pl shared-demo.pl \ - stripes.pl bigtops.pl minmax.pl 4charts.pl perftest.pl + stripes.pl bigtops.pl minmax.pl 4charts.pl perftest.pl \ + stripes.py all: all-recursive diff --git a/tests/Makefile.in b/tests/Makefile.in index b3578a64..e6b36c15 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -525,7 +525,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = modify1 modify2 modify3 modify4 modify5 \ - tune1 tune2 rpn1 \ + tune1 tune2 rpn1 rpn2 \ rrdcreate \ dump-restore \ create-with-source-1 create-with-source-2 create-with-source-3 \ @@ -542,7 +542,7 @@ EXTRA_DIST = Makefile.am \ rrdcreate \ tune1-testa-mod1.dump tune1-testa-mod2.dump tune1-testorg.dump \ tune2-testa-mod1.dump tune2-testorg.dump \ - valgrind-supressions dcounter1 dcounter1.output vformatter1 + valgrind-supressions dcounter1 dcounter1.output vformatter1 rpn2.output # NB: AM_TESTS_ENVIRONMENT not available until automake 1.12 TESTS_ENVIRONMENT = \ @@ -552,7 +552,8 @@ TESTS_ENVIRONMENT = \ CLEANFILES = *.rrd \ ct.out dur.out \ - modify5-testa1-mod.dump modify5-testa2-mod.dump + modify5-testa1-mod.dump modify5-testa2-mod.dump \ + modify5-testa1-mod.dump.tmp modify5-testa2-mod.dump.tmp all: all-am @@ -798,6 +799,13 @@ rpn1.log: rpn1 --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +rpn2.log: rpn2 + @p='rpn2'; \ + b='rpn2'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) rrdcreate.log: rrdcreate @p='rrdcreate'; \ b='rrdcreate'; \ diff --git a/tests/alltests b/tests/alltests deleted file mode 100755 index 0f3f1e9c..00000000 --- a/tests/alltests +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -# fail immediately if any subsequent command fails -set -e - -TZ=CET -export TZ - -RRDTOOL="$1" -export RRDTOOL - -BASEDIR=$(dirname $0) -cd $BASEDIR - -./modify1 -./modify2 -./modify3 -./modify4 -./modify5 -./rrdcreate -./dcounter1 -./xport1 diff --git a/tests/dcounter1.output b/tests/dcounter1.output index 506d48ec..6a4f3f3b 100644 --- a/tests/dcounter1.output +++ b/tests/dcounter1.output @@ -1,25 +1,25 @@ -1300000800: -1.170925000e-03 3.678486941e-02 -1300001400: -9.698291666e-04 3.635424604e-02 -1300002000: -9.119541666e-04 3.596822650e-02 +1300000800: -1.170925000e-03 3.678486942e-02 +1300001400: -9.698291667e-04 3.635424604e-02 +1300002000: -9.119541667e-04 3.596822650e-02 1300002600: -8.563833333e-04 3.559656183e-02 -1300003200: -8.841666666e-04 3.523403970e-02 -1300003800: -8.271666666e-04 3.487834120e-02 -1300004400: -8.556666666e-04 3.452460016e-02 -1300005000: -8.556666666e-04 3.417131125e-02 +1300003200: -8.841666667e-04 3.523403971e-02 +1300003800: -8.271666667e-04 3.487834121e-02 +1300004400: -8.556666667e-04 3.452460017e-02 +1300005000: -8.556666667e-04 3.417131125e-02 1300005600: -7.986625000e-04 3.382345987e-02 -1300006200: -7.700041666e-04 3.349336804e-02 +1300006200: -7.700041667e-04 3.349336804e-02 1300006800: -6.560000000e-04 3.319680079e-02 1300007400: -5.705000000e-04 3.294191550e-02 1300008000: -4.570458333e-04 3.272901004e-02 1300008600: -3.993333333e-04 3.255259075e-02 -1300009200: -3.423333333e-04 3.239795991e-02 -1300009800: -3.136666666e-04 3.225936887e-02 +1300009200: -3.423333333e-04 3.239795992e-02 +1300009800: -3.136666667e-04 3.225936887e-02 1300010400: -3.138333333e-04 3.212701475e-02 -1300011000: -3.421666666e-04 3.199287379e-02 +1300011000: -3.421666667e-04 3.199287379e-02 1300011600: -3.423333333e-04 3.185289975e-02 -1300012200: -3.993333333e-04 3.169681012e-02 +1300012200: -3.993333333e-04 3.169681013e-02 1300012800: -4.563333333e-04 3.152022212e-02 1300013400: -5.412833333e-04 3.131382025e-02 -1300014000: -6.560000000e-04 3.106526070e-02 +1300014000: -6.560000000e-04 3.106526071e-02 1300014600: -9.404583333e-04 3.073564350e-02 -1300015200: -1.679979166e-03 3.023341000e-02 +1300015200: -1.679979167e-03 3.023341000e-02 diff --git a/tests/functions b/tests/functions index 6db3f576..e4a183de 100644 --- a/tests/functions +++ b/tests/functions @@ -12,7 +12,7 @@ DIFF="diff -u" DIFF9=seddif function seddif { - perl -p -e 's/([-+]?\d\.\d+e[-+]\d+)/sprintf("%0.10e",$1)/ge' | $DIFF $@ + perl -p -e 's/([-+]?\d\.\d+e[-+]\d+)/sprintf("%0.9e",$1)/ge' | $DIFF $@ } # diff --git a/tests/rpn2.output b/tests/rpn2.output index dfe95006..2a052929 100644 --- a/tests/rpn2.output +++ b/tests/rpn2.output @@ -10,16 +10,16 @@ }, "data": [ [ null, null ], - [ 3.3333333333e-02, 1.0000000000e+01 ], - [ 3.3333333333e-02, 2.0000000000e+01 ], - [ 3.3333333333e-02, 3.0000000000e+01 ], - [ 3.3333333333e-02, 4.0000000000e+01 ], - [ 3.3333333333e-02, 5.0000000000e+01 ], - [ 3.3333333333e-02, 6.0000000000e+01 ], - [ 3.3333333333e-02, 7.0000000000e+01 ], - [ 3.3333333333e-02, 8.0000000000e+01 ], - [ 3.3333333333e-02, 9.0000000000e+01 ], - [ 3.3333333333e-02, 1.0000000000e+02 ], - [ 3.3333333333e-02, 1.1000000000e+02 ] + [ 3.333333333e-02, 1.000000000e+01 ], + [ 3.333333333e-02, 2.000000000e+01 ], + [ 3.333333333e-02, 3.000000000e+01 ], + [ 3.333333333e-02, 4.000000000e+01 ], + [ 3.333333333e-02, 5.000000000e+01 ], + [ 3.333333333e-02, 6.000000000e+01 ], + [ 3.333333333e-02, 7.000000000e+01 ], + [ 3.333333333e-02, 8.000000000e+01 ], + [ 3.333333333e-02, 9.000000000e+01 ], + [ 3.333333333e-02, 1.000000000e+02 ], + [ 3.333333333e-02, 1.100000000e+02 ] ] }