Skip to content

Commit

Permalink
[v1.3.1] Merge branch 'bleeding' (Version release)
Browse files Browse the repository at this point in the history
  • Loading branch information
Snaipe committed Aug 20, 2015
2 parents 4e36f68 + e37b6b5 commit 0f7adeb
Show file tree
Hide file tree
Showing 46 changed files with 418 additions and 87 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 = 1.3.0
current_version = 1.3.1
commit = True

[bumpversion:file:CMakeLists.txt]
Expand Down
13 changes: 11 additions & 2 deletions .cmake/Modules/CoverallsGenerateGcov.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,17 @@ foreach (GCOV_FILE ${ALL_GCOV_FILES})
endforeach()

# TODO: Enable setting these
set(JSON_SERVICE_NAME "travis-ci")
set(JSON_SERVICE_JOB_ID $ENV{TRAVIS_JOB_ID})
if (NOT DEFINED ENV{CI_NAME})
set(JSON_SERVICE_NAME "travis-ci")
else ()
set(JSON_SERVICE_NAME $ENV{CI_NAME})
endif()

if (NOT DEFINED ENV{CI_JOB_ID})
set(JSON_SERVICE_JOB_ID $ENV{TRAVIS_JOB_ID})
else ()
set(JSON_SERVICE_JOB_ID $ENV{CI_JOB_ID})
endif()
set(JSON_REPO_TOKEN $ENV{COVERALLS_REPO_TOKEN})

set(JSON_TEMPLATE
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
!*.rst
!samples/tests/*.sh
!*.po
!samples/*.expected

!LICENSE
!HEADER
Expand Down
31 changes: 23 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,39 @@
language: c
os:
- linux
- osx
compiler:
- gcc
sudo: false
addons:
apt:
packages:
- check
- gettext
- cmake
before_install:
- export LOCAL_INSTALL="$HOME"
- ".ci/install-libcsptr.sh"
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/lib
- export CFLAGS="-g -O0"
script:
- mkdir -p build && cd $_ && cmake -DCOVERALLS=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=$HOME .. && make && make test
- mkdir -p build
- cd build
- cmake -DCOVERALLS=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=$HOME -DCMAKE_INSTALL_PREFIX=criterion-${TRAVIS_TAG} ..
- make
- make test
after_success:
- make coveralls
after_failure:
- cat Testing/Temporary/LastTest.log
- cat Testing/Temporary/LastTest.log samples/*.{out,err} ../samples/tests/*.{out,err}
env:
global:
secure: bzZcWjdqoTgceC40kEBucx7NuWYJPk+rxgF3UJJDXi+ijQAFYPv70p5eVsGR6rfc+XgqXCxcUFQtuL4ZVt7QEfVk1ZOJITNeHbKIeKaEYS4nX8mFf+CBeEm9bJGZ04KiQJdJu5mzzAHvXbW7roGXDGWe1Bjnk5wwA+dNUCa7H04=

before_deploy:
- make install
- tar -cvjf criterion-${TRAVIS_TAG}-${TRAVIS_OS_NAME}-x86_64.tar.bz2 criterion-${TRAVIS_TAG}

deploy:
provider: releases
skip_cleanup: true
api_key:
secure: d3l2Ohb2FF3tSXku1d0ASR5dntdnQ48Jyc39IEloDBxFXCselCkYruUQv6p0TA3P+Dmrz4wS7/AFlBMMsQ3XfGFVIOnITiTaGWg5fEpIf7zYsDf0zECPE0MOHMGqJMn3/SrSKdtEA4N84Q4JS7Ou+ewG65mxUDO5Ce60OoEG5JA=
file: criterion-${TRAVIS_TAG}-${TRAVIS_OS_NAME}-x86_64.tar.bz2
on:
repo: Snaipe/Criterion
tags: true
11 changes: 7 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@ project(Criterion C)
enable_testing()
add_subdirectory(samples)

set(PROJECT_VERSION "1.3.0")
set(PROJECT_VERSION "1.3.1")
set(LOCALEDIR ${CMAKE_INSTALL_PREFIX}/share/locale)
set(GettextTranslate_ALL)
set(GettextTranslate_GMO_BINARY)
set(GettextTranslate_ALL 1)
set(GettextTranslate_GMO_BINARY 1)
set(MODULE_DIR "${CMAKE_SOURCE_DIR}/.cmake/Modules")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${MODULE_DIR})

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -g -std=gnu99")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-no-undefined")

if (WIN32)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-no-undefined")
endif()

# Setup coveralls

Expand Down
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2015-08-20 Franklin "Snaipe" Mathieu <[email protected]>

* criterion: version 1.3.1
* Fixed OS X and Windows section iterations
* Fixed report hooks not working on OS X and Windows
* Fixed duplicated output when writing in PRE_ALL to a redirected stdout/err
* Added -S switch to display filenames in their short version

2015-08-05 Franklin "Snaipe" Mathieu <[email protected]>

* criterion: version 1.3.0
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@ the user would have with other frameworks:

## Downloads

* [Linux (x86_64)](https://github.com/Snaipe/Criterion/releases/download/v1.3.0/criterion-1.3.0-linux-x86_64.tar.bz2)
* [OS X (x86_64)](https://github.com/Snaipe/Criterion/releases/download/v1.3.0/criterion-1.3.0-osx-x86_64.tar.bz2)
* [FreeBSD (x86_64)](https://github.com/Snaipe/Criterion/releases/download/v1.3.0/criterion-1.3.0-freebsd-x86_64.tar.bz2)
* [Windows (x86_64)](https://github.com/Snaipe/Criterion/releases/download/v1.3.0/criterion-1.3.0-windows-x86_64.tar.bz2)
* [Linux (x86_64)](https://github.com/Snaipe/Criterion/releases/download/v1.3.1/criterion-1.3.1-linux-x86_64.tar.bz2)
* [OS X (x86_64)](https://github.com/Snaipe/Criterion/releases/download/v1.3.1/criterion-1.3.1-osx-x86_64.tar.bz2)
* [Windows (x86)](https://github.com/Snaipe/Criterion/releases/download/v1.3.1/criterion-1.3.1-windows-x86.tar.bz2)

If you have a different platform, you can still [build the library from source](http://criterion.readthedocs.org/en/latest/setup.html#installation)

Expand Down
37 changes: 31 additions & 6 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 1.3.0_b{build}-{branch}
version: 1.3.1_b{build}-{branch}

os: Windows Server 2012

Expand All @@ -9,27 +9,39 @@ init:
environment:
COVERALLS_REPO_TOKEN:
secure: 5nuCg+faxFPeppoNNcSwVobswAVFUf8ut83vw8CX/4W2y0kZkGmwEfCUxSQWiQDU
CI_NAME: appveyor
CI_JOB_ID: $(APPVEYOR_JOB_ID)
LOCAL_INSTALL: $(APPVEYOR_BUILD_FOLDER)
GCOV_PREFIX: $(APPVEYOR_BUILD_FOLDER)

clone_depth: 5

matrix:
fast_finish: true # set this flag to immediately finish build once one of the jobs fails.

platform:
- x86
- x86_64

configuration: Release

install:
- 'set GCOV_PREFIX=%APPVEYOR_BUILD_FOLDER%'
- 'set LOCAL_INSTALL=%APPVEYOR_BUILD_FOLDER%'
- 'bash -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; .ci/install-libcsptr.sh -G \"MSYS Makefiles\"; true"'
# Hack to make git think it is on the tip of the repo branch
- 'git checkout -B %APPVEYOR_REPO_BRANCH%'
# Install libcsptr
- 'bash -lc "cd $APPVEYOR_BUILD_FOLDER; .ci/install-libcsptr.sh -G \"MSYS Makefiles\"; true"'
# We need to manually make since the above command somehow crashes
- 'cd dependencies/libcsptr/build && make && make install && cd ../../../'
- 'mkdir build && cd build && cmake -DCMAKE_PREFIX_PATH="%LOCAL_INSTALL%" -DCOVERALLS=ON -DCMAKE_BUILD_TYPE=Debug -G "MSYS Makefiles" ..'
# Configure project
- 'mkdir build && cd build'
- 'cmake -DCMAKE_INSTALL_PREFIX=criterion-%APPVEYOR_REPO_TAG_NAME% -DCMAKE_PREFIX_PATH="%LOCAL_INSTALL%" -DCOVERALLS=ON -DCMAKE_BUILD_TYPE=Debug -G "MSYS Makefiles" ..'

build_script:
- 'make'

after_build:
- 'make install'
- 'bash -lc "cd $APPVEYOR_BUILD_FOLDER; tar -cvjf criterion-${APPVEYOR_REPO_BRANCH}-windows-${PLATFORM}.tar.bz2 -C build criterion-${APPVEYOR_REPO_TAG_NAME}"'

test_script:
- 'make test || bash -lc "cat $APPVEYOR_BUILD_FOLDER/build/Testing/Temporary/LastTest.log"'

Expand All @@ -41,3 +53,16 @@ notifications:
- provider: Email
to: [[email protected]]
on_build_status_changed: true

artifacts:
- path: '**\*.tar.bz2'

deploy:
provider: GitHub
auth_token:
secure: MnZZQeoxBVnpV9GSSvVok5Je0/N2d/fzG4+ITw95/tYSgZ8rleBV23a5sCwAea3r
artifact: 'criterion-$(APPVEYOR_REPO_TAG_NAME)-windows-$(PLATFORM).tar.bz2'
draft: false
prerelease: false
on:
appveyor_repo_tag: true
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
# built documents.
#
# The short X.Y version.
version = '1.3.0'
version = '1.3.1'
# The full version, including alpha/beta/rc tags.
release = version

Expand Down
2 changes: 2 additions & 0 deletions doc/env.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Command line arguments
* ``--no-early-exit``: The test workers shall not prematurely exit when done and
will properly return from the main, cleaning up their process space.
This is useful when tracking memory leaks with ``valgrind --tool=memcheck``.
* ``-S or --short-filename``: The filenames are displayed in their short form.
* ``--always-succeed``: The process shall exit with a status of ``0``.
* ``--tap``: Enables the TAP (Test Anything Protocol) output format.
* ``--verbose[=level]``: Makes the output verbose. When provided with an integer,
Expand Down Expand Up @@ -59,6 +60,7 @@ Environment variables are alternatives to command line switches when set to 1.
* ``CRITERION_ENABLE_TAP``: Same as ``--tap``.
* ``CRITERION_FAIL_FAST``: Same as ``--fail-fast``.
* ``CRITERION_USE_ASCII``: Same as ``--ascii``.
* ``CRITERION_SHORT_FILENAME``: Same as ``--short-filename``.
* ``CRITERION_VERBOSITY_LEVEL``: Same as ``--verbose``. Sets the verbosity level
to its value.
* ``CRITERION_TEST_PATTERN``: Same as ``--pattern``. Sets the test pattern
Expand Down
3 changes: 2 additions & 1 deletion include/criterion/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
# define SECTION_START(Name) g_ ## Name ## _section_start
# define SECTION_END(Name) g_ ## Name ## _section_end

# define DECL_SECTION_LIMITS(Type, Name) \
# define DECL_SECTION_LIMITS(Type, Name) DECL_SECTION_LIMITS_(Type, Name)
# define DECL_SECTION_LIMITS_(Type, Name) \
extern Type SECTION_START_(Name) SECTION_START_SUFFIX(#Name); \
extern Type SECTION_END_(Name) SECTION_END_SUFFIX(#Name)

Expand Down
23 changes: 23 additions & 0 deletions include/criterion/criterion.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
/*
* The MIT License (MIT)
*
* Copyright © 2015 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
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef CRITERION_H_
# define CRITERION_H_

Expand Down
1 change: 1 addition & 0 deletions include/criterion/options.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ struct criterion_options {
bool use_ascii;
bool fail_fast;
const char *pattern;
bool short_filename;
};

extern struct criterion_options criterion_options;
Expand Down
4 changes: 2 additions & 2 deletions po/Makevars
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ subdir = po
top_builddir = ..

# These options get passed to xgettext.
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --keyword=N_s:1,2 --keyword=_s:1,2

# This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
Expand Down Expand Up @@ -41,7 +41,7 @@ PACKAGE_GNU = no
# It can be your email address, or a mailing list address where translators
# can write to without being subscribed, or the URL of a web page through
# which the translators can contact you.
MSGID_BUGS_ADDRESS =
MSGID_BUGS_ADDRESS = [email protected]

# This is the list of locale categories, beyond LC_MESSAGES, for which the
# message catalogs shall be used. It is usually empty.
Expand Down
58 changes: 35 additions & 23 deletions po/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
msgid ""
msgstr ""
"Project-Id-Version: criterion 1.0.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-07-28 22:17+0200\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2015-08-05 11:37+0200\n"
"PO-Revision-Date: 2015-04-03 17:58+0200\n"
"Last-Translator: <[email protected]>\n"
"Language-Team: French\n"
Expand All @@ -18,62 +18,74 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"

#: src/log/normal.c:38
#: src/log/normal.c:51
#, c-format
msgid "Criterion v%s\n"
msgstr "Criterion v%s\n"

#: src/log/normal.c:42
#: src/log/normal.c:52
#, c-format
msgid " %s\n"
msgstr " %s\n"

#: src/log/normal.c:55 src/log/normal.c:57
#, c-format
msgid "%1$s::%2$s\n"
msgstr "%1$s::%2$s\n"

#: src/log/normal.c:47 src/log/normal.c:121
#, c-format
msgid " %s\n"
msgstr " %s\n"
#: src/log/normal.c:56
#, fuzzy, c-format
msgid "%1$s::%2$s: (%3$3.2fs)\n"
msgstr "%1$s::%2$s: (%3$3.2fs)\n"

#: src/log/normal.c:76
#: src/log/normal.c:58
#, c-format
msgid "%1$s::%2$s: Test is disabled\n"
msgstr "%1$s::%2$s: Le test est désactivé\n"

#: src/log/normal.c:77
#: src/log/normal.c:59
#, c-format
msgid "%1$s::%2$s: Suite is disabled\n"
msgstr "%1$s::%2$s: La suite est désactivée\n"

#: src/log/normal.c:94
#, c-format
msgid ""
"%1$sSynthesis: Tested: %2$s%3$lu%4$s | Passing: %5$s%6$lu%7$s | Failing: %8$s"
"%9$lu%10$s | Crashing: %11$s%12$lu%13$s %14$s\n"
msgstr ""
"%1$sSynthèse: Testés: %2$s%3$lu%4$s | Validés: %5$s%6$lu%7$s | Échoués: %8$s"
"%9$lu%10$s | Plantages: %11$s%12$lu%13$s %14$s\n"

#: src/log/normal.c:115
#: src/log/normal.c:60
#, c-format
msgid "%1$s%2$s%3$s:%4$s%5$d%6$s: Assertion failed: %7$s\n"
msgstr "%1$s%2$s%3$s:%4$s%5$d%6$s: Échec d'assertion: %7$s\n"

#: src/log/normal.c:128
#: src/log/normal.c:61
#, c-format
msgid "%1$s%2$s%3$s:%4$s%5$u%6$s: Unexpected signal caught below this line!\n"
msgstr ""
"%1$s%2$s%3$s:%4$s%5$u%6$s: Un signal inattendu a été reçu après cette "
"ligne!\n"

#: src/log/normal.c:132
#: src/log/normal.c:62
#, c-format
msgid "%1$s::%2$s: CRASH!\n"
msgstr "%1$s::%2$s: PLANTAGE!\n"

#: src/log/normal.c:139
#: src/log/normal.c:63
#, fuzzy, c-format
msgid ""
"%1$sWarning! The test `%2$s::%3$s` crashed during its setup or teardown."
"%4$s\n"
msgstr ""
"%1$sAttention! Le test `%2$s::%3$s` a planté pendant son initialisation ou "
"sa finalisation.%4$s\n"

#: src/log/normal.c:64
#, c-format
msgid "Running %1$s%2$lu%3$s test from %4$s%5$s%6$s:\n"
msgid_plural "Running %1$s%2$lu%3$s tests from %4$s%5$s%6$s:\n"
msgstr[0] "Lancement de %1$s%2$lu%3$s test dans %4$s%5$s%6$s:\n"
msgstr[1] "Lancement de %1$s%2$lu%3$s tests dans %4$s%5$s%6$s:\n"

#: src/log/normal.c:66
#, c-format
msgid ""
"%1$sSynthesis: Tested: %2$s%3$lu%4$s | Passing: %5$s%6$lu%7$s | Failing: %8$s"
"%9$lu%10$s | Crashing: %11$s%12$lu%13$s %14$s\n"
msgstr ""
"%1$sSynthèse: Testés: %2$s%3$lu%4$s | Validés: %5$s%6$lu%7$s | Échoués: %8$s"
"%9$lu%10$s | Plantages: %11$s%12$lu%13$s %14$s\n"
Loading

0 comments on commit 0f7adeb

Please sign in to comment.