mesa_test 0.0.22 → 0.0.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/mesa_test.rb +22 -10
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 4650589266dbd4161ab32ec06d0f0b6bd91d8049
|
4
|
+
data.tar.gz: 80f6e9d53cd0ff16cd2550b062210df8b96e4e71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2b176991f1dcbffe0d6d06e7a6a0c4dd503f043d828890872d17e426dbf84d9dd65036e824d68d697ff513117330a3001cb01901280a3c615fddd883d91a416
|
7
|
+
data.tar.gz: 30c7656ba1859c7dbb805e4221207d75daeaafac7edc5d8ccd83b92daa0bbd87259317f1984014cf36f9f69462a5e81a1efa656bee943fea1a1af0dc873b1496
|
data/lib/mesa_test.rb
CHANGED
@@ -511,7 +511,9 @@ class Mesa
|
|
511
511
|
end
|
512
512
|
|
513
513
|
def initialize(mesa_dir: ENV['MESA_DIR'], use_svn: true)
|
514
|
-
|
514
|
+
# absolute_path ensures that it doesn't matter where commands are executed
|
515
|
+
# from
|
516
|
+
@mesa_dir = File.absolute_path(mesa_dir)
|
515
517
|
@use_svn = use_svn
|
516
518
|
@update_checksums = false
|
517
519
|
|
@@ -1051,12 +1053,18 @@ class MesaTestCase
|
|
1051
1053
|
end
|
1052
1054
|
|
1053
1055
|
def load_summary_data
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1056
|
+
begin
|
1057
|
+
out_data = parse_out
|
1058
|
+
@summary_text = get_summary_text
|
1059
|
+
rescue Errno::ENOENT
|
1060
|
+
shell.say "\nError loading data from #{out_file}. No summary data "\
|
1061
|
+
'loaded. Proceeding anyway.', :red
|
1062
|
+
else
|
1063
|
+
@runtime_minutes = out_data[:runtime_minutes]
|
1064
|
+
@retries = out_data[:retries]
|
1065
|
+
@backups = out_data[:backups]
|
1066
|
+
@steps = out_data[:steps]
|
1067
|
+
end
|
1060
1068
|
end
|
1061
1069
|
|
1062
1070
|
def parse_out
|
@@ -1244,7 +1252,7 @@ class MesaTestCase
|
|
1244
1252
|
check_restart if check_run
|
1245
1253
|
|
1246
1254
|
# get reported runtime, retries, backups, and steps
|
1247
|
-
load_summary_data
|
1255
|
+
load_summary_data if File.exist?(out_file)
|
1248
1256
|
end
|
1249
1257
|
|
1250
1258
|
# append contents of err.txt to end of out.txt, then delete err.txt
|
@@ -1291,10 +1299,14 @@ class MesaTestCase
|
|
1291
1299
|
FileUtils.rm(final_model)
|
1292
1300
|
end
|
1293
1301
|
|
1302
|
+
def out_file
|
1303
|
+
File.join(test_case_dir, 'out.txt')
|
1304
|
+
end
|
1305
|
+
|
1294
1306
|
# helpers for getting run summaries
|
1295
1307
|
def run_summaries
|
1296
1308
|
# look at all lines in out.txt
|
1297
|
-
lines = IO.readlines(
|
1309
|
+
lines = IO.readlines(out_file)
|
1298
1310
|
|
1299
1311
|
# find lines with summary information
|
1300
1312
|
summary_line_numbers = []
|
@@ -1322,7 +1334,7 @@ class MesaTestCase
|
|
1322
1334
|
end
|
1323
1335
|
|
1324
1336
|
def get_summary_text
|
1325
|
-
lines = IO.readlines(
|
1337
|
+
lines = IO.readlines(out_file).select do |line|
|
1326
1338
|
line =~ /^\s*runtime/
|
1327
1339
|
end.join
|
1328
1340
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mesa_test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.23
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Wolf
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
82
|
version: '0'
|
83
83
|
requirements: []
|
84
84
|
rubyforge_project:
|
85
|
-
rubygems_version: 2.
|
85
|
+
rubygems_version: 2.6.14
|
86
86
|
signing_key:
|
87
87
|
specification_version: 4
|
88
88
|
summary: Command line tool for running and reporting the MESA test suites.
|