Skip to content

Commit

Permalink
testsuite: add by_rank checks to graph-size tests
Browse files Browse the repository at this point in the history
add tests to check the number of vertices associated
with rank -1 (the default value) for GRUG, JGF, and
hwloc test graphs.
  • Loading branch information
milroy committed Jun 17, 2020
1 parent d42b7e1 commit 0b5d5ca
Showing 1 changed file with 27 additions and 9 deletions.
36 changes: 27 additions & 9 deletions t/t6000-graph-size.t
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ test_expect_success "vertex/edge counts for a tiny machine are correct" '
test ${edg} -eq 198
'

test_expect_success "by_type, by_name, and by_path map sizes are correct \
for GRUG" '
test_expect_success "by_type, by_name, by_path, and by_rank map sizes are \
correct for GRUG" '
echo "quit" > input2.txt &&
${query} -L ${tiny_grug} -e -S CA -P high < input2.txt > out2.txt &&
by_type=$(grep "by_type" out2.txt | sed "s/INFO: by_type Key-Value \
Expand All @@ -30,13 +30,19 @@ Pairs: //") &&
Pairs: //") &&
by_path=$(grep "by_path" out2.txt | sed "s/INFO: by_path Key-Value \
Pairs: //") &&
by_rank=$(grep "number of" out2.txt | sed "s/INFO: number of \
vertices with rank //") &&
rank=$( echo ${by_rank} | sed "s/:.*//" ) &&
nvertices=$( echo ${by_rank} | sed "s/[^:]*://" ) &&
test ${by_type} -eq 7 &&
test ${by_name} -eq 52 &&
test ${by_path} -eq 100
test ${by_path} -eq 100 &&
test ${rank} -eq -1 &&
test ${nvertices} -eq 100
'

test_expect_success "by_type, by_name, and by_path map sizes are correct \
for JGF" '
test_expect_success "by_type, by_name, by_path, and by_rank map sizes are \
correct for JGF" '
echo "quit" > input3.txt &&
${query} -L ${tiny_jgf} -e -S CA -P high -f jgf < input3.txt > \
out3.txt &&
Expand All @@ -46,13 +52,19 @@ Pairs: //") &&
Pairs: //") &&
by_path=$(grep "by_path" out3.txt | sed "s/INFO: by_path Key-Value \
Pairs: //") &&
by_rank=$(grep "number of" out3.txt | sed "s/INFO: number of \
vertices with rank //") &&
rank=$( echo ${by_rank} | sed "s/:.*//" ) &&
nvertices=$( echo ${by_rank} | sed "s/[^:]*://" ) &&
test ${by_type} -eq 7 &&
test ${by_name} -eq 52 &&
test ${by_path} -eq 100
test ${by_path} -eq 100 &&
test ${rank} -eq -1 &&
test ${nvertices} -eq 100
'

test_expect_success "by_type, by_name, and by_path map sizes are correct \
for hwloc" '
test_expect_success "by_type, by_name, by_path, and by_rank map sizes are \
correct for hwloc" '
echo "quit" > input4.txt &&
${query} -L ${exclusive_001N_hwloc} -e -S CA -P high -f hwloc < \
input4.txt > out4.txt &&
Expand All @@ -62,9 +74,15 @@ Pairs: //") &&
Pairs: //") &&
by_path=$(grep "by_path" out4.txt | sed "s/INFO: by_path Key-Value \
Pairs: //") &&
by_rank=$(grep "number of" out4.txt | sed "s/INFO: number of \
vertices with rank //") &&
rank=$( echo ${by_rank} | sed "s/:.*//" ) &&
nvertices=$( echo ${by_rank} | sed "s/[^:]*://" ) &&
test ${by_type} -eq 7 &&
test ${by_name} -eq 21 &&
test ${by_path} -eq 21
test ${by_path} -eq 21 &&
test ${rank} -eq -1 &&
test ${nvertices} -eq 21
'

test_expect_success "--reserve-vtx-vec works" '
Expand Down

0 comments on commit 0b5d5ca

Please sign in to comment.