Skip to content

Commit

Permalink
release: Merge branch 'bleeding'
Browse files Browse the repository at this point in the history
This is the 2.3.1 release merge.
  • Loading branch information
Snaipe committed Feb 7, 2017
2 parents 4e3fbde + caa5ea5 commit 3b90b8d
Show file tree
Hide file tree
Showing 47 changed files with 474 additions and 159 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 2.3.0
current_version = 2.3.1
commit = False
parse = ^
(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+) # minimum 'N.N.N'
Expand Down
1 change: 1 addition & 0 deletions .cmake/Modules/DebConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ set(CPACK_DEBIAN_BUILD_DEPENDS
debhelper
cmake
gettext
git
)

set(CPACK_DEBIAN_PACKAGE_DEPENDS)
Expand Down
2 changes: 1 addition & 1 deletion .cmake/Modules/Properties.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Redistribution and use of this file is allowed according to the terms of the MIT license.
# For details see the LICENSE file distributed with Criterion.

set (PROJECT_VERSION "2.3.0")
set (PROJECT_VERSION "2.3.1")
set (PROJECT_SOVERSION 3)
set (PROJECT_SONAME 3.1.0)

Expand Down
8 changes: 8 additions & 0 deletions .cmake/Modules/Subprojects.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ function (cr_add_subproject _NAME)
set (install_prefix ${CMAKE_BINARY_DIR}/external)
endif ()

if (ARGS_PATH)
if (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${ARGS_PATH}")
set (ARGS_PATH "")
else ()
set (ARGS_GIT "")
endif ()
endif ()

if (ARGS_GIT)
string(REPLACE "#" ";" git_opts "${ARGS_GIT}")
list(LENGTH git_opts git_opts_len)
Expand Down
18 changes: 18 additions & 0 deletions .cmake/copy-source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,26 @@ CURDIR=$(dirname $0)
SOURCE_DIR=$1; shift
DEST_DIR=$1; shift

add_to_sources() {
URL=$1; shift
NAME=$1; shift
HASH=$1; shift

(
git clone "$URL" "$DEST_DIR/$NAME"
cd "$DEST_DIR/$NAME"
git checkout -qf "$HASH"
rm -Rf .git
)
}

(
cd "$SOURCE_DIR"
mkdir -p "$DEST_DIR"
"$CURDIR/git-archive-all.sh" --format tar -- - | tar -x -C "$DEST_DIR"

add_to_sources https://github.com/Snaipe/libcsptr dependencies/libcsptr 0d52904
add_to_sources https://github.com/Snaipe/dyncall dependencies/dyncall 51e79a8
add_to_sources https://github.com/nanomsg/nanomsg dependencies/nanomsg 7e12a20
add_to_sources https://github.com/diacritic/BoxFort dependencies/boxfort 7ed0cf2
)
8 changes: 2 additions & 6 deletions .cmake/git-archive-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,8 @@ superfile=`head -n 1 $TMPFILE`
if [ $VERBOSE -eq 1 ]; then
echo -n "looking for subprojects..."
fi
# find all '.git' dirs, these show us the remaining to-be-archived dirs
# we only want directories that are below the current directory
find . -mindepth 2 -name '.git' -type d -print | sed -e 's/^\.\///' -e 's/\.git$//' >> $TOARCHIVE
# as of version 1.7.8, git places the submodule .git directories under the superprojects .git dir
# the submodules get a .git file that points to their .git dir. we need to find all of these too
find . -mindepth 2 -name '.git' -type f -print | xargs grep -l "gitdir" | sed -e 's/^\.\///' -e 's/\.git$//' >> $TOARCHIVE

git config --file .gitmodules --get-regexp path | cut -d' ' -f2 | sed -e 's/$/\//' >> $TOARCHIVE
if [ $VERBOSE -eq 1 ]; then
echo "done"
echo " found:"
Expand Down
16 changes: 8 additions & 8 deletions .uncrustify.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,18 @@ sp_after_byref = remove
sp_after_byref_func = remove
sp_after_cast = force # "(int) a" vs "(int)a"
sp_after_class_colon = force
sp_after_comma = force
sp_after_comma = add
sp_after_dc = remove
sp_after_new = force
sp_after_operator = remove
sp_after_operator_sym = remove
sp_after_ptr_star = remove # "int *foo" vs "int * foo"
sp_after_ptr_star_func = remove
sp_after_semi = force
sp_after_semi_for = force
sp_after_semi = add
sp_after_semi_for = add
sp_after_semi_for_empty = remove
sp_after_sparen = force # "if () {" vs "if (){"
sp_after_type = force
sp_after_type = add
sp_angle_paren = remove
sp_angle_shift = ignore
sp_angle_word = force
Expand Down Expand Up @@ -150,10 +150,10 @@ sp_func_proto_paren = remove # "int foo ();" vs "int foo();"
sp_getset_brace = force
sp_incdec = remove
sp_inside_angle = remove
sp_inside_braces = force # "{ 1 }" vs "{1}"
sp_inside_braces = add # "{ 1 }" vs "{1}"
sp_inside_braces_empty = remove
sp_inside_braces_enum = force # "{ 1 }" vs "{1}"
sp_inside_braces_struct = force # "{ 1 }" vs "{1}"
sp_inside_braces_enum = add # "{ 1 }" vs "{1}"
sp_inside_braces_struct = add # "{ 1 }" vs "{1}"
sp_inside_fparen = remove
sp_inside_fparens = remove
sp_inside_paren = remove
Expand Down Expand Up @@ -202,7 +202,7 @@ align_on_tabstop = false # align on tabstops
align_enum_equ_span = 4 # '=' in enum definition
align_nl_cont = true
align_assign_span = 0
align_struct_init_span = 3 # align stuff in a structure init '= { }'
align_struct_init_span = 0 # align stuff in a structure init '= { }'
align_right_cmt_span = 3
align_pp_define_span = 2
align_pp_define_gap = 4
Expand Down
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ find_package(BoxFort)

cr_add_subproject (csptr
GIT "git://github.com/Snaipe/libcsptr#0d52904"
PATH dependencies/libcsptr
OPTS
-DLIBCSPTR_TESTS=OFF
"-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} ${PIC_C_FLAGS} ${VISI_C_FLAGS}"
Expand All @@ -47,6 +48,7 @@ cr_add_subproject (csptr

cr_add_subproject (dyncall_s
GIT "git://github.com/Snaipe/dyncall#51e79a8"
PATH dependencies/dyncall
OPTS
-DLANG_CXX=${LANG_CXX}
"-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} ${PIC_C_FLAGS} ${VISI_C_FLAGS}"
Expand All @@ -56,6 +58,7 @@ cr_add_subproject (dyncall_s

cr_add_subproject (nanomsg
GIT "git://github.com/nanomsg/nanomsg.git#7e12a20"
PATH dependencies/nanomsg
OPTS
-DNN_TESTS=OFF
-DNN_TOOLS=OFF
Expand All @@ -67,7 +70,8 @@ cr_add_subproject (nanomsg
)

cr_add_subproject (boxfort PATH dependencies/boxfort
GIT "git://github.com/diacritic/BoxFort.git#8b641ca"
GIT "git://github.com/diacritic/BoxFort.git#7ed0cf2"
PATH dependencies/boxfort
OPTS
-DBXF_TESTS=OFF
-DBXF_SAMPLES=OFF
Expand All @@ -82,6 +86,7 @@ add_definitions(-DBXF_STATIC_LIB -DNN_STATIC_LIB)

cr_add_subproject (wingetopt
GIT "git://github.com/alex85k/wingetopt.git#76a5d1a"
PATH dependencies/wingetopt
CMAKE
IF MSVC
)
Expand Down
11 changes: 11 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
2017-02-07 Franklin "Snaipe" Mathieu <[email protected]>

* criterion: version 2.3.1
* Fix: correctly handle malformed --debug parameter
* Fix: replaced the cryptic message when the debugger is not present with a more explicit one.
* Fix: cache section limits on report hooks for significantly better performance.
* Fix: don't report passing assertions by default for significantly better performance.
* Addition: added --full-stats CLI switch to report passing assertions for compatibility purposes.

The full git changelog may be accessed with `git log v2.3.0-1..v2.3.1`.

2016-12-07 Franklin "Snaipe" Mathieu <[email protected]>

* criterion: version 2.3.0-1
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright © 2015-2016 Franklin "Snaipe" Mathieu <http://snai.pe/>
Copyright © 2015-2017 Franklin "Snaipe" Mathieu <http://snai.pe/>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<img src="doc/criterion-title.png" height="96" alt="Criterion Logo" />
=========

[![Unix Build Status](https://img.shields.io/travis/Snaipe/Criterion/master.svg?label=linux)](https://travis-ci.org/Snaipe/Criterion)
[![Unix Build Status](https://img.shields.io/travis/Snaipe/Criterion/bleeding.svg?label=linux)](https://travis-ci.org/Snaipe/Criterion)
[![Windows Build Status](https://img.shields.io/appveyor/ci/Snaipe/Criterion/bleeding.svg?label=windows)](https://ci.appveyor.com/project/Snaipe/Criterion/branch/bleeding)
[![Coverage Status](https://img.shields.io/codecov/c/github/Snaipe/Criterion/bleeding.svg)](https://codecov.io/github/Snaipe/Criterion?branch=bleeding)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/Snaipe/Criterion/blob/master/LICENSE)
Expand Down Expand Up @@ -83,7 +83,17 @@ Sample tests can be found in the [sample directory][samples].

## Credits

Logo made by [Paul Bouigue](http://www.cargocollective.com/pbouigue)
Criterion is built with the following projects:

* [boxfort](https://github.com/diacritic/BoxFort)
* [debugbreak](https://github.com/scottt/debugbreak)
* [dyncall](http://www.dyncall.org/)
* [klib](http://attractivechaos.github.io/klib/)
* [libcsptr](https://github.com/Snaipe/libcsptr)
* [nanomsg](http://nanomsg.org/)
* [nanopb](http://koti.kapsi.fi/jpa/nanopb/)

Logo made by [Paul Bouigue](http://www.cargocollective.com/pbouigue).

[online-docs]: http://criterion.readthedocs.org/
[pdf-docs]: http://readthedocs.org/projects/criterion/downloads/pdf/latest/
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 2.3.0_b{build}-{branch}
version: 2.3.1_b{build}-{branch}

os: Visual Studio 2015

Expand Down
2 changes: 1 addition & 1 deletion debian.copyright
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Upstream-Contact: Franklin "Snaipe" Mathieu <[email protected]>
Source: http://github.com/Snaipe/Criterion

Files: *
Copyright: 2015-2016, Franklin "Snaipe" Mathieu <[email protected]>
Copyright: 2015-2017, Franklin "Snaipe" Mathieu <[email protected]>
License: MIT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
29 changes: 24 additions & 5 deletions dev/autotools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@

This is a project skeleton that uses criterion tests with the TAP test driver.

## How this works

Be sure to do the following to get similar setups to work:

1. copy `tap-driver.sh` from your automake installation ([`autogen.sh:4-7`](autogen.sh#L4-L7)).
2. create a wrapper script that contains the following ([`autogen.sh:12-15`](autogen.sh#L12-L15)):

```bash
#!/bin/sh
$1 -Otap:- --always-succeed 2>&1 >/dev/null
```

3. Check for criterion ([`configure.ac:5-7`](configure.ac#L5-L7)).
4. Check for awk ([`configure.ac:9`](configure.ac#L9)).
5. Check for `tap-driver.sh` ([`configure.ac:14`](configure.ac#L14)).
6. Set `LOG_COMPILER` to the path of the wrapper script created at step 2 ([`Makefile.am:2`](Makefile.am#L2)).
7. Set `LOG_DRIVER` to a command running `tap-driver.sh` with our found awk ([`Makefile.am:5-6`](Makefile.am#L5-L6)).
8. Register your test programs ([`Makefile.am:8-14`](Makefile.am#L8-L14)).

## Running the tests

The default setup assumes that criterion is installed on your system.
Expand All @@ -20,8 +39,8 @@ whatever you want with it.
### License clause
This program is free software. It comes without any warranty, to
the extent permitted by applicable law. You can redistribute it
and/or modify it under the terms of the Do What The Fuck You Want
To Public License, Version 2, as published by Sam Hocevar. See
http://www.wtfpl.net/ for more details.
This program is free software. It comes without any warranty, to
the extent permitted by applicable law. You can redistribute it
and/or modify it under the terms of the Do What The Fuck You Want
To Public License, Version 2, as published by Sam Hocevar. See
http://www.wtfpl.net/ for more details.
6 changes: 3 additions & 3 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '2.3.0'
# The full version, including alpha/beta/rc tags.
release = version
release = '2.3.1'
# The short X.Y version.
version = re.search(r'\d+\.\d+', release).group(0)

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
50 changes: 46 additions & 4 deletions doc/debug.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ Debugging and Coverage information

.. _gdb-ref:

.. note::

The following section assumes you have the relevant debugging server
installed on your server. For instance, if you're debugging with gdb,
you'll need to have ``gdbserver`` installed and available in your PATH.

Debugging with GDB
------------------
Expand All @@ -11,10 +16,16 @@ In one terminal do:

.. code-block:: bash
$ ./simple.c.bin --debug
Process simple.c.bin created; pid = 20803
$ ./test --debug=gdb
Process test created; pid = 20803
Listening on port 1234
.. note::

If no argument is passed to --debug, criterion will fall back to the
appropriate debugging server for your compiler: gdbserver with gcc,
lldb-server with clang, windbg with msvc.

In another terminal connect to this debug session:

.. code-block:: bash
Expand All @@ -35,7 +46,7 @@ After ``continue`` the first test is run:
Remote debugging from host 127.0.0.1
[RUN ] misc::failing
[----] /media/data/devel/Criterion/samples/simple.c:4: Assertion failed: The expression 0 is false.
[----] /path/to/test.c:4: Assertion failed: The expression 0 is false.
[FAIL] misc::failing: (0,00s)
Child exited with status 0
Expand All @@ -44,14 +55,45 @@ And a new process is created for the next test:

.. code-block:: bash
Process /media/data/devel/Criterion/build/samples/simple.c.bin created; pid = 26414
Process /path/to/test created; pid = 26414
Listening on port 1234
Connect your remote debugger to this test with ``remote target localhost:1234``
and run the test with ``continue``

To use a different port use ``--debug --debug-transport=<protocol>:<port>``

Debugging with an unsupported debugger
--------------------------------------

If you want to use a debugger that criterion doesn't natively support,
you may use the ``idle`` debugging mode: In this mode, the PID of the
test will be printed, and the test itself will suspend all operations
until a debugger resumes it.

.. code-block:: bash
$ ./test --debug=idle
<snip>
[----] misc::failing: Started test has PID 30587.
On unices, once attached, simply signal the process with SIGCONT to resume
it.

.. code-block:: bash
$ sudo gdb ./test -p 30587
Attaching to process 30587
0x00007f9ea3780f3d in raise () from /usr/lib/libpthread.so.0
(gdb) signal SIGCONT
Continuing with signal SIGCONT.
Program received signal SIGCONT, Continued.
0x00007f9ea3780f5f in raise () from /usr/lib/libpthread.so.0
(gdb) c
...
(gdb) q
.. _coverage-ref:

Coverage of Criterion tests
Expand Down
5 changes: 5 additions & 0 deletions doc/env.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ Command line arguments
equivalent to ``--output=tap:FILE``.
* ``--verbose[=level]``: Makes the output verbose. When provided with an integer,
sets the verbosity level to that integer.
* ``--full-stats``: Forces tests to fully report statistics. By default,
tests do not report details for passing assertions, so this option forces
them to do so.
Activating this causes massive slowdowns for large number of assertions, but
provides more accurate reports.
* ``-OPROVIDER:FILE or --output=PROVIDER:FILE``: Write a test report to FILE
using the output provider named by PROVIDER.
If FILE is ``"-"``, it implies ``--quiet``, and the report shall be written
Expand Down
Loading

0 comments on commit 3b90b8d

Please sign in to comment.