self._tree = tree
def iternodes(self):
- for module in self._tree.get_modules():
- if module.get_name() != 'module_testutils':
- yield module
+ return self._tree.get_modules()
def iteredges(self, module):
for dependency in module.get_dependencies():
- if dependency.get_other_module().get_name() != 'module_testutils':
+ if not dependency.is_test_only_dependency():
yield (dependency.get_other_module(), dependency)
def report_cycle(self, cycle, reporter):
self._othermodule = othermodule
self._includedfiles = []
self._cyclesuppression = None
+ self._is_test_only_dependency = True
def add_included_file(self, includedfile):
"""Add IncludedFile that is part of this dependency."""
assert includedfile.get_file().get_module() == self._othermodule
+ if not includedfile.get_including_file().is_test_file():
+ self._is_test_only_dependency = False
self._includedfiles.append(includedfile)
def set_cycle_suppression(self):
"""Return whether cycles containing this dependency are suppressed."""
return self._cyclesuppression is not None
+ def is_test_only_dependency(self):
+ """Return whether this dependency is only from test code."""
+ return self._is_test_only_dependency
+
def get_other_module(self):
"""Get module that this dependency is to."""
return self._othermodule
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+# Copyright (c) 2012,2013,2014,2015, by the GROMACS development team, led by
# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
# and including many others, as listed in the AUTHORS file in the
# top-level source directory and at http://www.gromacs.org.
elif self._edgetype == EdgeType.intramodule:
properties = ''
elif self._edgetype == EdgeType.test:
- properties = 'color=".33 .8 .8", style=dashed'
+ # TODO: Consider if only some test edges should be made non-constraints
+ properties = 'color=".33 .8 .8", style=dashed, constraint=no'
elif self._edgetype == EdgeType.libimpl:
properties = 'color=".66 .8 .8", style=dashed'
elif self._edgetype == EdgeType.pubimpl: