* 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
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| AssemblyTests.cmake | Loading commit data... | |
| BUILD | Loading commit data... | |
| CMakeLists.txt | Loading commit data... | |
| basic_test.cc | Loading commit data... | |
| benchmark_test.cc | Loading commit data... | |
| clobber_memory_assembly_test.cc | Loading commit data... | |
| complexity_test.cc | Loading commit data... | |
| cxx03_test.cc | Loading commit data... | |
| diagnostics_test.cc | Loading commit data... | |
| donotoptimize_assembly_test.cc | Loading commit data... | |
| donotoptimize_test.cc | Loading commit data... | |
| filter_test.cc | Loading commit data... | |
| fixture_test.cc | Loading commit data... | |
| map_test.cc | Loading commit data... | |
| multiple_ranges_test.cc | Loading commit data... | |
| options_test.cc | Loading commit data... | |
| output_test.h | Loading commit data... | |
| output_test_helper.cc | Loading commit data... | |
| register_benchmark_test.cc | Loading commit data... | |
| reporter_output_test.cc | Loading commit data... | |
| skip_with_error_test.cc | Loading commit data... | |
| state_assembly_test.cc | Loading commit data... | |
| statistics_test.cc | Loading commit data... | |
| templated_fixture_test.cc | Loading commit data... | |
| user_counters_tabular_test.cc | Loading commit data... | |
| user_counters_test.cc | Loading commit data... |