modsvaskr 0.1.2 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/modsvaskr/in_game_tests_runner.rb +23 -14
- data/lib/modsvaskr/tests_runner.rb +3 -2
- data/lib/modsvaskr/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd6d0c139d7abd4ebc630cb1704182149bfae4213fa5bf44d8befee491c87606
|
4
|
+
data.tar.gz: 4f5c1ef541e86c57093ac8633190fd473aa61d66cfff5d4454d5db691f570f03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 112d6f09e79b130dd9db2b561848dbabdbd3e771faf791d71b54a53ac09bb8928d70f6f50c0e1586689ad3519b7795e6fe16e980d3f3340da83aa702a4f0300d
|
7
|
+
data.tar.gz: b5531b0ecadc34ad551e874a2ac26b7a21a7698a5ceed70f9d182e32c94beb2943eb7e58d73c5004994f9c358ff207a7b94af02c12a30b866287e564414f0cba
|
@@ -3,6 +3,7 @@ require 'elder_scrolls_plugin'
|
|
3
3
|
require 'fileutils'
|
4
4
|
require 'json'
|
5
5
|
require 'time'
|
6
|
+
require 'timeout'
|
6
7
|
require 'modsvaskr/tests_suite'
|
7
8
|
|
8
9
|
module Modsvaskr
|
@@ -66,8 +67,14 @@ module Modsvaskr
|
|
66
67
|
}
|
67
68
|
)
|
68
69
|
)
|
69
|
-
# Clear the AutoTest test statuses
|
70
|
-
|
70
|
+
# Clear the AutoTest test statuses that we are going to run
|
71
|
+
statuses_file = "#{@game.path}/Data/SKSE/Plugins/StorageUtilData/AutoTest_#{tests_suite}_Statuses.json"
|
72
|
+
if File.exist?(statuses_file)
|
73
|
+
File.write(
|
74
|
+
statuses_file,
|
75
|
+
JSON.pretty_generate('string' => JSON.parse(File.read(statuses_file))['string'].delete_if { |test_name, _test_status| tests.include?(test_name) })
|
76
|
+
)
|
77
|
+
end
|
71
78
|
end
|
72
79
|
auto_test_config_file = "#{@game.path}/Data/SKSE/Plugins/StorageUtilData/AutoTest_Config.json"
|
73
80
|
# Write the JSON file that contains the configuration of the AutoTest tests runner
|
@@ -204,21 +211,23 @@ module Modsvaskr
|
|
204
211
|
end
|
205
212
|
end
|
206
213
|
# We will start again. Leave some time to interrupt if we want.
|
207
|
-
|
214
|
+
if @config.no_prompt
|
215
|
+
out 'Start again automatically as no_prompt has been set.'
|
216
|
+
else
|
208
217
|
# First, flush stdin of any pending character
|
209
218
|
$stdin.getc while !select([$stdin], nil, nil, 2).nil?
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
Timeout
|
215
|
-
|
216
|
-
|
219
|
+
out "We are going to start again in #{@game.timeout_interrupt_tests_secs} seconds. Press Enter now to interrupt it."
|
220
|
+
key_pressed =
|
221
|
+
begin
|
222
|
+
Timeout.timeout(@game.timeout_interrupt_tests_secs) { $stdin.gets }
|
223
|
+
rescue Timeout::Error
|
224
|
+
nil
|
225
|
+
end
|
226
|
+
if key_pressed
|
227
|
+
log "[ In-game testing #{@game.name} ] - Run interrupted by user."
|
228
|
+
# TODO: Remove AutoTest start on load: it has been interrupted by the user, so we should not keep it in case the user launches the game by itself.
|
229
|
+
break
|
217
230
|
end
|
218
|
-
if key_pressed
|
219
|
-
log "[ In-game testing #{@game.name} ] - Run interrupted by user."
|
220
|
-
# TODO: Remove AutoTest start on load: it has been interrupted by the user, so we should not keep it in case the user launches the game by itself.
|
221
|
-
break
|
222
231
|
end
|
223
232
|
end
|
224
233
|
end
|
@@ -131,14 +131,15 @@ module Modsvaskr
|
|
131
131
|
in_game_tests.each do |tests_suite, selected_tests|
|
132
132
|
in_game_tests_to_subscribe = @tests_suites[tests_suite].in_game_tests_for(selected_tests)
|
133
133
|
in_game_tests_to_subscribe.each do |in_game_tests_suite, selected_in_game_tests|
|
134
|
+
selected_in_game_tests_downcase = selected_in_game_tests.map(&:downcase)
|
134
135
|
in_game_tests_subscriptions[in_game_tests_suite] = [] unless in_game_tests_subscriptions.key?(in_game_tests_suite)
|
135
136
|
in_game_tests_subscriptions[in_game_tests_suite] << {
|
136
137
|
tests_suite: tests_suite,
|
137
|
-
in_game_tests:
|
138
|
+
in_game_tests: selected_in_game_tests_downcase,
|
138
139
|
selected_tests: selected_tests
|
139
140
|
}
|
140
141
|
merged_in_game_tests[in_game_tests_suite] = [] unless merged_in_game_tests.key?(in_game_tests_suite)
|
141
|
-
merged_in_game_tests[in_game_tests_suite] = (merged_in_game_tests[in_game_tests_suite] +
|
142
|
+
merged_in_game_tests[in_game_tests_suite] = (merged_in_game_tests[in_game_tests_suite] + selected_in_game_tests_downcase).uniq
|
142
143
|
end
|
143
144
|
end
|
144
145
|
in_game_tests_runner = InGameTestsRunner.new(@config, @game)
|
data/lib/modsvaskr/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: modsvaskr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Muriel Salvan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: curses_menu
|