diff options
author | Christian Kandeler <christian.kandeler@digia.com> | 2014-01-17 10:26:08 +0100 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2014-01-17 10:42:35 +0100 |
commit | 8ae6b0c7115033fb957dc5cfca97da525dc0182a (patch) | |
tree | 4e798b8072d3891fe7ee932cba56527068f67444 /src/lib/api/internaljobs.cpp | |
parent | 36b39085f0ad49b6fd35e7ac11c196b26cca6723 (diff) |
Tighten sanity checks, part XXXIII.
- Check whether the artifacts in a child list actually appears in their
products' artifact list.
- Do sanity checking right before storing the build graph. This makes
sure that a corrupted build graph never gets written to disk.
Change-Id: I06b02b97c3621ecdc1f6dae8e6ce818519f9736e
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/lib/api/internaljobs.cpp')
-rw-r--r-- | src/lib/api/internaljobs.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/api/internaljobs.cpp b/src/lib/api/internaljobs.cpp index e0b0afa0a..7a16ff2ad 100644 --- a/src/lib/api/internaljobs.cpp +++ b/src/lib/api/internaljobs.cpp @@ -31,6 +31,7 @@ #include "jobs.h" #include <buildgraph/artifactcleaner.h> +#include <buildgraph/buildgraph.h> #include <buildgraph/buildgraphloader.h> #include <buildgraph/productbuilddata.h> #include <buildgraph/projectbuilddata.h> @@ -132,9 +133,10 @@ void InternalJob::shareObserverWith(InternalJob *otherJob) m_observer = otherJob->m_observer; } -void InternalJob::storeBuildGraph(const TopLevelProjectConstPtr &project) +void InternalJob::storeBuildGraph(const TopLevelProjectPtr &project) { try { + doSanityChecks(project, logger()); project->store(logger()); } catch (const ErrorInfo &error) { logger().printWarning(error); |