Skip to content

Commit

Permalink
tests: add tests for remove subgraph
Browse files Browse the repository at this point in the history
problem: the remove subgrapgh feature added new code that
needs to be tested as a part of automated ci

add tests for this new feature
  • Loading branch information
zekemorton committed Sep 28, 2023
1 parent 018d042 commit e9c4bfc
Show file tree
Hide file tree
Showing 15 changed files with 1,129 additions and 0 deletions.
1 change: 1 addition & 0 deletions t/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ set(ALL_TESTS
t3031-resource-minmax2.t
t3033-resource-nodex.t
t3034-resource-pconstraints.t
t3035-resource-remove.t
t3300-system-dontblock.t
t3301-system-latestart.t
t4000-match-params.t
Expand Down
1 change: 1 addition & 0 deletions t/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ TESTS = \
t3031-resource-minmax2.t \
t3033-resource-nodex.t \
t3034-resource-pconstraints.t \
t3035-resource-remove.t \
t3300-system-dontblock.t \
t3301-system-latestart.t \
t4000-match-params.t \
Expand Down
3 changes: 3 additions & 0 deletions t/data/resource/commands/remove/cmds01.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
remove /tiny0/rack0/node1/socket1
find status=up
quit
8 changes: 8 additions & 0 deletions t/data/resource/commands/remove/cmds02.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
remove /tiny0/rack0/node1/socket1/core30
remove /tiny0/rack0/node1/socket1/core31
remove /tiny0/rack0/node1/socket1/core32
remove /tiny0/rack0/node1/socket1/core33
remove /tiny0/rack0/node1/socket1/core34
remove /tiny0/rack0/node1/socket1/core35
find status=up
quit
3 changes: 3 additions & 0 deletions t/data/resource/commands/remove/cmds03.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
remove /does/not/exist
find status=up
quit
7 changes: 7 additions & 0 deletions t/data/resource/commands/remove/cmds04.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
find sched-now=free
match allocate @TEST_SRCDIR@/data/resource/jobspecs/elastic/test-ma-node.yaml
find status=up
find sched-now=allocated
remove /tiny0/rack0/node0
find sched-now=allocated
quit
7 changes: 7 additions & 0 deletions t/data/resource/commands/remove/cmds05.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
find sched-now=free
match allocate @TEST_SRCDIR@/data/resource/jobspecs/elastic/test-ma-node.yaml
find status=up
find sched-now=allocated
remove /tiny0/rack0/node1
find sched-now=allocated
quit
6 changes: 6 additions & 0 deletions t/data/resource/commands/remove/cmds06.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
remove /tiny0/rack0/node1
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
79 changes: 79 additions & 0 deletions t/data/resource/expected/remove/001.R.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---------------core0[1:x]
---------------core1[1:x]
---------------core2[1:x]
---------------core3[1:x]
---------------core4[1:x]
---------------core5[1:x]
---------------core6[1:x]
---------------core7[1:x]
---------------core8[1:x]
---------------core9[1:x]
---------------core10[1:x]
---------------core11[1:x]
---------------core12[1:x]
---------------core13[1:x]
---------------core14[1:x]
---------------core15[1:x]
---------------core16[1:x]
---------------core17[1:x]
---------------gpu0[1:x]
---------------memory0[2:x]
---------------memory1[2:x]
---------------memory2[2:x]
---------------memory3[2:x]
------------socket0[1:x]
---------------core18[1:x]
---------------core19[1:x]
---------------core20[1:x]
---------------core21[1:x]
---------------core22[1:x]
---------------core23[1:x]
---------------core24[1:x]
---------------core25[1:x]
---------------core26[1:x]
---------------core27[1:x]
---------------core28[1:x]
---------------core29[1:x]
---------------core30[1:x]
---------------core31[1:x]
---------------core32[1:x]
---------------core33[1:x]
---------------core34[1:x]
---------------core35[1:x]
---------------gpu1[1:x]
---------------memory4[2:x]
---------------memory5[2:x]
---------------memory6[2:x]
---------------memory7[2:x]
------------socket1[1:x]
---------node0[1:x]
---------------core0[1:x]
---------------core1[1:x]
---------------core2[1:x]
---------------core3[1:x]
---------------core4[1:x]
---------------core5[1:x]
---------------core6[1:x]
---------------core7[1:x]
---------------core8[1:x]
---------------core9[1:x]
---------------core10[1:x]
---------------core11[1:x]
---------------core12[1:x]
---------------core13[1:x]
---------------core14[1:x]
---------------core15[1:x]
---------------core16[1:x]
---------------core17[1:x]
---------------gpu0[1:x]
---------------memory0[2:x]
---------------memory1[2:x]
---------------memory2[2:x]
---------------memory3[2:x]
------------socket0[1:x]
---------node1[1:x]
------rack0[1:x]
---tiny0[1:x]
INFO: =============================
INFO: EXPRESSION="status=up"
INFO: =============================
97 changes: 97 additions & 0 deletions t/data/resource/expected/remove/002.R.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---------------core0[1:x]
---------------core1[1:x]
---------------core2[1:x]
---------------core3[1:x]
---------------core4[1:x]
---------------core5[1:x]
---------------core6[1:x]
---------------core7[1:x]
---------------core8[1:x]
---------------core9[1:x]
---------------core10[1:x]
---------------core11[1:x]
---------------core12[1:x]
---------------core13[1:x]
---------------core14[1:x]
---------------core15[1:x]
---------------core16[1:x]
---------------core17[1:x]
---------------gpu0[1:x]
---------------memory0[2:x]
---------------memory1[2:x]
---------------memory2[2:x]
---------------memory3[2:x]
------------socket0[1:x]
---------------core18[1:x]
---------------core19[1:x]
---------------core20[1:x]
---------------core21[1:x]
---------------core22[1:x]
---------------core23[1:x]
---------------core24[1:x]
---------------core25[1:x]
---------------core26[1:x]
---------------core27[1:x]
---------------core28[1:x]
---------------core29[1:x]
---------------core30[1:x]
---------------core31[1:x]
---------------core32[1:x]
---------------core33[1:x]
---------------core34[1:x]
---------------core35[1:x]
---------------gpu1[1:x]
---------------memory4[2:x]
---------------memory5[2:x]
---------------memory6[2:x]
---------------memory7[2:x]
------------socket1[1:x]
---------node0[1:x]
---------------core0[1:x]
---------------core1[1:x]
---------------core2[1:x]
---------------core3[1:x]
---------------core4[1:x]
---------------core5[1:x]
---------------core6[1:x]
---------------core7[1:x]
---------------core8[1:x]
---------------core9[1:x]
---------------core10[1:x]
---------------core11[1:x]
---------------core12[1:x]
---------------core13[1:x]
---------------core14[1:x]
---------------core15[1:x]
---------------core16[1:x]
---------------core17[1:x]
---------------gpu0[1:x]
---------------memory0[2:x]
---------------memory1[2:x]
---------------memory2[2:x]
---------------memory3[2:x]
------------socket0[1:x]
---------------core18[1:x]
---------------core19[1:x]
---------------core20[1:x]
---------------core21[1:x]
---------------core22[1:x]
---------------core23[1:x]
---------------core24[1:x]
---------------core25[1:x]
---------------core26[1:x]
---------------core27[1:x]
---------------core28[1:x]
---------------core29[1:x]
---------------gpu1[1:x]
---------------memory4[2:x]
---------------memory5[2:x]
---------------memory6[2:x]
---------------memory7[2:x]
------------socket1[1:x]
---------node1[1:x]
------rack0[1:x]
---tiny0[1:x]
INFO: =============================
INFO: EXPRESSION="status=up"
INFO: =============================
103 changes: 103 additions & 0 deletions t/data/resource/expected/remove/003.R.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
---------------core0[1:x]
---------------core1[1:x]
---------------core2[1:x]
---------------core3[1:x]
---------------core4[1:x]
---------------core5[1:x]
---------------core6[1:x]
---------------core7[1:x]
---------------core8[1:x]
---------------core9[1:x]
---------------core10[1:x]
---------------core11[1:x]
---------------core12[1:x]
---------------core13[1:x]
---------------core14[1:x]
---------------core15[1:x]
---------------core16[1:x]
---------------core17[1:x]
---------------gpu0[1:x]
---------------memory0[2:x]
---------------memory1[2:x]
---------------memory2[2:x]
---------------memory3[2:x]
------------socket0[1:x]
---------------core18[1:x]
---------------core19[1:x]
---------------core20[1:x]
---------------core21[1:x]
---------------core22[1:x]
---------------core23[1:x]
---------------core24[1:x]
---------------core25[1:x]
---------------core26[1:x]
---------------core27[1:x]
---------------core28[1:x]
---------------core29[1:x]
---------------core30[1:x]
---------------core31[1:x]
---------------core32[1:x]
---------------core33[1:x]
---------------core34[1:x]
---------------core35[1:x]
---------------gpu1[1:x]
---------------memory4[2:x]
---------------memory5[2:x]
---------------memory6[2:x]
---------------memory7[2:x]
------------socket1[1:x]
---------node0[1:x]
---------------core0[1:x]
---------------core1[1:x]
---------------core2[1:x]
---------------core3[1:x]
---------------core4[1:x]
---------------core5[1:x]
---------------core6[1:x]
---------------core7[1:x]
---------------core8[1:x]
---------------core9[1:x]
---------------core10[1:x]
---------------core11[1:x]
---------------core12[1:x]
---------------core13[1:x]
---------------core14[1:x]
---------------core15[1:x]
---------------core16[1:x]
---------------core17[1:x]
---------------gpu0[1:x]
---------------memory0[2:x]
---------------memory1[2:x]
---------------memory2[2:x]
---------------memory3[2:x]
------------socket0[1:x]
---------------core18[1:x]
---------------core19[1:x]
---------------core20[1:x]
---------------core21[1:x]
---------------core22[1:x]
---------------core23[1:x]
---------------core24[1:x]
---------------core25[1:x]
---------------core26[1:x]
---------------core27[1:x]
---------------core28[1:x]
---------------core29[1:x]
---------------core30[1:x]
---------------core31[1:x]
---------------core32[1:x]
---------------core33[1:x]
---------------core34[1:x]
---------------core35[1:x]
---------------gpu1[1:x]
---------------memory4[2:x]
---------------memory5[2:x]
---------------memory6[2:x]
---------------memory7[2:x]
------------socket1[1:x]
---------node1[1:x]
------rack0[1:x]
---tiny0[1:x]
INFO: =============================
INFO: EXPRESSION="status=up"
INFO: =============================
Loading

0 comments on commit e9c4bfc

Please sign in to comment.