mirror of
https://github.com/google/benchmark.git
synced 2024-12-28 21:40:15 +08:00
7b03df7ff7
* Add tests to verify assembler output -- Fix DoNotOptimize. For things like `DoNotOptimize`, `ClobberMemory`, and even `KeepRunning()`, it is important exactly what assembly they generate. However, we currently have no way to test this. Instead it must be manually validated every time a change occurs -- including a change in compiler version. This patch attempts to introduce a way to test the assembled output automatically. It's mirrors how LLVM verifies compiler output, and it uses LLVM FileCheck to run the tests in a similar way. The tests function by generating the assembly for a test in CMake, and then using FileCheck to verify the // CHECK lines in the source file are found in the generated assembly. Currently, the tests only run on 64-bit x86 systems under GCC and Clang, and when FileCheck is found on the system. Additionally, this patch tries to improve the code gen from DoNotOptimize. This should probably be a separate change, but I needed something to test. * Disable assembly tests on Bazel for now * Link FIXME to github issue * Fix Tests on OS X * fix strip_asm.py to work on both Linux and OS X like targets
58 lines
644 B
Plaintext
58 lines
644 B
Plaintext
*.a
|
|
*.so
|
|
*.so.?*
|
|
*.dll
|
|
*.exe
|
|
*.dylib
|
|
*.cmake
|
|
!/cmake/*.cmake
|
|
!/test/AssemblyTests.cmake
|
|
*~
|
|
*.pyc
|
|
__pycache__
|
|
|
|
# lcov
|
|
*.lcov
|
|
/lcov
|
|
|
|
# cmake files.
|
|
/Testing
|
|
CMakeCache.txt
|
|
CMakeFiles/
|
|
cmake_install.cmake
|
|
|
|
# makefiles.
|
|
Makefile
|
|
|
|
# in-source build.
|
|
bin/
|
|
lib/
|
|
/test/*_test
|
|
|
|
# exuberant ctags.
|
|
tags
|
|
|
|
# YouCompleteMe configuration.
|
|
.ycm_extra_conf.pyc
|
|
|
|
# ninja generated files.
|
|
.ninja_deps
|
|
.ninja_log
|
|
build.ninja
|
|
install_manifest.txt
|
|
rules.ninja
|
|
|
|
# bazel output symlinks.
|
|
bazel-*
|
|
|
|
# out-of-source build top-level folders.
|
|
build/
|
|
_build/
|
|
|
|
# in-source dependencies
|
|
/googletest/
|
|
|
|
# Visual Studio 2015/2017 cache/options directory
|
|
.vs/
|
|
CMakeSettings.json
|