Skip to content

Commit 9f0144f

Browse files
committed
testsuite: cover flux-jobs cwd field
Problem: There is no coverage for the "cwd" (current working directory) field in flux-jobs. Add some tests in t2800-jobs-cmd.t and python/t0010-job.py.
1 parent 3739402 commit 9f0144f

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

t/python/t0010-job.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,7 @@ def test_33_get_job(self):
691691
't_depend',
692692
'state',
693693
'name',
694+
'cwd',
694695
'ntasks',
695696
'ncores',
696697
'duration',

t/t2800-jobs-cmd.t

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,15 @@ test_expect_success 'flux-jobs --format={name} works' '
528528
test_cmp jobnameI.out jobnameI.exp
529529
'
530530

531+
test_expect_success 'flux-jobs --format={cwd} works' '
532+
pwd=$(pwd) &&
533+
flux jobs -a -no "{cwd}" > jobcwd.out &&
534+
for i in `seq 1 $(state_count all)`; do
535+
echo "${pwd}" >> jobcwd.exp
536+
done &&
537+
test_cmp jobcwd.out jobcwd.exp
538+
'
539+
531540
# in job submissions above: completed jobs should be in queue1, running jobs
532541
# in queue2, and the rest in defaultqueue
533542
test_expect_success 'flux-jobs --format={queue} works' '
@@ -1035,6 +1044,7 @@ test_expect_success 'flux-jobs: header included with all custom formats' '
10351044
state_single==S
10361045
state_emoji==STATE
10371046
name==NAME
1047+
cwd==CWD
10381048
queue==QUEUE
10391049
ntasks==NTASKS
10401050
duration==DURATION

0 commit comments

Comments
 (0)