Bug 1451008 - Disable perfherder reporting for microbenchmarks on asan builds r?froydnj
MozReview-Commit-ID: HZLU6gsx7Sq
--- a/testing/gtest/mozilla/MozGTestBench.cpp
+++ b/testing/gtest/mozilla/MozGTestBench.cpp
@@ -13,17 +13,17 @@
#define MOZ_GTEST_NUM_ITERATIONS 5
using mozilla::TimeStamp;
namespace mozilla {
void GTestBench(const char* aSuite, const char* aName,
const std::function<void()>& aTest)
{
-#ifdef DEBUG
+#if defined(DEBUG) || defined(MOZ_ASAN)
// Run the test to make sure that it doesn't fail but don't log
// any measurements since it's not an optimized build.
aTest();
#else
bool shouldAlert = bool(getenv("PERFHERDER_ALERTING_ENABLED"));
std::vector<int> durations;
for (int i=0; i<MOZ_GTEST_NUM_ITERATIONS; i++) {