Skip to content

Commit c34103b

Browse files
committed
testsuite: add tests for flux-jobs -i, --include option
Problem: There are no tests of the flux-jobs -i, --include option. Add some simple tests of this option to t2800-jobs-cmd.t.
1 parent e764720 commit c34103b

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

t/t2800-jobs-cmd.t

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,28 @@ test_expect_success 'flux-jobs --count works' '
412412
test $count -eq 8
413413
'
414414

415+
#
416+
# -i, --include tests
417+
#
418+
test_expect_success 'flux-jobs -i, --include works with ranks' '
419+
for rank in $(flux jobs -ai 0 -no {ranks}); do
420+
test $rank -eq 0
421+
done
422+
'
423+
test_expect_success 'flux-jobs -i, --include works with ranks' '
424+
for rank in $(flux jobs -ai 0,3 -no {ranks}); do
425+
test $rank -eq 0 -o $rank -eq 3
426+
done
427+
'
428+
test_expect_success 'flux jobs -i, --include works with hosts' '
429+
for host in $(flux jobs -ai $(hostname) -no {nodelist}); do
430+
test $host = $(hostname)
431+
done
432+
'
433+
test_expect_success 'flux jobs -i, --include fails with bad idset/hostlist' '
434+
test_must_fail flux jobs -ai "foo["
435+
'
436+
415437
#
416438
# test specific IDs
417439
#

0 commit comments

Comments
 (0)