]> granicus.if.org Git - sysstat/commitdiff
simtest: Add new tests to check sadf XML header validity
authorSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 13 Oct 2019 10:03:45 +0000 (12:03 +0200)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 13 Oct 2019 10:03:45 +0000 (12:03 +0200)
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
tests/00305 [new file with mode: 0644]
tests/00405 [new file with mode: 0644]
tests/00415 [new file with mode: 0644]
tests/TLIST

diff --git a/tests/00305 b/tests/00305
new file mode 100644 (file)
index 0000000..0bbb9ac
--- /dev/null
@@ -0,0 +1,4 @@
+. tests/variables
+if [ ! -z "$VER_JSON" ]; then
+       ./sadf -Hj tests/data.tmp -C | $VER_JSON >/dev/null;
+fi
diff --git a/tests/00405 b/tests/00405
new file mode 100644 (file)
index 0000000..f4e3e40
--- /dev/null
@@ -0,0 +1,5 @@
+. tests/variables
+if [ ! -z "$VER_XML" ]; then
+       export LC_ALL=C
+       ./sadf -Hx tests/data.tmp -C | $VER_XML --schema xml/sysstat.xsd - >/dev/null;
+fi
diff --git a/tests/00415 b/tests/00415
new file mode 100644 (file)
index 0000000..49dbbec
--- /dev/null
@@ -0,0 +1,5 @@
+. tests/variables
+if [ ! -z "$VER_XML" ]; then
+       export LC_ALL=C
+       ./sadf -Hx tests/data.tmp -C | $VER_XML --dtdvalid xml/sysstat-*.dtd - >/dev/null;
+fi
index 1a6a4fc427cb3a2db0a5adea08b778cc82664e89..b79ddfa8a297c9f3b24fc4052ee33ec3923b0f6f 100644 (file)
@@ -45,6 +45,7 @@ NOTES:
 
 =====  Checking JSON output validity
 00300  ./sadf -j tests/data.tmp -C -- -A | $VER_JSON >/dev/null && ./sadf -j tests/data.tmp | $VER_JSON >/dev/null && ./sadf -t -j tests/data.tmp | $VER_JSON >/dev/null
+00305  ./sadf -Hj tests/data.tmp -C | $VER_JSON >/dev/null
 00310  ./mpstat -A -o JSON | $VER_JSON >/dev/null
 00320  ./iostat -t -p ALL -o JSON | $VER_JSON >/dev/null
 00330  ./mpstat -o JSON 1 10 | $VER_JSON >/dev/null
@@ -60,7 +61,9 @@ NOTES:
 
 =====  Checking XML output validity
 00400  export LC_ALL=C ; ./sadf -x tests/data.tmp -C -- -A | $VER_XML --schema xml/sysstat.xsd - >/dev/null && ./sadf -x tests/data.tmp | $VER_XML --schema xml/sysstat.xsd - >/dev/null && ./sadf -T -x tests/data.tmp | $VER_XML --schema xml/sysstat.xsd - >/dev/null
+00405  export LC_ALL=C ; ./sadf -Hx tests/data.tmp -C | $VER_XML --schema xml/sysstat.xsd - >/dev/null
 00410  export LC_ALL=C ; ./sadf -x tests/data.tmp -C -- -A | $VER_XML --dtdvalid xml/sysstat-*.dtd - >/dev/null && ./sadf -x tests/data.tmp | $VER_XML --dtdvalid xml/sysstat-*.dtd - >/dev/null && ./sadf -t -x tests/data.tmp | $VER_XML --dtdvalid xml/sysstat-*.dtd - >/dev/null
+00415  export LC_ALL=C ; ./sadf -Hx tests/data.tmp -C | $VER_XML --dtdvalid xml/sysstat-*.dtd - >/dev/null
 
 =====  Checking sadf output
 00500  LC_ALL=C ./sadf -p tests/data.tmp -C -- -A > tests/out.sadf-p.tmp