Skip to content

Commit

Permalink
test: Add an R_lite test for JSC
Browse files Browse the repository at this point in the history
  • Loading branch information
dongahn committed Apr 24, 2018
1 parent efe5341 commit 9a4ba90
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion t/t2001-jsc.t
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ EOF
test_cmp expected.12.1 output.12.1
"

test_expect_success 'jstat 13: update rdl_alloc' "
test_expect_success 'jstat 13.1: update rdl_alloc' "
flux jstat update 1 rdl_alloc '{\"rdl_alloc\": [{\"contained\": {\"cmbdrank\": 0, \"cmbdncores\": 102, \"cmbdngpus\": 4}}]}' &&
flux kvs get --json $(flux wreck kvs-path 1).rank.0.cores > output.13.1 &&
flux kvs get --json $(flux wreck kvs-path 1).rank.0.gpus >> output.13.1 &&
Expand All @@ -249,6 +249,15 @@ EOF
test_cmp expected.13.1 output.13.1
"

test_expect_success 'jstat 13.2: update r_lite' "
flux jstat update 1 R_lite '{\"R_lite\": [{\"children\": {\"core\": \"0\"}, \"rank\": 0}]}' &&
flux kvs get --json $(flux wreck kvs-path 1).R_lite > output.13.2 &&
cat > expected.13.2 <<-EOF &&
[{\"children\": {\"core\": \"0\"}, \"rank\": 0}]
EOF
test_cmp expected.13.2 output.13.2
"

test_expect_success 'jstat 14: update detects bad inputs' "
test_expect_code 42 flux jstat update 1 jobid '{\"jobid\": 1}' &&
test_expect_code 42 flux jstat update 0 rdesc '{\"rdesc\": {\"nnodes\": 128, \"ntasks\": 128, \"ncores\":128, \"walltime\": 1800}}' &&
Expand Down

0 comments on commit 9a4ba90

Please sign in to comment.