Skip to content

Commit

Permalink
testsuite: add tests for unpack_at
Browse files Browse the repository at this point in the history
Add tests for unpack_at(). The test
uses a JGF with one node with two
CPUs, each containing 18 cores. After
loading the base JGF, a match allocate
ensures that the resource graph is fully
allocated. Find() output verifies the
resource graph contents at that point.
Next, the shuffled JGF subgraph is
added to the job allocation via update
attach, and the resulting resource graph
contents are verified by another find().
  • Loading branch information
milroy committed Dec 3, 2020
1 parent babb8f4 commit 20b38dc
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions t/t3028-resource-grow.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh

test_description='Test emitted resource-set correctness for job growth'

. $(dirname $0)/sharness.sh

cmd_dir="${SHARNESS_TEST_SRCDIR}/data/resource/commands/elastic"
exp_dir="${SHARNESS_TEST_SRCDIR}/data/resource/expected/elastic"
jgf="${SHARNESS_TEST_SRCDIR}/data/resource/jgfs/elastic/node-test.json"
query="../../resource/utilities/resource-query"

cmds001="${cmd_dir}/cmds01.in"
test001_desc="fully allocate node, find all resources, grow job and find all resources"
test_expect_success "${test001_desc}" '
sed "s~@TEST_SRCDIR@~${SHARNESS_TEST_SRCDIR}~g" ${cmds001} > cmds001 &&
${query} -L ${jgf} -F jgf -f jgf -S CA -P low -t 001.R.out < cmds001 &&
test_cmp 001.R.out ${exp_dir}/001.R.out
'

test_done

0 comments on commit 20b38dc

Please sign in to comment.