Commit Graph

23 Commits

Author SHA1 Message Date
Eric
e63fb4961d
Begin JSON reporter change: Allow users to specify arbitrary JSON input/output. (#499)
This patch begins a set of changes to convert the library to use JSON as
the primary data type used to communicate with users; but for custom user
input and output.

The patch introduces the json.hpp header which is supplied by
https://github.com/nlohmann/json. The header is used unmodified
in the third_party directory. It is installed under the include/benchmark
prefix.

Additionally, this patch adds `Benchmark::WithInput` to allow
the passing of arbitrary JSON as an input argument to a benchmark.
The results of which can be accessed using `State::GetInput()`.

This patch also adds `State::operator[](std::string)`, which allows
users to report arbitrary JSON as output from a benchmark. See
the documentation for examples.
2018-01-06 11:50:29 -07:00
Eric
7db02be244
Add support for GTest based unit tests. (#485)
* Add support for GTest based unit tests.

As Dominic and I have previously discussed, there is some
need/desire to improve the testing situation in Google Benchmark.

One step to fixing this problem is to make it easier to write
unit tests by adding support for GTest, which is what this patch does.

By default it looks for an installed version of GTest. However the
user can specify -DBENCHMARK_BUILD_EXTERNAL_GTEST=ON to instead
download, build, and use copy of gtest from source. This is
quite useful when Benchmark is being built in non-standard configurations,
such as against libc++ or in 32 bit mode.
2017-12-13 16:26:47 -07:00
Dominic Hamon
7f2d2cd5b9 fix xcode travis builds by skipping mkdir errors 2017-12-07 14:20:59 -08:00
Victor Costan
0bbaeeaf7a Add GCC on OSX to list of Travis CI configurations. (#492) 2017-11-30 15:21:32 -08:00
Dominic Hamon
febd0d7a7a Remove unnecessary whitespace in travis yaml 2017-05-22 09:27:28 -07:00
Tushar Maheshwari
b1f33d44ea Add macOS builds to .travis.yml (#389) 2017-05-22 09:26:05 -07:00
Eric
0dbcdf56a0 Add BENCHMARK_BUILD_32_BITS option and add builders to test it (#360)
* Add BENCHMARK_BUILD_32_BITS option and add builders to test it

* Attempt to fix travis configuration

* Make add_required_cxx_compiler_flag cause an error when the flag isn't supported

* add gcc-multilib dependancy on travis

* attempt to fix travis.yml parsing error

* Require g++-multilib instead of gcc-multilib

* Add 32 bit release configurations

* Attempt to fix libc++ travis build w/ 32 bits

* Work around CMake configuration failure on Travis
2017-03-28 00:43:42 -07:00
Eric
c6f3f0eb9c Cleanup RunBenchmark code. (#289)
* Cleanup the code for generating and running benchmarks

* Rework calculation of real/manual time

* Add back TSAN builder
2016-09-06 02:28:35 -06:00
Eric Fiselier
60e88c21e4 Remove TSAN builder for now. 2016-09-03 02:11:42 -06:00
Eric Fiselier
db376c8654 Tweak TSAN flags 2016-09-03 01:45:59 -06:00
Eric Fiselier
183999c002 Add Thread Sanitizer bot to Travis 2016-09-03 00:40:44 -06:00
Eric Fiselier
85e7ed7eea Add libc++ and MSAN builders to to travis.
This patch adds three new build configurations to the travis CI.

* Clang 3.8 w/ libc++
* Clang 3.8 w/ libc++, UBSAN, ASAN
* Clang 3.8 w/ libc++, MSAN
2016-08-07 23:44:34 -06:00
Eric Fiselier
8267117a92 Add ASAN and UBSAN builders to travis for both GCC and Clang.
This patch adds new builders that test against GCC 6 and Clang 3.8 respectivly.
They also enable both address and undefined sanitizer. MSAN currently won't work
since it requires a sanitized STL.
2016-08-07 19:25:19 -06:00
Eric
b7f8e355ee update travis, squash history (#265) 2016-08-02 14:47:29 -07:00
Billy Robert O'Neal III
fa0e7ef8c6 Mark sudo: required for Travis
Google Benchmark's Travis build currently requires "sudo" to install newer
versions of CMake and similar. See this for more details:

https://docs.travis-ci.com/user/workers/container-based-infrastructure/

Since Google Benchmark was put into Travis before 2015-01-01, it gets the
standard infrastructure implicitly, so sudo works. But anyone who forks this
repository and tries to add Travis.CI (so they can see if the build works
before creating a PR) gets broken builds before this change.
2016-05-11 12:01:03 -07:00
Matt Clarkson
ef47992125 Added coveralls support 2015-05-13 09:17:48 +01:00
Eric Fiselier
818c9fcc2f Upgrade travis to use CMake 2.8.12 and add Clang builders 2015-04-03 14:43:42 -04:00
Eric Fiselier
bf063941d4 Print information about travis enviroment 2015-04-02 13:32:18 -04:00
Eric Fiselier
e447887d16 Fix travis config by moving CTEST_OUTPUT_ON_FAILURE=1 into make test command 2015-03-09 14:40:08 -04:00
Eric Fiselier
f7602badfb add env to make ctest print on failure 2015-03-09 14:34:32 -04:00
Eric Fiselier
5b41e128b3 Step one towards merging timer changes.
This patch cleans up our use of generic macros and also merges changes in the
build system.

It adds options -DBENCHMARK_ENABLE_TESTING and -DBENCHMARK_ENABLE_SHARED.
2015-03-06 12:35:00 -05:00
Evgeny Safronov
35c29c7d2f Added c++11 support for Travis. 2014-11-12 14:30:57 +04:00
Evgeny Safronov
e4d41f8a23 Using Travis as CI. 2014-11-12 13:32:00 +04:00