Skip to content

Commit dd1caeb

Browse files
committed
RHELMISC-4745: Add ability to bring up previous session
Signed-off-by: Vitalii Chulak <[email protected]>
1 parent 708e002 commit dd1caeb

File tree

11 files changed

+322
-221
lines changed

11 files changed

+322
-221
lines changed

bin/auto_hck

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ module AutoHCK
99
run do
1010
cli = CLI.new
1111
cli.parse(ARGV)
12+
session_path = cli.test.latest_session ? "#{Config.read['workspace_path']}/latest" : cli.test.session
13+
14+
session = if session_path
15+
Session.load(session_path, cli.common.workspace_path)
16+
else
17+
Session.new(cli: cli)
18+
end
1219

1320
ENV.store 'LC_ALL', 'en_US.UTF-8'
1421

@@ -18,7 +25,7 @@ module AutoHCK
1825
Thread.report_on_exception = false
1926

2027
ResourceScope.open do |scope|
21-
@project = Project.new(scope, cli)
28+
@project = Project.new(scope, session)
2229
Trap.project = @project
2330
@project.run if @project.prepare
2431
rescue StandardError => e

lib/all.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ module AutoHCK
6161
autoload_relative :PhysHCK, 'setupmanagers/physhck/physhck'
6262
autoload_relative :Playlist, 'engines/hcktest/playlist'
6363
autoload_relative :Project, 'project'
64+
autoload_relative :Session, 'session'
6465
autoload_relative :QemuHCK, 'setupmanagers/qemuhck/qemuhck'
6566
autoload_relative :QemuHCKError, 'setupmanagers/qemuhck/exceptions'
6667
autoload_relative :QemuMachine, 'setupmanagers/qemuhck/qemu_machine'

0 commit comments

Comments
 (0)