diff options
Diffstat (limited to '')
-rw-r--r-- | tests/Makefile.am | 4 | ||||
-rw-r--r-- | tests/Makefile.in | 22 | ||||
-rw-r--r-- | tests/node.d/fronius.chart.spec.js | 3 | ||||
-rw-r--r-- | tests/node.d/fronius.parse.spec.js | 3 | ||||
-rw-r--r-- | tests/node.d/fronius.process.spec.js | 3 | ||||
-rw-r--r-- | tests/node.d/fronius.validation.spec.js | 3 | ||||
-rwxr-xr-x | tests/stress.sh | 21 | ||||
-rw-r--r-- | tests/web/easypiechart.chart.spec.js | 2 | ||||
-rw-r--r-- | tests/web/easypiechart.percentage.spec.js | 2 |
9 files changed, 39 insertions, 24 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index fe07653f..722266d7 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,4 +1,6 @@ -MAINTAINERCLEANFILES= $(srcdir)/Makefile.in +# SPDX-License-Identifier: GPL-3.0-or-later + +MAINTAINERCLEANFILES = $(srcdir)/Makefile.in dist_noinst_DATA = \ README.md \ diff --git a/tests/Makefile.in b/tests/Makefile.in index ff5bd2f2..c9109dbd 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -14,6 +14,8 @@ @SET_MAKE@ +# SPDX-License-Identifier: GPL-3.0-or-later + VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' @@ -83,14 +85,16 @@ subdir = tests DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(dist_noinst_SCRIPTS) $(dist_noinst_DATA) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___atomic.m4 \ - $(top_srcdir)/m4/ax_c__generic.m4 $(top_srcdir)/m4/ax_c_lto.m4 \ - $(top_srcdir)/m4/ax_c_mallinfo.m4 \ - $(top_srcdir)/m4/ax_c_mallopt.m4 \ - $(top_srcdir)/m4/ax_check_compile_flag.m4 \ - $(top_srcdir)/m4/ax_gcc_func_attribute.m4 \ - $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/jemalloc.m4 \ - $(top_srcdir)/m4/tcmalloc.m4 $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/build/m4/ax_c___atomic.m4 \ + $(top_srcdir)/build/m4/ax_c__generic.m4 \ + $(top_srcdir)/build/m4/ax_c_lto.m4 \ + $(top_srcdir)/build/m4/ax_c_mallinfo.m4 \ + $(top_srcdir)/build/m4/ax_c_mallopt.m4 \ + $(top_srcdir)/build/m4/ax_check_compile_flag.m4 \ + $(top_srcdir)/build/m4/ax_gcc_func_attribute.m4 \ + $(top_srcdir)/build/m4/ax_pthread.m4 \ + $(top_srcdir)/build/m4/jemalloc.m4 \ + $(top_srcdir)/build/m4/tcmalloc.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -217,6 +221,7 @@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ +build_target = @build_target@ build_vendor = @build_vendor@ builddir = @builddir@ cachedir = @cachedir@ @@ -238,6 +243,7 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ +libconfigdir = @libconfigdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ diff --git a/tests/node.d/fronius.chart.spec.js b/tests/node.d/fronius.chart.spec.js index 2d2b57cd..92e88d2e 100644 --- a/tests/node.d/fronius.chart.spec.js +++ b/tests/node.d/fronius.chart.spec.js @@ -1,4 +1,5 @@ "use strict"; +// SPDX-License-Identifier: GPL-3.0-or-later var netdata = require("../../node.d/node_modules/netdata"); // remember: subject will be a singleton! @@ -158,4 +159,4 @@ describe("fronius chart creation", function () { expect(first).toBe(second); }); -});
\ No newline at end of file +}); diff --git a/tests/node.d/fronius.parse.spec.js b/tests/node.d/fronius.parse.spec.js index 0dbfa030..e6f308fe 100644 --- a/tests/node.d/fronius.parse.spec.js +++ b/tests/node.d/fronius.parse.spec.js @@ -1,4 +1,5 @@ "use strict"; +// SPDX-License-Identifier: GPL-3.0-or-later var netdata = require("../../node.d/node_modules/netdata"); // remember: subject will be a singleton! @@ -329,4 +330,4 @@ describe("fronius parsing for inverters", function () { expect(result.value).toBe(1000); }); -});
\ No newline at end of file +}); diff --git a/tests/node.d/fronius.process.spec.js b/tests/node.d/fronius.process.spec.js index daa84f39..141fa8a6 100644 --- a/tests/node.d/fronius.process.spec.js +++ b/tests/node.d/fronius.process.spec.js @@ -1,4 +1,5 @@ "use strict"; +// SPDX-License-Identifier: GPL-3.0-or-later var netdata = require("../../node.d/node_modules/netdata"); // remember: subject will be a singleton! @@ -71,4 +72,4 @@ describe("fronius main processing", function () { }); -});
\ No newline at end of file +}); diff --git a/tests/node.d/fronius.validation.spec.js b/tests/node.d/fronius.validation.spec.js index 08b7e430..b7938d52 100644 --- a/tests/node.d/fronius.validation.spec.js +++ b/tests/node.d/fronius.validation.spec.js @@ -1,4 +1,5 @@ "use strict"; +// SPDX-License-Identifier: GPL-3.0-or-later var netdata = require("../../node.d/node_modules/netdata"); // remember: subject will be a singleton! @@ -151,4 +152,4 @@ describe("fronius configuration validation", function () { expect(subject.serviceExecute).toHaveBeenCalledWith(name2, "solar2.local/", 3); }); -});
\ No newline at end of file +}); diff --git a/tests/stress.sh b/tests/stress.sh index d09d6989..9c9393d3 100755 --- a/tests/stress.sh +++ b/tests/stress.sh @@ -1,17 +1,19 @@ #!/bin/bash +# SPDX-License-Identifier: GPL-3.0-or-later # set the host to connect to if [ ! -z "$1" ] - then +then host="$1" else host="http://127.0.0.1:19999" fi echo "using netdata server at: $host" +# shellcheck disable=SC2207 disable=SC1117 charts=($(curl "$host/netdata.conf" 2>/dev/null | grep "^\[" | cut -d '[' -f 2 | cut -d ']' -f 1 | grep -v ^global$ | grep -v "^plugin" | sort -u)) if [ "${#charts[@]}" -eq 0 ] - then +then echo "Cannot download charts from server: $host" exit 1 fi @@ -26,7 +28,7 @@ entries="$(curl "$host/netdata.conf" 2>/dev/null | grep "history = " | head -n 1 [ $entries -gt 3600 ] && entries=3600 if [ $entries -ne 3600 ] - then +then echo >&2 "You are running a test for a history of $entries entries." fi @@ -41,19 +43,20 @@ duration=$((now - first)) file="$(mktemp /tmp/netdata-stress-XXXXXXXX)" cleanup() { echo "cleanup" - [ -f $file ] && rm $file + [ -f "$file" ] && rm "$file" } trap cleanup EXIT -while [ 1 = 1 ] +while true do - echo "curl --compressed --keepalive-time 120 --header \"Connection: keep-alive\" \\" >$file + echo "curl --compressed --keepalive-time 120 --header \"Connection: keep-alive\" \\" >"$file" + # shellcheck disable=SC2034 for x in {1..100} do dt=$((RANDOM * duration / 32767)) st=$((RANDOM * duration / 32767)) et=$(( st + dt )) - [ $et -gt $now ] && st=$(( now - dt )) + [ $et -gt "$now" ] && st=$(( now - dt )) points=$((RANDOM * 2000 / 32767 + 2)) st=$((first + st)) @@ -69,6 +72,6 @@ do format="${formats[$format]}" echo "--url \"$host/api/v1/data?chart=$chart&mode=$mode&format=$format&options=$options&after=$st&before=$et&points=$points\" \\" - done >>$file - bash $file >/dev/null + done >>"$file" + bash "$file" >/dev/null done diff --git a/tests/web/easypiechart.chart.spec.js b/tests/web/easypiechart.chart.spec.js index 8f5e4963..23bf33d6 100644 --- a/tests/web/easypiechart.chart.spec.js +++ b/tests/web/easypiechart.chart.spec.js @@ -36,4 +36,4 @@ describe("creation of easy pie charts", function () { }; } -});
\ No newline at end of file +}); diff --git a/tests/web/easypiechart.percentage.spec.js b/tests/web/easypiechart.percentage.spec.js index e6168bdd..976b3396 100644 --- a/tests/web/easypiechart.percentage.spec.js +++ b/tests/web/easypiechart.percentage.spec.js @@ -139,4 +139,4 @@ function createState(min, max) { easyPieChartMax: max } }; -}
\ No newline at end of file +} |