This is a configuration option to
SparseMatrix_from_coordinate_arrays_not_compacted that is never used. The
leading comment that is also removed in this commit seems to have been a
mistake. If refers to incorrect constants, repeats variables, and contains
numerous typographical errors.
change the always pass test to a simple Graphviz test
The test now uses the existing C API to render SVG from DOT source
code.
To support this, the commit also adds the necessary Graphviz libraries
and the dot_builtins to the common test library and the necessary
include directories to the macro creating the individual test
executables.
don't disable leak detection for ctest based tests
The current test does not trigger any memory leaks and we want to
ensure that we don't introduce any new leaks and fix existing leaks as
new tests encounter them.
We still want leak detection disabled when running pytest since those
tests still trigger many memory leaks.
This is accomplished by moving the disabling of the leak detection
into the test template and performing it after ctest has been
executed, but before pytest executes.
This commit also makes the temporary disabling of ODR violation
bacause of lib/ortho to be selectively for ctest only.
This adds a new test template that is based on the default test
template, but replaces the script section in order to be able to set
up and execute ctest without affecting tests on older OSes.
archive all shared libraries in Ubuntu 21.04 build for ctest
The Ubuntu 21.04 build is renamed and modified to be able to run
ctest, which uses the build products directly from where they reside
before installing them.
Adds archiving of all shared libraries produced directly by "cmake
--build". In the test stage, the test executables load them from those
directory locations since LD_LIBRARY_PATH is automatically set up to
contain them.
add optional ctest & catch2 based test infrastructure
This commit adds a CMakeLists.txt in the tests directory containing
the foundation for easily creating new test executables. It includes
creation of a shared library that the individual test executables can
be linked to, allowing them to be as small as possible.
The tests are optional and can be enabled with the CMake option
with_cxx_tests.
Also added is a first simple test case that always passes to show how
to create test cases.
fix incorrect reference counting of HTML-like strings in gvpack
When duplicating graph attributes, gvpack was calling agstrdup_html to construct
an HTML-like string and then agattr/agset to assign this to an attribute. It did
not anticipate that *both* of these increment the reference count for the string
that has been interned in the graph’s dictionary. The result was a reference
count of 2 for a new HTML-like string, despite only 1 reference to the string
existing.
This was not directly visible to users (hence no changelog entry for this
commit) and the extra reference counts are disposed of when the graph itself is
destroyed. However, this persistent off-by-one issue internally confused some
debugging and potentially retained memory longer than was necessary. The issue
was visible with the following patch applied:
gv2gxl: in GXL output, indicate when a label originated as an HTML like label
When translating Dot to GXL, labels come out as strings. Input something like:
`label="foo"` and the GXL output is something like
`<attr name="label"><string>foo</string></attr>`. This translation is fine and
works well, until you start using HTML like labels.
Graphviz allows `<` and `>` as delimiters to indicate your label string contains
HTML that should be parsed. When you try to use this feature in combination with
gv2gxl, you get a lossy translation. E.g. the labels `label="foo"` and
`label=<foo>` come out identically in GXL.
This commit makes use of the GXL ‘kind’ field on attributes to note that the
source was an HTML like label. If you translate the two labels from above, you
will now get:
This is a partial fix for #517. This makes the translation to GXL no longer
lossy. The other half of this is recognizing the ‘kind’ field during gxl2gv
translation and preserving it on the way back.
These functions are used extensively within Graphviz. This change tells the
compiler to optimize for the case when allocation succeeds. This may slow the
case when allocation fails, though we do not care about this case as Graphviz is
about to exit with failure in this scenario.
Nothing in the build system(s) define this. A lot of this also looks broken.
For example, the GVIEWER alternative of the stress_model function sets up an
argv whose first string entry is not terminated.
The last use of gvfwrite was removed in 6e818420cf02ad01d9c976b69d49fb794a661f5e. But more problematically, this
function seems incorrect. By ignoring its size argument it will generate
surprising results if ever called with a non-1 size. Closes #1846.
While this does not look like a win in terms of conciseness, I think the trade
off is worth it for stronger typing within this script. It is hard to test this
script without actually running a deployment, so we heavily rely on Pylint to
validate what it is doing. Giving Pylint some more hints as to what is going on
seems like a good idea.
This test compares the rendering of a graph using the Courier font against
reference examples. However the rendering of Courier is not stable across
operating system releases. At present, this test is spuriously failing due to a
macOS upgrade. But in principle, an upgrade of any platform can break it. To
avoid testing this unstable behavior, we remove this test.
Mark Hansen [Fri, 2 Jul 2021 07:46:49 +0000 (07:46 +0000)]
Update README.md -- queries go to Graphviz forum
Should keep bug tracker full of bugs, and give people with other queries a better chance at getting them answered (there are more people on the forum).
The preceding return statement ensures none of the latter part of the function
is reachable. This was introduced in 05674ae147c14ec4ec74b2b6771e04e0c82209b8
and seemingly never noticed.
This commit also drops now-unused variables, as well as the static qualifier
from sum. It is not clear to me what the purpose of making sum static was. It is
a small struct and both its fields are overwritten immediately when entering
this function, so there is no value to retaining it across calls or
BSS-allocating it.