summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@theqtcompany.com>2015-10-29 10:11:06 +0100
committerChristian Kandeler <christian.kandeler@theqtcompany.com>2015-10-29 11:22:37 +0000
commit94aaf3b94f9a9d8975349d75966917b4a8e0a439 (patch)
treedf63f9735f02b55f58b32921ce476a68892b0394
parent9bbbf55ea6d1e80871ab810eebaeaf377bc0aad0 (diff)
downloadqbs-94aaf3b94f9a9d8975349d75966917b4a8e0a439.tar.gz
Change tracker: Add workaround for benchmarking problem.
valgrind inserts LD_PRELOAD into the environment, screwing up our null build benchmark. Work around that. Change-Id: I3acf2e19a9d5a1f9b2bdfdbd044a7dd8ef64574c Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
-rw-r--r--src/lib/corelib/buildgraph/buildgraphloader.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/corelib/buildgraph/buildgraphloader.cpp b/src/lib/corelib/buildgraph/buildgraphloader.cpp
index bf9f5e534..2f94dace9 100644
--- a/src/lib/corelib/buildgraph/buildgraphloader.cpp
+++ b/src/lib/corelib/buildgraph/buildgraphloader.cpp
@@ -335,7 +335,15 @@ void BuildGraphLoader::trackProjectChanges()
bool BuildGraphLoader::hasEnvironmentChanged(const TopLevelProjectConstPtr &restoredProject) const
{
- if (m_environment != restoredProject->environment) {
+ QProcessEnvironment oldEnv = restoredProject->environment;
+ QProcessEnvironment newEnv = m_environment;
+
+ // HACK. Valgrind screws up our null-build benchmarker otherwise.
+ // TODO: Think about a (module-provided) whitelist.
+ oldEnv.remove(QLatin1String("LD_PRELOAD"));
+ newEnv.remove(QLatin1String("LD_PRELOAD"));
+
+ if (oldEnv != newEnv) {
m_logger.qbsDebug() << "Set of environment variables changed. Must re-resolve project.";
m_logger.qbsTrace() << "old: " << restoredProject->environment.toStringList() << "\nnew:"
<< m_environment.toStringList();