From fbfd81caeb89f56333791b87b2a443227d17f962 Mon Sep 17 00:00:00 2001
From: Marc Bonnici <marc.bonnici@arm.com>
Date: Thu, 19 Jul 2018 11:13:25 +0100
Subject: [PATCH] commands/revent: Fix missing target initialization

In commit 8da911 the initialization of the target was split into a
separate method of the TargetManger. Ensure that we call the relevant
 method after creating the manager.
---
 wa/commands/revent.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/wa/commands/revent.py b/wa/commands/revent.py
index e906cb6e..08aacea2 100644
--- a/wa/commands/revent.py
+++ b/wa/commands/revent.py
@@ -120,6 +120,7 @@ class RecordCommand(Command):
             outdir = os.getcwd()
 
         self.tm = TargetManager(device, device_config, outdir)
+        self.tm.initialize()
         self.target = self.tm.target
         self.revent_recorder = ReventRecorder(self.target)
         self.revent_recorder.deploy()
@@ -261,6 +262,7 @@ class ReplayCommand(Command):
             device_config = state.run_config.device_config or {}
 
         target_manager = TargetManager(device, device_config, None)
+        target_manager.initialize()
         self.target = target_manager.target
         revent_file = self.target.path.join(self.target.working_directory,
                                             os.path.split(args.recording)[1])