# This file is part of GNU pies testsuite. -*- Autotest -*- # Copyright (C) 2019 Sergey Poznyakoff # # GNU pies is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. # # GNU pies is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU pies. If not, see . AT_SETUP([Detecting cyclic dependencies]) AT_CHECK([ PIES_XFAIL_CHECK # The following matrices describe the test.conf configuration file below. # # Dependency matrix: # 0 1 2 3 4 5 6 7 # 0 X X # 1 X # 2 X # 3 X # 4 X # 5 # 6 X # 7 # # Transitive closure: # 0 1 2 3 4 5 6 7 # 0 X X X X X # 1 X # 2 X X X X X # 3 X X X X X # 4 X X X X X # 5 # 6 X # 7 # # Legend: # 0: a # 1: b # 2: c # 3: d # 4: e # 5: f # 6: g # 7: h AT_DATA([test.conf], [component a { command "a"; prerequisites (b,d); } component b { command "b"; prerequisites (b); } component c { command "c"; prerequisites (e); } component d { command "d"; prerequisites (c); } component e { command "e"; prerequisites (a); } component f { command "f"; } component g { command "g"; prerequisites (h); } component h { command "h"; } ]) pies --config-file test.conf --dump-depmap | trimws ], [0], [Dependency map: 0 1 2 0 1 X 2 Legend: 0: f 1: g 2: h ], [pies: component a depends on itself pies: a -> d -> c -> e -> a pies: component b depends on itself pies: b -> b ]) AT_CLEANUP