test: update test-engine.c to work again
This commit is contained in:
parent
e1d680ad55
commit
35374c804d
|
@ -36,9 +36,9 @@ int main(int argc, char *argv[]) {
|
||||||
assert_se(manager_new(MANAGER_INIT, false, &m) >= 0);
|
assert_se(manager_new(MANAGER_INIT, false, &m) >= 0);
|
||||||
|
|
||||||
printf("Load1:\n");
|
printf("Load1:\n");
|
||||||
assert_se(manager_load_unit(m, "a.service", NULL, &a) == 0);
|
assert_se(manager_load_unit(m, "a.service", NULL, &a) >= 0);
|
||||||
assert_se(manager_load_unit(m, "b.service", NULL, &b) == 0);
|
assert_se(manager_load_unit(m, "b.service", NULL, &b) >= 0);
|
||||||
assert_se(manager_load_unit(m, "c.service", NULL, &c) == 0);
|
assert_se(manager_load_unit(m, "c.service", NULL, &c) >= 0);
|
||||||
manager_dump_units(m, stdout, "\t");
|
manager_dump_units(m, stdout, "\t");
|
||||||
|
|
||||||
printf("Test1: (Trivial)\n");
|
printf("Test1: (Trivial)\n");
|
||||||
|
@ -47,8 +47,8 @@ int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
printf("Load2:\n");
|
printf("Load2:\n");
|
||||||
manager_clear_jobs(m);
|
manager_clear_jobs(m);
|
||||||
assert_se(manager_load_unit(m, "d.service", NULL, &d) == 0);
|
assert_se(manager_load_unit(m, "d.service", NULL, &d) >= 0);
|
||||||
assert_se(manager_load_unit(m, "e.service", NULL, &e) == 0);
|
assert_se(manager_load_unit(m, "e.service", NULL, &e) >= 0);
|
||||||
manager_dump_units(m, stdout, "\t");
|
manager_dump_units(m, stdout, "\t");
|
||||||
|
|
||||||
printf("Test2: (Cyclic Order, Unfixable)\n");
|
printf("Test2: (Cyclic Order, Unfixable)\n");
|
||||||
|
@ -64,7 +64,7 @@ int main(int argc, char *argv[]) {
|
||||||
manager_dump_jobs(m, stdout, "\t");
|
manager_dump_jobs(m, stdout, "\t");
|
||||||
|
|
||||||
printf("Load3:\n");
|
printf("Load3:\n");
|
||||||
assert_se(manager_load_unit(m, "g.service", NULL, &g) == 0);
|
assert_se(manager_load_unit(m, "g.service", NULL, &g) >= 0);
|
||||||
manager_dump_units(m, stdout, "\t");
|
manager_dump_units(m, stdout, "\t");
|
||||||
|
|
||||||
printf("Test5: (Colliding transaction, fail)\n");
|
printf("Test5: (Colliding transaction, fail)\n");
|
||||||
|
@ -86,7 +86,7 @@ int main(int argc, char *argv[]) {
|
||||||
manager_dump_jobs(m, stdout, "\t");
|
manager_dump_jobs(m, stdout, "\t");
|
||||||
|
|
||||||
printf("Load4:\n");
|
printf("Load4:\n");
|
||||||
assert_se(manager_load_unit(m, "h.service", NULL, &h) == 0);
|
assert_se(manager_load_unit(m, "h.service", NULL, &h) >= 0);
|
||||||
manager_dump_units(m, stdout, "\t");
|
manager_dump_units(m, stdout, "\t");
|
||||||
|
|
||||||
printf("Test10: (Unmeargable job type of auxiliary job, fail)\n");
|
printf("Test10: (Unmeargable job type of auxiliary job, fail)\n");
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
[Meta]
|
[Unit]
|
||||||
Description=A
|
Description=A
|
||||||
Requires=b.service
|
Requires=b.service
|
||||||
Before=b.service
|
Before=b.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/bin/true
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
[Meta]
|
[Unit]
|
||||||
Description=B
|
Description=B
|
||||||
Wants=f.service
|
Wants=f.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/bin/true
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
[Meta]
|
[Unit]
|
||||||
Description=C
|
Description=C
|
||||||
Requires=a.service
|
Requires=a.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/bin/true
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
[Meta]
|
[Unit]
|
||||||
Description=D:Cyclic
|
Description=D:Cyclic
|
||||||
After=b.service
|
After=b.service
|
||||||
Before=a.service
|
Before=a.service
|
||||||
Requires=a.service
|
Requires=a.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/bin/true
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
[Meta]
|
[Unit]
|
||||||
Description=E:Cyclic
|
Description=E:Cyclic
|
||||||
After=b.service
|
After=b.service
|
||||||
Before=a.service
|
Before=a.service
|
||||||
Wants=a.service
|
Wants=a.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/bin/true
|
||||||
|
|
|
@ -1,2 +1,5 @@
|
||||||
[Meta]
|
[Unit]
|
||||||
Description=F
|
Description=F
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/bin/true
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
[Meta]
|
[Unit]
|
||||||
Description=G
|
Description=G
|
||||||
Conflicts=e.service
|
Conflicts=e.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/bin/true
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
[Meta]
|
[Unit]
|
||||||
Description=H
|
Description=H
|
||||||
Wants=g.service
|
Wants=g.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/bin/true
|
||||||
|
|
Loading…
Reference in a new issue