- 01 Dec, 2016 1 commit
-
-
David Gibson authored
The new Makefile system, via the helper script in tools/gen_deps.sh, when generating the targets to test a module, inserts dependencies meaning it must first check modules this one depends on, whether via 'depends' or 'testdepends' in _info. Although it seems logical, including 'testdepends' is actually incorrect. If ccan/a testepends on ccan/b then ccan/b must be *built* in order to test ccan/a, but it doesn't need to be tested. testepends are explicitly permitted to contain loops - it's quite common for two complementary modules to be used to test each other. This is one of the reasons testdepends exists separate from depends. So, remove testdepends from the generated check dependencies, removing the circular dependency that Make complains about. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
- 30 Nov, 2016 3 commits
-
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 27 Nov, 2016 1 commit
-
-
Kevin Locke authored
The previous name was misleading, since it does not define the number of elements (ed_elem) on the stack, but rather the number of distance values (ed_dist). Rename to make this more clear and add more documentation about what it does and how best to define it. Note: This is an API change for custom-compiled versions, but since the module has only been included for a couple days I don't think it's worth a back-compat #ifdef at this point. Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
-
- 23 Nov, 2016 2 commits
-
-
David Gibson authored
Currently Travis builds fail on the edit_distance module, because that module uses C99 extensions, which aren't enabled by default on the Ubuntu Precise compiler version. Force it to allow these, by adding the -std=gnu99 option to the compiler. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
Kevin Locke authored
This commit creates the edit_distance module for calculating various edit distance measures. The edit distance quantifies the similarity between two strings based on the number of modifications necessary to turn one string into the other. There are several edit distance measures which differ in the operations which are permitted and the cost (aka weight) of the operations. This module provides functions for calculating the Longest Common Subsequence (LCS), Levenshtein, and Damerau-Levenshtein (restricted and unrestricted) distances. Weighted versions of these functions can be created by defining cost functions as preprocessor macros when compiling this module. Distances over other array types (e.g. wide strings, integers, structs) can be accomplished by defining the element type and equality test macros. Signed-off-by: Kevin Locke <kevin@kevinlocke.name> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
- 22 Nov, 2016 3 commits
-
-
David Gibson authored
The Makefile provides for "fast" and "full" variants of make check. However, nothing seems to use or implement the "full" variant at all. Further, the %.check and %.fastcheck targets are not actually used, with other targets instead using the actual .ok tag file as the target. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
Rusty Russell authored
split() was deprecated, is now removed. explode() is the new hotness. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Particularly since it's used by a gitolite hook on ozlabs.org to update the webpages. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 21 Nov, 2016 6 commits
-
-
David Gibson authored
clang version 3.4, for whatever reason, expands a few of the testcases in cppmagic with slightly different whitespace from what we expect. Since this was changed in later clang versions, it was probably a compiler bug, but it turns out an extra space in the testcase can make it pass on clang 3.4 as well. This means we finally have clang builds working in Travis. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
David Gibson authored
Generally, ccan config variables are always defined as either 0 or 1 and are tested with #if. That's instead of being being either defined or undefined and tested with #ifdef. TIME_HAVE_MONOTONIC breaks that convention. This can cause warnings in ccan/timer which uses it assuming the 0/1 convention. Change it to remove that warning. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
David Gibson authored
Remove a warning caused by the unused 'explain' variable in headers_idempotent.c. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
David Gibson authored
There's no real reason to exclude 'generator' from the build or check targets. Add it back in. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
David Gibson authored
The new makefile excludes all modules with external library dependencies from the usual make check, meaning the libraries are not needed for the Travis build. Although it would be nice to include these modules, there are a bunch of problems with sorting out a correct environment for them. For now, just leave them out. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
David Gibson authored
# Conflicts: # .travis.yml # Makefile # Makefile-ccan
-
- 17 Nov, 2016 2 commits
-
-
David Gibson authored
The example code in wwviaudio doesn't compile as is. Mark it as an expected failure for ccanlint. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
David Gibson authored
This fixes a warning. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
- 07 Nov, 2016 2 commits
-
-
David Gibson authored
This removes the parallel make (-j) option when running make check under Travis CI. This will slow down the build somewhat, but makes it easier to match errors to the modules which caused them. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
David Gibson authored
--summary (used by make check) causes ccanlint to only ever print a one-line summary of the results. When one of the tests fails, this isn't very useful, because it doesn't say why it failed, or even which test failed. This is particularly frustrating for failures in Travis CI builds where it's not always straightforward to reproduce a similar enough build environment to check the failure manually for a particular module. --summary does have one purpose which is vital for make check, though: it suppresses any attempt to interactively correct / improve the module printing only results. This changes --summary to only have the second effect, not the first. This won't change the output in the case of passing modules, but will give more useful information in the case of failing modules. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
- 06 Nov, 2016 10 commits
-
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Since doesnt_matter() expands to nothing, GCC -Wextra suggests { }. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
GCC with -O gives an error here. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Make register_timer "use" my_timer_callback and its own args. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Many are because argc is 'int' not 'unsigned', others just laziness. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
This allows examples to refer to them, but we cast them to void at the end to avoid -Wunused warnings. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Either with UNNEEDED (if the module already used ccan/compiler) or with (void) casting. The only other change is in ccan/list/test/run-CCAN_LIST_DEBUG.c, because the linenumbers change and thus it needs updating. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 04 Nov, 2016 9 commits
-
-
Rusty Russell authored
This avoids the warning about it being unused with -Wunused. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
This makes us closer to compiling cleanly with -Wunused (as used by -Wextra). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Found by PCS Suite. Reported-by: Jon Griffiths Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Ahmed Samy <f.fallen45@gmail.com>
-
David Gibson authored
Adds a new test graph which includes a negative weight cycle. This means that shortest paths are not well defined, and both Dijkstra's algorithm and the Bellman-Ford algorithm (which can handle some negative edge weights) will fail. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
David Gibson authored
This adds the Bellman-Ford single-source shortest path algorithm to the aga and agar modules. The Bellman-Ford algorithm is (usually) slower than Dijkstra's algorithm, but unlike Dijkstra's is able to cope with negative edge costs, unless they form a negative cost cycle. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
David Gibson authored
aga_dijkstra_all_paths() runs Dijkstra's algorithm to completion (as opposed to aga_dijkstra_path(), which operates lazily). In effect this computes the shortest path to all (reachable) nodes from the start node. So, in this context the name makes sense. But for an analogous function for future algorithms (e.g. Bellman-Ford), the name doesn't make sense. So, in the interests of consistency with those future extensions, change the name of this to aga_dijkstra_complete(). Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
Rusty Russell authored
Not really a bug, but stylistically questionable and makes PCS Suite complain. Reported-by: Jon Griffiths Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 02 Nov, 2016 1 commit
-
-
David Gibson authored
The list of additional packages in our .travis.yml (mostly libraries needed for specific modules) was incorrectly formatted. So travis was attempting to install the "libjudy-dev libvorbis-dev libportaudio-dev libtalloc-dev" packagde (spaces included) which obviously didn't work. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-