]> granicus.if.org Git - graphviz/log
graphviz
4 years agoCorrect package version in CMake exe installer
Magnus Jacobsson [Tue, 11 Aug 2020 07:36:59 +0000 (09:36 +0200)]
Correct package version in CMake exe installer

Fixes https://gitlab.com/graphviz/graphviz/-/issues/1791

4 years agofix edge attribute order confusion
Matthew Fernandez [Wed, 5 Aug 2020 00:47:15 +0000 (17:47 -0700)]
fix edge attribute order confusion

Certain edge attributes are constructed in advance of their being seen in the
input because Graphviz knows it may need default values for them. Later, if seen
in the input, the values of these attributes are updated.

This all works fine unless the order in which these initially-defaulted edge
attributes appear in the input does not match the order in which the default
versions are constructed by Graphviz internally. In this case, the order in
which the attributes are seen in the input is used to construct a dictionary of
them, but the original copies are used to index into attribute values.

In the particular test case added in this commit,

  digraph {
    { rank=same; n1; n2 }

    n2 -> n1 [ headport=s, arrowhead=normal ]
  }

arrowhead was constructed with symbol ID 0 and headport was constructed with
symbol ID 1. But then the later parsing of these attributes resulted in a
dictionary where the headport value was in ID 0 and the arrowhead value was in
ID 1. Indexing into this dictionary with the initially constructed E_arrowhead
resulted in incorrectly returning the value "s". This caused a spurious error
'Arrow type "s" unknown' as well as incorrect graph output.

Fixes #1444. Note that this may just be one of several issues resulting from
using these initially constructed E_* symbols.

4 years agoMerge branch 'use-preinstalled-grep-in-ci' into 'master'
Magnus Jacobsson [Mon, 10 Aug 2020 07:42:20 +0000 (07:42 +0000)]
Merge branch 'use-preinstalled-grep-in-ci' into 'master'

Use preinstalled grep instead of installing it in CI

See merge request graphviz/graphviz!1512

4 years agoUse preinstalled grep instead of installing it in CI
Magnus Jacobsson [Sun, 9 Aug 2020 20:28:13 +0000 (22:28 +0200)]
Use preinstalled grep instead of installing it in CI

Final step that fixes
https://gitlab.com/graphviz/graphviz/-/issues/1759.

4 years agoMerge branch 'use-preinstalled-diffutils-in-ci' into 'master'
Magnus Jacobsson [Mon, 10 Aug 2020 07:13:49 +0000 (07:13 +0000)]
Merge branch 'use-preinstalled-diffutils-in-ci' into 'master'

Use preinstalled diffutils instead of installing it in CI

See merge request graphviz/graphviz!1511

4 years agoUse preinstalled diffutils instead of installing it in CI
Magnus Jacobsson [Sun, 9 Aug 2020 20:07:46 +0000 (22:07 +0200)]
Use preinstalled diffutils instead of installing it in CI

One more step towards https://gitlab.com/graphviz/graphviz/-/issues/1759.

4 years agoMerge branch 'use-preinstalled-pytest-in-ci' into 'master'
Magnus Jacobsson [Mon, 10 Aug 2020 06:44:48 +0000 (06:44 +0000)]
Merge branch 'use-preinstalled-pytest-in-ci' into 'master'

Use preinstalled pytest instead of installing it in CI

See merge request graphviz/graphviz!1510

4 years agoUse preinstalled pytest instead of installing it in CI
Magnus Jacobsson [Sun, 9 Aug 2020 19:38:13 +0000 (21:38 +0200)]
Use preinstalled pytest instead of installing it in CI

One more step towards https://gitlab.com/graphviz/graphviz/-/issues/1759.

4 years agoMerge branch 'use-preinstalled-python3-in-ci' into 'master'
Magnus Jacobsson [Sun, 9 Aug 2020 19:03:10 +0000 (19:03 +0000)]
Merge branch 'use-preinstalled-python3-in-ci' into 'master'

Use preinstalled Python 3 instead of installing it in CI

See merge request graphviz/graphviz!1507

4 years agoUse preinstalled Python 3 instead of installing it in CI
Magnus Jacobsson [Sun, 9 Aug 2020 13:39:51 +0000 (15:39 +0200)]
Use preinstalled Python 3 instead of installing it in CI

One more step towards https://gitlab.com/graphviz/graphviz/-/issues/1759.

4 years agoMerge branch 'use-preinstalled-perl-in-ci' into 'master'
Magnus Jacobsson [Sun, 9 Aug 2020 18:13:39 +0000 (18:13 +0000)]
Merge branch 'use-preinstalled-perl-in-ci' into 'master'

Use preinstalled perl in CI

See merge request graphviz/graphviz!1502

4 years agofix segfault with large edge weights
Matthew Fernandez [Sun, 2 Aug 2020 16:37:49 +0000 (09:37 -0700)]
fix segfault with large edge weights

When passed a large edge weight, e.g. 1073741824, an integer overflow would
occur when calculating virtual weights. This would go on to cause a segfault as
calculations were increasingly thrown off by negative values.

This change detects when an overflow will occur and exits. Calling exit() from
within a deeply nested library function like this is not good practice, but we
don't have a better alternative right now. The call chain involves gvLayout()
whose interface to the plugins inherently has no way of reporting failure.

Fixes #1783.

4 years agofix typo in clustg
Matthew Fernandez [Tue, 4 Aug 2020 00:57:15 +0000 (17:57 -0700)]
fix typo in clustg

Fixes #1781.

4 years agoUse preinstalled perl instead of installing it in CI
Magnus Jacobsson [Fri, 7 Aug 2020 09:17:46 +0000 (11:17 +0200)]
Use preinstalled perl instead of installing it in CI

One more step towards https://gitlab.com/graphviz/graphviz/-/issues/1759.

4 years agoMerge branch 'adapt-to-moved-nsis' into 'master'
Magnus Jacobsson [Sun, 9 Aug 2020 10:17:21 +0000 (10:17 +0000)]
Merge branch 'adapt-to-moved-nsis' into 'master'

Adapt to moved NSIS install directory

See merge request graphviz/graphviz!1506

4 years agoAdapt to moved NSIS install directory
Magnus Jacobsson [Sun, 9 Aug 2020 09:16:53 +0000 (11:16 +0200)]
Adapt to moved NSIS install directory

4 years agoMerge branch 'use-preinstalled-nsis' into 'master'
Magnus Jacobsson [Sun, 9 Aug 2020 05:30:44 +0000 (05:30 +0000)]
Merge branch 'use-preinstalled-nsis' into 'master'

Use preinstalled nsis instead of installing it in CI

See merge request graphviz/graphviz!1505

4 years agoUse preinstalled nsis instead of installing it in CI
Magnus Jacobsson [Sun, 9 Aug 2020 04:52:51 +0000 (06:52 +0200)]
Use preinstalled nsis instead of installing it in CI

4 years agoMerge branch 'port-rtest.sh-to-python' into 'master'
Magnus Jacobsson [Sat, 8 Aug 2020 05:22:53 +0000 (05:22 +0000)]
Merge branch 'port-rtest.sh-to-python' into 'master'

Port rtest.sh to Python and enable rtest on Windows

Closes #1779

See merge request graphviz/graphviz!1496

4 years agoassign Cgraph IDs linearly
Matthew Fernandez [Sat, 1 Aug 2020 19:33:46 +0000 (12:33 -0700)]
assign Cgraph IDs linearly

Previously Cgraph only assigned odd IDs from the internal counter, because even
IDs were reserved for pointers derived from agstrdup. Now that we no longer use
pointers as IDs there is nothing special about an ID being even or odd.

4 years agofix: assign anonymous IDs to named entities
Matthew Fernandez [Sat, 1 Aug 2020 19:29:28 +0000 (12:29 -0700)]
fix: assign anonymous IDs to named entities

Instead of using string pointers as IDs, we now assign the IDs for named
entities exactly the same way we assign them for anonymous identities. This
works because we first check the internal map before creating any new ID, so
processing the same name twice will result in the same ID as before.

This fixes #1767. Now clusters within a graph are consistently processed in the
order in which they appear in the input file, rather than an order dependent on
pointers given out by the allocator.

4 years agostop relying on pointers-as-IDs to retrieve strings
Matthew Fernandez [Sat, 1 Aug 2020 19:05:08 +0000 (12:05 -0700)]
stop relying on pointers-as-IDs to retrieve strings

Now that strings are always stored in the internal map, they can be retrieved
from there instead of relying on the assumption that the ID aliases the name of
an entity. Related to #1767.

4 years agoadd non-local names to Cgraph internal map as well as local names
Matthew Fernandez [Sat, 1 Aug 2020 18:56:23 +0000 (11:56 -0700)]
add non-local names to Cgraph internal map as well as local names

This allows the internal name->id map to track *all* names. Related to #1767.

4 years agocheck internal map for IDs prior to creating one from a string
Matthew Fernandez [Sat, 1 Aug 2020 19:19:27 +0000 (12:19 -0700)]
check internal map for IDs prior to creating one from a string

This has no effect currently because the case that preceded this check was for
non-local names, that are not inserted into the internal map anyway. However, an
upcoming change will alter this behavior, so we want to make sure that if a name
already has a known ID it is found first. Related to #1767.

4 years agofix: take a copy of font name when caching fonts in Pango plugin
Matthew Fernandez [Sat, 1 Aug 2020 16:37:20 +0000 (09:37 -0700)]
fix: take a copy of font name when caching fonts in Pango plugin

The Pango plugin caches the last used font to save an expensive reconstruction
process each time it runs. To determine whether the cached font is eligible for
reuse, the name and size of the requested font are checked against the cache
entry. However the name of the cached font was only stored as a pointer to the
original name. The cached entry could outlive the original font, which could be
freed before a next call into the plugin. As a result, the plugin would perform
a strcmp using a stale freed pointer.

To address this we simply take a copy of the font name's string data instead of
just a pointer to it. There is no need to copy any of the other cached fields as
they are only accessed if the font name check finds the entry to be valid.

Related to #1767.

4 years agofix: suppress Xlib finalization if initialization failed
Matthew Fernandez [Sun, 2 Aug 2020 00:13:04 +0000 (17:13 -0700)]
fix: suppress Xlib finalization if initialization failed

The initialization function of a device plugin has no way of reporting failure
to its called. So an attempt to use the x11 back end calls xlib_finalize() even
if xlib_initialize() failed. To make this safe, we set a flag if initialization
succeeds and make xlib_finalize() a no-op if the flag is not set. Fixes #1776.

4 years agoMerge branch 'remove-unnecessary-cmake-install-in-ci' into 'master'
Magnus Jacobsson [Fri, 7 Aug 2020 17:50:21 +0000 (17:50 +0000)]
Merge branch 'remove-unnecessary-cmake-install-in-ci' into 'master'

Use existing CMake on GitLab Windows runner instead of installing it

See merge request graphviz/graphviz!1498

4 years agofix: cast overflow with large font sizes in Pango plugin
Matthew Fernandez [Sat, 1 Aug 2020 23:24:58 +0000 (16:24 -0700)]
fix: cast overflow with large font sizes in Pango plugin

When using an abnormally large font size, computing the Pango units for the size
would overflow. This resulted in an assertion failure in Pango when seeing a
negative size value. This issue was found by Google Autofuzz project. This
fixes #1314.

4 years agoremove now unnecessary detection of str[n]casecmp
Matthew Fernandez [Sun, 2 Aug 2020 02:03:16 +0000 (19:03 -0700)]
remove now unnecessary detection of str[n]casecmp

Related to #1775.

4 years agoremove empty compat.h header
Matthew Fernandez [Sun, 2 Aug 2020 01:53:28 +0000 (18:53 -0700)]
remove empty compat.h header

This header was not doing anything useful.

4 years agoreplace in-tree str[n]casecmp implementations with libc
Matthew Fernandez [Sun, 2 Aug 2020 01:42:17 +0000 (18:42 -0700)]
replace in-tree str[n]casecmp implementations with libc

Instead of carrying multiple implementations of these functions in the Graphviz
tree, we now call the built-in support on the current platform. Closes #1775.

4 years agoadd an abstraction for strcasecmp
Matthew Fernandez [Sun, 2 Aug 2020 01:13:13 +0000 (18:13 -0700)]
add an abstraction for strcasecmp

Related to #1775.

4 years agoUse existing cmake instead of installing it
Magnus Jacobsson [Wed, 5 Aug 2020 14:42:10 +0000 (16:42 +0200)]
Use existing cmake instead of installing it

The first step towards https://gitlab.com/graphviz/graphviz/-/issues/1759.

4 years agoMerge branch 'use-windows-dependencies-submodules-from-the-graphviz-gitlab-group...
Magnus Jacobsson [Fri, 7 Aug 2020 09:10:16 +0000 (09:10 +0000)]
Merge branch 'use-windows-dependencies-submodules-from-the-graphviz-gitlab-group' into 'master'

Change to get windows/dependencies submodules from graphviz

See merge request graphviz/graphviz!1500

4 years agoMerge branch 'add-missing-changelog-entry-for-fixed-win-msbuild-version' into 'master'
Magnus Jacobsson [Fri, 7 Aug 2020 05:11:45 +0000 (05:11 +0000)]
Merge branch 'add-missing-changelog-entry-for-fixed-win-msbuild-version' into 'master'

Add missing CHANGELOG entry for fixed version in MSBuilds

See merge request graphviz/graphviz!1499

4 years agoSimplify pytests that call rtest.py
Magnus Jacobsson [Thu, 6 Aug 2020 15:16:44 +0000 (17:16 +0200)]
Simplify pytests that call rtest.py

4 years agomake sfio #includes unambiguous
Matthew Fernandez [Sat, 1 Aug 2020 00:51:24 +0000 (17:51 -0700)]
make sfio #includes unambiguous

This change makes the #includes of lib/sfio headers unambiguous within the
lib/sfio C sources. The upcoming plan is to also make the header #includes and
any of lib/sfio's dependents also unambiguous this way. Related to #1785.

4 years agomake an include of vthread.h relative
Matthew Fernandez [Sat, 1 Aug 2020 00:23:40 +0000 (17:23 -0700)]
make an include of vthread.h relative

This is a step along the way towards less ambiguous #includes. Eventually this
should become a more clearly qualified #include like <sfio/vthread.h>. Related
to #1785.

4 years agoremove lib/sfio include directory addition of lib/vmalloc in msbuild
Matthew Fernandez [Sat, 1 Aug 2020 00:22:29 +0000 (17:22 -0700)]
remove lib/sfio include directory addition of lib/vmalloc in msbuild

Sfio does not appear to rely on vmalloc.

4 years agoremove lib/sfio include directory addition of lib/ast in autotools build
Matthew Fernandez [Sat, 1 Aug 2020 00:21:07 +0000 (17:21 -0700)]
remove lib/sfio include directory addition of lib/ast in autotools build

Sfio does not appear to rely on any headers from lib/ast.

4 years agoChange to get windows/dependencies submodules from graphviz
Magnus Jacobsson [Thu, 6 Aug 2020 11:08:51 +0000 (13:08 +0200)]
Change to get windows/dependencies submodules from graphviz

The windows/dependencies repositories are now hosted as subprojects in
the GitLab Graphviz group:

* https://gitlab.com/graphviz/graphviz-build-utilities
* https://gitlab.com/graphviz/graphviz-windows-dependencies

4 years agoAdd CHANGELOG entry for fixed version in MSBuilds
Magnus Jacobsson [Thu, 6 Aug 2020 09:55:58 +0000 (11:55 +0200)]
Add CHANGELOG entry for fixed version in MSBuilds

4 years agoUpdate nshare with rtest.py -g using Windows MSBuild Release 2.44.1
Magnus Jacobsson [Wed, 5 Aug 2020 09:31:21 +0000 (11:31 +0200)]
Update nshare with rtest.py -g using Windows MSBuild Release 2.44.1

4 years agoAdd temporary skip of rtests using ps shapefile on Windows
Magnus Jacobsson [Wed, 5 Aug 2020 05:32:42 +0000 (07:32 +0200)]
Add temporary skip of rtests using ps shapefile on Windows

Fails because of https://gitlab.com/graphviz/graphviz/-/issues/1790

4 years agoAdd temporary skip of ps & gv diff on Windows for specific rtests
Magnus Jacobsson [Tue, 4 Aug 2020 11:40:29 +0000 (13:40 +0200)]
Add temporary skip of ps & gv diff on Windows for specific rtests

May fail because of https://gitlab.com/graphviz/graphviz/-/issues/1789

4 years agoDon't treat Windows as an unrecognized system
Magnus Jacobsson [Mon, 3 Aug 2020 06:01:25 +0000 (08:01 +0200)]
Don't treat Windows as an unrecognized system

4 years agoInstall diffutils in Windows CI
Magnus Jacobsson [Sun, 2 Aug 2020 10:02:31 +0000 (12:02 +0200)]
Install diffutils in Windows CI

4 years agoAdd temporary skip of PNG diff for Windows CMake rtest
Magnus Jacobsson [Mon, 3 Aug 2020 09:50:13 +0000 (11:50 +0200)]
Add temporary skip of PNG diff for Windows CMake rtest

Fails because of https://gitlab.com/graphviz/graphviz/-/issues/1788

4 years agoAdd temporary skip of rtests using shapefile for Windows MSBuild Debug
Magnus Jacobsson [Sun, 2 Aug 2020 07:17:02 +0000 (09:17 +0200)]
Add temporary skip of rtests using shapefile for Windows MSBuild Debug

Fails because of https://gitlab.com/graphviz/graphviz/-/issues/1787

4 years agoAdd temporary skip of rtests using overlap=false for Windows MSBuild
Magnus Jacobsson [Sat, 1 Aug 2020 16:20:40 +0000 (18:20 +0200)]
Add temporary skip of rtests using overlap=false for Windows MSBuild

Fails because of https://gitlab.com/graphviz/graphviz/-/issues/1269

4 years agoAdd temporary skip of format png:gd for Windows CMake rtest
Magnus Jacobsson [Fri, 31 Jul 2020 22:03:05 +0000 (00:03 +0200)]
Add temporary skip of format png:gd for Windows CMake rtest

Fails because of https://gitlab.com/graphviz/graphviz/-/issues/1786

4 years agoAdd new rtest.sh that calls rtest.py
Magnus Jacobsson [Mon, 3 Aug 2020 05:13:52 +0000 (07:13 +0200)]
Add new rtest.sh that calls rtest.py

4 years agoRun new rtest.py script instead of rtest.sh
Magnus Jacobsson [Fri, 31 Jul 2020 15:11:38 +0000 (17:11 +0200)]
Run new rtest.py script instead of rtest.sh

4 years agoPort rtest.sh ksh code to Python in rtest.py
Magnus Jacobsson [Thu, 30 Jul 2020 20:31:04 +0000 (22:31 +0200)]
Port rtest.sh ksh code to Python in rtest.py

Resolves https://gitlab.com/graphviz/graphviz/-/issues/1779

The reason this is a separate commit from the previoust commit, which
contains the renaming of the file, is to trick git to show the changes
as a one-file diff regardless of the similarity index, rather than one
deleted and one added file. This makes it easier to compare the ksh
code to the Python code.

4 years agoRename rtest.sh to rtest.py
Magnus Jacobsson [Mon, 3 Aug 2020 10:48:05 +0000 (12:48 +0200)]
Rename rtest.sh to rtest.py

The reason this is a separate commit from the next commit, which
contains the changed content, is to trick git to show the changes as a
one-file diff regardless of the similarity index, rather than one
deleted and one added file. This makes it easier to compare the ksh
code to the Python code.

4 years agoadd GVPR Vim syntax
Matthew Fernandez [Wed, 29 Jul 2020 02:05:50 +0000 (19:05 -0700)]
add GVPR Vim syntax

Closes #1762.

4 years agocompiler annotations to explain calling convention of agerr and friends
Matthew Fernandez [Wed, 29 Jul 2020 02:38:55 +0000 (19:38 -0700)]
compiler annotations to explain calling convention of agerr and friends

This change teaches suitably enlightened compilers (Clang and GCC) more about
how these functions are intended to be called. When told to detect misuse of
format strings (`-Wformat`), they can now detect incorrect calls like that fixed
in 31ef5a3c31214d77137e4b36603a2a97576e851e.

4 years agoremove unnecessary temporary buffer to construct error message
Matthew Fernandez [Thu, 30 Jul 2020 00:11:13 +0000 (17:11 -0700)]
remove unnecessary temporary buffer to construct error message

The motivation for this change is to avoid passing a variable to agerr which
triggers so -Wformat-security errors after some upcoming changes. However, it's
nice to be able to just simplify this code anyway.

4 years agoremove exception-style control flow in lib/rbtree
Matthew Fernandez [Sun, 26 Jul 2020 21:01:27 +0000 (14:01 -0700)]
remove exception-style control flow in lib/rbtree

Fixes #1742.

4 years agoexpose StackDestroy function in stack.h
Matthew Fernandez [Sun, 26 Jul 2020 20:37:43 +0000 (13:37 -0700)]
expose StackDestroy function in stack.h

4 years agoremove some dead code
Matthew Fernandez [Sun, 26 Jul 2020 20:31:44 +0000 (13:31 -0700)]
remove some dead code

4 years agoremove legacy RBTree comment
Matthew Fernandez [Sun, 26 Jul 2020 20:28:07 +0000 (13:28 -0700)]
remove legacy RBTree comment

The assertions depending on this macro were refactored in
40ef32e7c7adca0a1217135d8d3b1c582e75787e.

4 years agoremove compiled RBTree test binary
Matthew Fernandez [Sun, 26 Jul 2020 20:22:48 +0000 (13:22 -0700)]
remove compiled RBTree test binary

We can rebuild this using makefile.txt in lib/rbtree if necessary. The existing
committed binary was out of date.

4 years agode-duplicate gvc.def
Matthew Fernandez [Sun, 26 Jul 2020 21:16:39 +0000 (14:16 -0700)]
de-duplicate gvc.def

Closes #1761.

4 years agoMerge branch 'drive-all-tests-from-pytest' into 'master'
Magnus Jacobsson [Fri, 31 Jul 2020 22:34:22 +0000 (22:34 +0000)]
Merge branch 'drive-all-tests-from-pytest' into 'master'

Drive all tests from pytest

Closes #1772

See merge request graphviz/graphviz!1483

4 years agoMerge branch 'centralized-version-generation' into 'master'
Magnus Jacobsson [Fri, 31 Jul 2020 17:21:14 +0000 (17:21 +0000)]
Merge branch 'centralized-version-generation' into 'master'

Single source of truth of Grahviz version for all build systems: autotools, CMake & MSbuild

Closes #1745

See merge request graphviz/graphviz!1476

4 years agomissing changelog entry for the previous commit
Matthew Fernandez [Fri, 31 Jul 2020 14:42:16 +0000 (07:42 -0700)]
missing changelog entry for the previous commit

4 years agofix: out-of-bounds write on invalid label
Matthew Fernandez [Sun, 26 Jul 2020 02:31:01 +0000 (19:31 -0700)]
fix: out-of-bounds write on invalid label

When the label for a node cannot be parsed (due to it being malformed), it falls
back on the symbol name of the node itself. I.e. the default label the node
would have had if it had no label attribute at all. However, this is applied by
dynamically altering the node's label to "\N", a shortcut for the symbol name of
the node. All of this is fine, however if the hand written label itself is
shorter than the literal string "\N", not enough memory would have been
allocated to write "\N" into the label text.

Here we account for the possibility of error during label parsing, and assume
that the label text may need to be overwritten with "\N" after the fact. Fixes
issue #1700.

4 years agoAdd temporary skip of some gvpr example tests
Magnus Jacobsson [Thu, 30 Jul 2020 15:37:44 +0000 (17:37 +0200)]
Add temporary skip of some gvpr example tests

Hangs because of https://gitlab.com/graphviz/graphviz/-/issues/1784

4 years agoCorrect 32-bit Windows check in large graphs test
Magnus Jacobsson [Thu, 30 Jul 2020 06:16:45 +0000 (08:16 +0200)]
Correct 32-bit Windows check in large graphs test

The previous check was true also for 64-bit Windows since in this case
"win32" stands for the Windows API. For details, see:

* https://docs.microsoft.com/en-us/windows/win32/apiindex/windows-api-list
* https://docs.python.org/3/library/sys.html#sys.platform
* https://softwareengineering.stackexchange.com/questions/356464/why-does-software-use-the-win32-name

Note that the new check does not actually check that the Windows OS is
32 bit, but rather that the Python interpreter is. This means that the
test will be skipped in the unlikely event that a 32-bit Python
interpreter is run on a 64-bit Windows OS. This is *not* the case in
our current CI pipeline on gitlab.com. The test does run there.

To check the Windows OS itself seems to be very complicated according
to
https://stackoverflow.com/questions/2208828/detect-64bit-os-windows-in-python/12578715
and none of the solutions worked for me.

Note also that the check does *not* check whether Graphviz has been
compiled for 32-bit or 64-bit which also seems ok according to the
results from our current CI pipeline.

More background can be found at:

* https://gitlab.com/graphviz/graphviz/-/merge_requests/1345
* https://gitlab.com/graphviz/graphviz/-/issues/1710
* https://gitlab.com/graphviz/graphviz/-/merge_requests/1370
* https://gitlab.com/graphviz/graphviz/-/issues/1698

4 years agoAdd workaround for gvpr not supporting abs path on Windows
Magnus Jacobsson [Tue, 28 Jul 2020 12:20:22 +0000 (14:20 +0200)]
Add workaround for gvpr not supporting abs path on Windows

https://gitlab.com/graphviz/graphviz/-/issues/1780

4 years agoAdd temporary skip of examples test for MSBuild builds on Windows
Magnus Jacobsson [Mon, 27 Jul 2020 21:07:25 +0000 (23:07 +0200)]
Add temporary skip of examples test for MSBuild builds on Windows

Fails because of https://gitlab.com/graphviz/graphviz/-/issues/1777.

4 years agoRun tests in CI also for CMake Debug builds on Windows
Magnus Jacobsson [Mon, 27 Jul 2020 16:24:50 +0000 (18:24 +0200)]
Run tests in CI also for CMake Debug builds on Windows

4 years agoRun all tests under rtest also for MSBuild builds on Windows
Magnus Jacobsson [Mon, 27 Jul 2020 16:05:12 +0000 (18:05 +0200)]
Run all tests under rtest also for MSBuild builds on Windows

4 years agoRun all tests under rtest also for CMake builds on Windows
Magnus Jacobsson [Mon, 27 Jul 2020 16:04:54 +0000 (18:04 +0200)]
Run all tests under rtest also for CMake builds on Windows

4 years agoAdd temporary skip of gvpr test for CMake builds on Windows
Magnus Jacobsson [Mon, 27 Jul 2020 15:38:53 +0000 (17:38 +0200)]
Add temporary skip of gvpr test for CMake builds on Windows

Fails because of https://gitlab.com/graphviz/graphviz/-/issues/1753.

4 years agoAdd temporary skip of test using ksh script rtest.sh on Windows
Magnus Jacobsson [Mon, 27 Jul 2020 15:14:34 +0000 (17:14 +0200)]
Add temporary skip of test using ksh script rtest.sh on Windows

Cannot be run until https://gitlab.com/graphviz/graphviz/-/issues/1779
is implemented.

4 years agoAdd temporary skip of installation test for MSBuild builds on Windows
Magnus Jacobsson [Mon, 27 Jul 2020 14:13:19 +0000 (16:13 +0200)]
Add temporary skip of installation test for MSBuild builds on Windows

Fails because of https://gitlab.com/graphviz/graphviz/-/issues/1745.

4 years agoMake test_installation.py self-contained to run also on Windows
Magnus Jacobsson [Mon, 27 Jul 2020 10:46:52 +0000 (12:46 +0200)]
Make test_installation.py self-contained to run also on Windows

Also removed the now obsolete check_installation.sh bash script.

4 years agoRun all tests under tests in CI also for CMake builds in Windows
Magnus Jacobsson [Sun, 26 Jul 2020 22:20:23 +0000 (00:20 +0200)]
Run all tests under tests in CI also for CMake builds in Windows

4 years agoRun all tests under tests in CI for MSBuild builds on Windows
Magnus Jacobsson [Sun, 26 Jul 2020 22:19:39 +0000 (00:19 +0200)]
Run all tests under tests in CI for MSBuild builds on Windows

4 years agoAdd shim for python3.exe on Windows
Magnus Jacobsson [Thu, 23 Jul 2020 21:13:51 +0000 (23:13 +0200)]
Add shim for python3.exe on Windows

Chocolatey doesn't install python3 as python3.exe, only as python.exe.

4 years agoReplace regression_tests.ps1 with direct call to pytest
Magnus Jacobsson [Sat, 25 Jul 2020 21:40:20 +0000 (23:40 +0200)]
Replace regression_tests.ps1 with direct call to pytest

4 years agoReplace call to ctest with call to pytest tests\regression_tests\shapes
Magnus Jacobsson [Sat, 25 Jul 2020 21:33:51 +0000 (23:33 +0200)]
Replace call to ctest with call to pytest tests\regression_tests\shapes

which was the only test actually executed by ctest.

4 years agoConvert test_large_graphs.py to pytest
Magnus Jacobsson [Sat, 25 Jul 2020 21:24:15 +0000 (23:24 +0200)]
Convert test_large_graphs.py to pytest

4 years agoEnable JUnit test reports in CI also for CMake builds on Windows
Magnus Jacobsson [Sat, 25 Jul 2020 21:09:40 +0000 (23:09 +0200)]
Enable JUnit test reports in CI also for CMake builds on Windows

4 years agoRefactor out pytest from test.sh and rename to install-packages.sh
Magnus Jacobsson [Sat, 25 Jul 2020 21:03:02 +0000 (23:03 +0200)]
Refactor out pytest from test.sh and rename to install-packages.sh

4 years agoRemove accidentally left-over debug dir:
Magnus Jacobsson [Sat, 25 Jul 2020 21:00:51 +0000 (23:00 +0200)]
Remove accidentally left-over debug dir:

4 years agoSet up VCTools also for MSBuild tests
Magnus Jacobsson [Tue, 28 Jul 2020 15:51:39 +0000 (17:51 +0200)]
Set up VCTools also for MSBuild tests

The solution comes from https://stackoverflow.com/a/2128350/3122101

4 years agoCorrect VS compiler option in vmalloc test
Magnus Jacobsson [Tue, 28 Jul 2020 15:21:17 +0000 (17:21 +0200)]
Correct VS compiler option in vmalloc test

4 years agoMerge branch '60ddf7c4-ae97-4594-be26-aaf88a47d10e' into 'master'
Matthew Fernandez [Wed, 29 Jul 2020 13:51:11 +0000 (13:51 +0000)]
Merge branch '60ddf7c4-ae97-4594-be26-aaf88a47d10e' into 'master'

fix: zero allocations performed via ALLOCATE

See merge request graphviz/graphviz!1484

4 years agoMerge branch 'winbuild' into 'master'
Mark Hansen [Wed, 29 Jul 2020 11:10:40 +0000 (11:10 +0000)]
Merge branch 'winbuild' into 'master'

Redirect winbuild.html to graphviz.org/doc/winbuild.html

See merge request graphviz/graphviz!1475

4 years agoadd CI tests that GVPR lib is parseable
Matthew Fernandez [Sat, 18 Jul 2020 23:23:14 +0000 (16:23 -0700)]
add CI tests that GVPR lib is parseable

This does not test addedges, binduce, or histogram that require a command line
argument.

4 years agofix: zero allocations performed via ALLOCATE
Matthew Fernandez [Wed, 29 Jul 2020 00:43:58 +0000 (17:43 -0700)]
fix: zero allocations performed via ALLOCATE

8d33fa030d308e6f5a4572a5b25bde4508757c31 refactored the site of a call to
vmnewof to remove an assumption that the returned allocation was zeroed. However
I failed to notice that the call to ALLOCATE (which eventually invokes vmnewof)
in exnewnode also relied on this assumption. This remained a latent issue until
84b2983edf458098bb6233368904265c92da4e65 whose changes meant the region returned
by vmnewof was no longer zeroed. The issue (now an active bug) still went
unnoticed until ea791d46aa1d0f15c483d424fdddabf8f3b61cb0 was merged, which
contained a test that ran `gvpr -f cmd/gvpr/lib/color </dev/null` that triggered
a read through a bad pointer that should have been zeroed during these
allocations.

To fix this, we conservatively zero the result of all calls to ALLOCATE,
ensuring the assumptions these calls may have previously had is now restored.

4 years agoUpdate DEVELOPERS.md after fix of automatic MSBuild versioning
Magnus Jacobsson [Sat, 25 Jul 2020 19:24:30 +0000 (21:24 +0200)]
Update DEVELOPERS.md after fix of automatic MSBuild versioning

4 years agoReplace hard-coded MSBuild version with generated
Magnus Jacobsson [Sat, 25 Jul 2020 17:34:49 +0000 (19:34 +0200)]
Replace hard-coded MSBuild version with generated

Fixes https://gitlab.com/graphviz/graphviz/-/issues/1745

4 years agoRemove windows/include/builddate.h that is now generated
Magnus Jacobsson [Sat, 25 Jul 2020 17:15:00 +0000 (19:15 +0200)]
Remove windows/include/builddate.h that is now generated

4 years agoAdd new MSBuild project "version"
Magnus Jacobsson [Sat, 25 Jul 2020 14:19:39 +0000 (16:19 +0200)]
Add new MSBuild project "version"

Generates windows/include/version.h and windows/include/builddate.h.

Also ensure that the version project is built first by adding a
dependency from the pathplan project which was the first project to be
built before this change.

Includes auto-updated VisualStudioVersion variable in solution file.

4 years agoChange to git ignore some files in project root only
Magnus Jacobsson [Sat, 25 Jul 2020 14:17:14 +0000 (16:17 +0200)]
Change to git ignore some files in project root only

E.g. VERSION (aka version on Windows) was ignored in all directories.

4 years agoAdd shim for python3.exe on Windows
Magnus Jacobsson [Thu, 23 Jul 2020 21:13:51 +0000 (23:13 +0200)]
Add shim for python3.exe on Windows

Chocolatey doesn't install python3 as python3.exe, only as python.exe.