-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Problem: rq2 needs tests to verify that it can be a drop in replacement for rq1 Add some simple tests for current functionality. Generate the expected files using rq1
- Loading branch information
1 parent
6c7ca2e
commit 922b6dc
Showing
6 changed files
with
144 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
match allocate @TEST_SRCDIR@/data/resource/jobspecs/basics/test001.yaml | ||
match allocate @TEST_SRCDIR@/data/resource/jobspecs/basics/test001.yaml | ||
match allocate @TEST_SRCDIR@/data/resource/jobspecs/basics/test001.yaml | ||
match allocate @TEST_SRCDIR@/data/resource/jobspecs/basics/test001.yaml | ||
match allocate @TEST_SRCDIR@/data/resource/jobspecs/basics/test001.yaml | ||
quit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/basics/test001.yaml | ||
match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/basics/test001.yaml | ||
match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/basics/test001.yaml | ||
match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/basics/test001.yaml | ||
match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/basics/test001.yaml | ||
match allocate @TEST_SRCDIR@/data/resource/jobspecs/basics/test001.yaml | ||
quit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
---------------core35[1:x] | ||
------------socket1[1:x] | ||
---------node1[1:s] | ||
------rack0[1:s] | ||
---tiny0[1:s] | ||
INFO: ============================= | ||
INFO: JOBID=1 | ||
INFO: RESOURCES=ALLOCATED | ||
INFO: SCHEDULED AT=Now | ||
INFO: ============================= | ||
---------------core35[1:x] | ||
------------socket1[1:x] | ||
---------node0[1:s] | ||
------rack0[1:s] | ||
---tiny0[1:s] | ||
INFO: ============================= | ||
INFO: JOBID=2 | ||
INFO: RESOURCES=ALLOCATED | ||
INFO: SCHEDULED AT=Now | ||
INFO: ============================= | ||
---------------core17[1:x] | ||
------------socket0[1:x] | ||
---------node1[1:s] | ||
------rack0[1:s] | ||
---tiny0[1:s] | ||
INFO: ============================= | ||
INFO: JOBID=3 | ||
INFO: RESOURCES=ALLOCATED | ||
INFO: SCHEDULED AT=Now | ||
INFO: ============================= | ||
---------------core17[1:x] | ||
------------socket0[1:x] | ||
---------node0[1:s] | ||
------rack0[1:s] | ||
---tiny0[1:s] | ||
INFO: ============================= | ||
INFO: JOBID=4 | ||
INFO: RESOURCES=ALLOCATED | ||
INFO: SCHEDULED AT=Now | ||
INFO: ============================= | ||
INFO: ============================= | ||
INFO: No matching resources found | ||
INFO: JOBID=5 | ||
INFO: ============================= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
---------------core35[1:x] | ||
------------socket1[1:x] | ||
---------node1[1:s] | ||
------rack0[1:s] | ||
---tiny0[1:s] | ||
INFO: ============================= | ||
INFO: JOBID=1 | ||
INFO: RESOURCES=ALLOCATED | ||
INFO: SCHEDULED AT=Now | ||
INFO: ============================= | ||
---------------core35[1:x] | ||
------------socket1[1:x] | ||
---------node0[1:s] | ||
------rack0[1:s] | ||
---tiny0[1:s] | ||
INFO: ============================= | ||
INFO: JOBID=2 | ||
INFO: RESOURCES=ALLOCATED | ||
INFO: SCHEDULED AT=Now | ||
INFO: ============================= | ||
---------------core17[1:x] | ||
------------socket0[1:x] | ||
---------node1[1:s] | ||
------rack0[1:s] | ||
---tiny0[1:s] | ||
INFO: ============================= | ||
INFO: JOBID=3 | ||
INFO: RESOURCES=ALLOCATED | ||
INFO: SCHEDULED AT=Now | ||
INFO: ============================= | ||
---------------core17[1:x] | ||
------------socket0[1:x] | ||
---------node0[1:s] | ||
------rack0[1:s] | ||
---tiny0[1:s] | ||
INFO: ============================= | ||
INFO: JOBID=4 | ||
INFO: RESOURCES=ALLOCATED | ||
INFO: SCHEDULED AT=Now | ||
INFO: ============================= | ||
---------------core35[1:x] | ||
------------socket1[1:x] | ||
---------node1[1:s] | ||
------rack0[1:s] | ||
---tiny0[1:s] | ||
INFO: ============================= | ||
INFO: JOBID=5 | ||
INFO: RESOURCES=RESERVED | ||
INFO: SCHEDULED AT=3600 | ||
INFO: ============================= | ||
INFO: ============================= | ||
INFO: No matching resources found | ||
INFO: JOBID=6 | ||
INFO: ============================= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/sh | ||
|
||
test_description='Test resource graph remove subgraph' | ||
|
||
. $(dirname $0)/sharness.sh | ||
|
||
cmd_dir="${SHARNESS_TEST_SRCDIR}/data/resource/commands/rq2" | ||
exp_dir="${SHARNESS_TEST_SRCDIR}/data/resource/expected/rq2" | ||
jgf="${SHARNESS_TEST_SRCDIR}/data/resource/jgfs/tiny.json" | ||
query="../../resource/utilities/rq2" | ||
|
||
cmds001="${cmd_dir}/cmds01.in" | ||
test001_desc="match allocate test" | ||
test_expect_success "${test001_desc}" ' | ||
sed "s~@TEST_SRCDIR@~${SHARNESS_TEST_SRCDIR}~g" ${cmds001} > cmds001 && | ||
${query} -L ${jgf} -f jgf -t 001.R.out \ | ||
< cmds001 && | ||
test_cmp 001.R.out ${exp_dir}/001.R.out | ||
' | ||
|
||
cmds002="${cmd_dir}/cmds02.in" | ||
test002_desc="match allocate_orelse_reserve test" | ||
test_expect_success "${test002_desc}" ' | ||
sed "s~@TEST_SRCDIR@~${SHARNESS_TEST_SRCDIR}~g" ${cmds002} > cmds002 && | ||
${query} -L ${jgf} -f jgf -t 002.R.out \ | ||
< cmds002 && | ||
test_cmp 002.R.out ${exp_dir}/002.R.out | ||
' | ||
|
||
|
||
|
||
test_done |