From f13e3adf99ebe72f3bb323ebed985c2ddd9d672c Mon Sep 17 00:00:00 2001
From: Marc Bonnici <marc.bonnici@arm.com>
Date: Thu, 24 May 2018 14:17:26 +0100
Subject: [PATCH] framework/execution: Fix previous/next job

The next and previous job attribute implementations of context were
swapped.
---
 wa/framework/execution.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/wa/framework/execution.py b/wa/framework/execution.py
index 959f183f..d4502254 100644
--- a/wa/framework/execution.py
+++ b/wa/framework/execution.py
@@ -39,16 +39,16 @@ class ExecutionContext(object):
 
     @property
     def previous_job(self):
-        if not self.job_queue:
-            return None
-        return self.job_queue[0]
-
-    @property
-    def next_job(self):
         if not self.completed_jobs:
             return None
         return self.completed_jobs[-1]
 
+    @property
+    def next_job(self):
+        if not self.job_queue:
+            return None
+        return self.job_queue[0]
+
     @property
     def spec_changed(self):
         if self.previous_job is None and self.current_job is not None:  # Start of run