Skip to content

Commit a56fa2b

Browse files
ndokosportante
authored andcommitted
Unit test for pbench-copy-results.
Add unit test for pbench-copy-results.
1 parent 8cfaaf1 commit a56fa2b

File tree

248 files changed

+35442
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

248 files changed

+35442
-5
lines changed

agent/bench-scripts/test-bin/ssh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ echo "$0 $*" >> $_testlog
44

55
while true ;do
66
case $1 in
7+
-i)
8+
shift 2
9+
;;
710
-o)
811
shift 2
912
;;
@@ -25,7 +28,14 @@ if [[ "$2" == "hostname" && "$3" == "-s" ]]; then
2528
echo "$remote"
2629
fi
2730

28-
if [[ "$remote" == "fubar" ]] ;then
31+
# test -f (unquoted) should return failure
32+
if [[ "$2" == "test" && "$3" == "-f" ]]; then
33+
exit 1
34+
elif [[ "$2" =~ "test -f".* ]]; then
35+
# quoted "test -f ..." should also return failure
36+
# util-scripts/test-31 depends on this
37+
exit 1
38+
elif [[ "$remote" == "fubar" ]] ;then
2939
exit 255
3040
else
3141
exit 0

agent/util-scripts/gold/pbench-copy-results/test-31.txt

Lines changed: 356 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
[DEFAULT]
2+
pbench_install_dir = /opt/pbench-agent
3+
pbench_results_redirector = pbench.example.com
4+
pbench_web_server = pbench.example.com
5+
6+
[pbench-agent]
7+
install-dir = %(pbench_install_dir)s
8+
pbench_user = pbench
9+
pbench_group = pbench
10+
pbench_run = /var/lib/pbench-agent
11+
pbench_log = %(pbench_run)s/pbench.log
12+
13+
[pbench-agent-internal]
14+
install-dir = /opt/pbench-agent-internal
15+
16+
[results]
17+
user = pbench
18+
host_path = http://%(pbench_results_redirector)s/pbench-archive-host
19+
dir = /pbench/public_html/incoming
20+
ssh_opts = -o StrictHostKeyChecking=no
21+
webserver = %(pbench_web_server)s
22+
host_info_url = http://%(webserver)s/pbench-results-host-info.versioned/pbench-results-host-info.URL002
23+
24+
[pbench/tools]
25+
default-tool-set = sar, iostat, mpstat, pidstat, proc-vmstat, proc-interrupts, turbostat
26+
interval = 3
27+
28+
[tools/pidstat]
29+
interval = 30
30+
31+
[packages]
32+
pandas-package = python2-pandas
33+
34+
[config]
35+
path = %(pbench_install_dir)s/config
36+
files = pbench-agent-default.cfg
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
foo

agent/util-scripts/samples/pbench-copy-results/test-31/pbench/pbench-user-benchmark_ndk-test-1_2018.05.23T03.21.32/1/reference-result/result.txt

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
timestamp_ms,fedora-home-read,fedora-home-write,fedora-root-read,fedora-root-write,fedora-swap-read,fedora-swap-write,luks-5f8fb120-e038-4959-bc17-ea3216650f9c-read,luks-5f8fb120-e038-4959-bc17-ea3216650f9c-write,sda-read,sda-write
2+
1527045696000,0.00,0.00,164.33,0.00,0.00,0.00,164.33,0.00,164.33,0.00
3+
1527045699000,0.00,0.00,1.67,0.00,0.00,0.00,1.67,0.00,1.67,0.00
4+
1527045702000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
5+
1527045705000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
6+
1527045708000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
7+
1527045711000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
8+
1527045714000,0.33,49.33,0.33,7.00,0.00,0.00,0.67,56.33,0.67,45.33
9+
1527045717000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
10+
1527045720000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
11+
1527045723000,0.00,5.00,0.00,0.00,0.00,0.00,0.00,5.00,0.00,5.00
12+
1527045726000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
13+
1527045729000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
14+
1527045732000,0.00,1.33,0.00,0.33,0.00,0.00,0.00,1.67,0.00,1.67
15+
1527045735000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
16+
1527045738000,0.00,1.00,0.00,0.00,0.00,0.00,0.00,1.00,0.00,1.00
17+
1527045741000,0.00,7.33,0.00,0.00,0.00,0.00,0.00,7.33,0.00,7.33
18+
1527045744000,0.00,2.00,0.00,0.00,0.00,0.00,0.00,2.00,0.00,2.00
19+
1527045747000,0.00,0.67,0.00,0.00,0.00,0.00,0.00,0.67,0.00,0.67
20+
1527045750000,0.00,0.33,0.00,0.00,0.00,0.00,0.00,0.33,0.00,0.33
21+
1527045753000,0.00,0.00,4.00,0.00,0.00,0.00,4.00,0.00,4.00,0.00
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
timestamp_ms,fedora-home,fedora-root,fedora-swap,luks-5f8fb120-e038-4959-bc17-ea3216650f9c,sda
2+
1527045696000,0.00,0.04,0.00,0.04,0.03
3+
1527045699000,0.00,0.01,0.00,0.01,0.01
4+
1527045702000,0.00,0.00,0.00,0.00,0.00
5+
1527045705000,0.00,0.00,0.00,0.00,0.00
6+
1527045708000,0.00,0.00,0.00,0.00,0.00
7+
1527045711000,0.00,0.00,0.00,0.00,0.00
8+
1527045714000,0.85,0.08,0.00,0.93,0.70
9+
1527045717000,0.00,0.00,0.00,0.00,0.00
10+
1527045720000,0.00,0.00,0.00,0.00,0.00
11+
1527045723000,0.02,0.00,0.00,0.02,0.02
12+
1527045726000,0.00,0.00,0.00,0.00,0.00
13+
1527045729000,0.00,0.00,0.00,0.00,0.00
14+
1527045732000,0.00,0.00,0.00,0.00,0.00
15+
1527045735000,0.00,0.00,0.00,0.00,0.00
16+
1527045738000,0.01,0.00,0.00,0.01,0.01
17+
1527045741000,0.02,0.00,0.00,0.02,0.02
18+
1527045744000,0.01,0.00,0.00,0.01,0.01
19+
1527045747000,0.00,0.00,0.00,0.00,0.00
20+
1527045750000,0.00,0.00,0.00,0.00,0.00
21+
1527045753000,0.00,0.00,0.00,0.00,0.00
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
timestamp_ms,fedora-home-read,fedora-home-write,fedora-root-read,fedora-root-write,fedora-swap-read,fedora-swap-write,luks-5f8fb120-e038-4959-bc17-ea3216650f9c-read,luks-5f8fb120-e038-4959-bc17-ea3216650f9c-write,sda-read,sda-write
2+
1527045696000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
3+
1527045699000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
4+
1527045702000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
5+
1527045705000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
6+
1527045708000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
7+
1527045711000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
8+
1527045714000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,11.00
9+
1527045717000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
10+
1527045720000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
11+
1527045723000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
12+
1527045726000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
13+
1527045729000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
14+
1527045732000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
15+
1527045735000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
16+
1527045738000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
17+
1527045741000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
18+
1527045744000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
19+
1527045747000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
20+
1527045750000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
21+
1527045753000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
timestamp_ms,fedora-home,fedora-root,fedora-swap,luks-5f8fb120-e038-4959-bc17-ea3216650f9c,sda
2+
1527045696000,0.00,57.48,0.00,57.48,57.48
3+
1527045699000,0.00,27.20,0.00,27.20,27.20
4+
1527045702000,0.00,0.00,0.00,0.00,0.00
5+
1527045705000,0.00,0.00,0.00,0.00,0.00
6+
1527045708000,0.00,0.00,0.00,0.00,0.00
7+
1527045711000,0.00,0.00,0.00,0.00,0.00
8+
1527045714000,39.33,55.55,0.00,37.91,46.98
9+
1527045717000,0.00,0.00,0.00,0.00,0.00
10+
1527045720000,0.00,0.00,0.00,0.00,0.00
11+
1527045723000,17.87,0.00,0.00,14.00,14.00
12+
1527045726000,0.00,0.00,0.00,0.00,0.00
13+
1527045729000,0.00,0.00,0.00,0.00,0.00
14+
1527045732000,12.00,8.00,0.00,11.20,11.20
15+
1527045735000,0.00,0.00,0.00,0.00,0.00
16+
1527045738000,90.67,0.00,0.00,78.67,78.67
17+
1527045741000,48.64,0.00,0.00,48.14,48.14
18+
1527045744000,69.00,0.00,0.00,67.83,67.83
19+
1527045747000,24.00,0.00,0.00,24.00,24.00
20+
1527045750000,8.00,0.00,0.00,8.00,8.00
21+
1527045753000,0.00,26.00,0.00,26.00,26.00
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
timestamp_ms,fedora-home-read,fedora-home-write,fedora-root-read,fedora-root-write,fedora-swap-read,fedora-swap-write,luks-5f8fb120-e038-4959-bc17-ea3216650f9c-read,luks-5f8fb120-e038-4959-bc17-ea3216650f9c-write,sda-read,sda-write
2+
1527045696000,0.00,0.00,4.61,0.00,0.00,0.00,4.61,0.00,4.61,0.00
3+
1527045699000,0.00,0.00,0.02,0.00,0.00,0.00,0.02,0.00,0.02,0.00
4+
1527045702000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
5+
1527045705000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
6+
1527045708000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
7+
1527045711000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
8+
1527045714000,0.01,0.95,0.01,0.19,0.00,0.00,0.01,1.04,0.01,1.04
9+
1527045717000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
10+
1527045720000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
11+
1527045723000,0.00,0.04,0.00,0.00,0.00,0.00,0.00,0.03,0.00,0.03
12+
1527045726000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
13+
1527045729000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
14+
1527045732000,0.00,0.01,0.00,0.00,0.00,0.00,0.00,0.01,0.00,0.01
15+
1527045735000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
16+
1527045738000,0.00,0.04,0.00,0.00,0.00,0.00,0.00,0.04,0.00,0.04
17+
1527045741000,0.00,0.17,0.00,0.00,0.00,0.00,0.00,0.17,0.00,0.17
18+
1527045744000,0.00,0.07,0.00,0.00,0.00,0.00,0.00,0.07,0.00,0.07
19+
1527045747000,0.00,0.01,0.00,0.00,0.00,0.00,0.00,0.01,0.00,0.01
20+
1527045750000,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
21+
1527045753000,0.00,0.00,0.05,0.00,0.00,0.00,0.05,0.00,0.05,0.00

0 commit comments

Comments
 (0)