mesa_test 0.2.0 → 0.2.1
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/mesa_test.rb +33 -3
- 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: e39eda31af33458a33b066006203290ebe1c7b51daf79b8347bda4da7a28b5c9
|
4
|
+
data.tar.gz: 2a5d0c0ccb199c0be121b0614e5ea28252d5802affa1d26def601433df125fd9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 140d12aeeb0211108a56c52f537811ac46cba6c3792599ab76a33a536d575951b1d4d1b2b86d9ae37eb2055dc2eae3123ece53b4bd176f76f8176fa661a32b60
|
7
|
+
data.tar.gz: bd83ecabec1798df5e2142d8e5381f8d0fc559671e9b84913362e66b70b2b81b82ce6a97f27ca5371444aa0643fa96d67ac8ac7262dc40dd0fda1236986a8d24
|
data/lib/mesa_test.rb
CHANGED
@@ -252,6 +252,7 @@ e-mail and password will be stored in plain text.'
|
|
252
252
|
steps: test_case.steps,
|
253
253
|
retries: test_case.retries,
|
254
254
|
backups: test_case.backups,
|
255
|
+
diff: test_case.diff,
|
255
256
|
summary_text: test_case.summary_text
|
256
257
|
}
|
257
258
|
|
@@ -306,6 +307,7 @@ e-mail and password will be stored in plain text.'
|
|
306
307
|
steps: test_case.steps,
|
307
308
|
retries: test_case.retries,
|
308
309
|
backups: test_case.backups,
|
310
|
+
diff: test_case.diff,
|
309
311
|
summary_text: test_case.summary_text
|
310
312
|
},
|
311
313
|
extra: { test_case: test_name, mod: mod }
|
@@ -895,7 +897,7 @@ class MesaTestCase
|
|
895
897
|
:failure_msg, :success_msg, :photo, :runtime_seconds,
|
896
898
|
:test_omp_num_threads, :mesa_version, :shell, :mod, :retries,
|
897
899
|
:backups, :steps, :runtime_minutes, :summary_text, :compiler,
|
898
|
-
:compiler_version
|
900
|
+
:compiler_version, :diff
|
899
901
|
attr_accessor :data_names, :data_types, :failure_type, :success_type,
|
900
902
|
:outcome
|
901
903
|
|
@@ -921,7 +923,13 @@ class MesaTestCase
|
|
921
923
|
@retries = 0
|
922
924
|
@backups = 0
|
923
925
|
@steps = 0
|
924
|
-
|
926
|
+
# 2 (default) means uknown. Updated by running or loading data.
|
927
|
+
# 1 means did diffs (not update_checksums; like each_test_run_and_diff)
|
928
|
+
# 0 means no diffs (update_checksums; like each_test_run)
|
929
|
+
@diff = 2
|
930
|
+
|
931
|
+
# note: this gets overridden for new runs, so this is probably irrelevant
|
932
|
+
@summary_text = nil
|
925
933
|
|
926
934
|
# this overrides the submitters choice if it is non-nil
|
927
935
|
@compiler = mesa.using_sdk ? 'SDK' : nil
|
@@ -935,6 +943,8 @@ class MesaTestCase
|
|
935
943
|
@mod = mod
|
936
944
|
@failure_msg = {
|
937
945
|
run_test_string: "#{test_name} run failed: does not match test string",
|
946
|
+
final_model: "#{test_name} run failed: final model #{final_model} not " \
|
947
|
+
'made.',
|
938
948
|
run_checksum: "#{test_name} run failed: checksum for #{final_model} " \
|
939
949
|
'does not match after ./rn',
|
940
950
|
run_diff: "#{test_name} run failed: diff #{final_model} " \
|
@@ -1079,6 +1089,7 @@ class MesaTestCase
|
|
1079
1089
|
'retries' => retries,
|
1080
1090
|
'backups' => backups,
|
1081
1091
|
'steps' => steps,
|
1092
|
+
'diff' => diff,
|
1082
1093
|
'summary_text' => summary_text
|
1083
1094
|
}
|
1084
1095
|
if compiler == 'SDK'
|
@@ -1110,8 +1121,10 @@ class MesaTestCase
|
|
1110
1121
|
@retries = data['retries'] || @retries
|
1111
1122
|
@backups = data['backups'] || @backups
|
1112
1123
|
@steps = data['steps'] || @steps
|
1124
|
+
@diff = data['diff'] || @diff
|
1113
1125
|
@summary_text = data['summary_text'] || @summary_text
|
1114
1126
|
@compiler = data['compiler'] || @compiler
|
1127
|
+
|
1115
1128
|
@compiler_version = data['compiler_version'] || @compiler_version
|
1116
1129
|
|
1117
1130
|
# convert select data to symbols since that is how they are used
|
@@ -1250,6 +1263,9 @@ class MesaTestCase
|
|
1250
1263
|
# display runtime message
|
1251
1264
|
puts IO.readlines('out.txt').select { |line| line.scan(/runtime/i) }[-1]
|
1252
1265
|
|
1266
|
+
# there's supposed to be a final model; check that it exists first
|
1267
|
+
return fail_test(:final_model) unless File.exist?(final_model)
|
1268
|
+
|
1253
1269
|
# update checksums
|
1254
1270
|
#
|
1255
1271
|
# if this is true, behave like each_test_run. update the checksum
|
@@ -1258,6 +1274,7 @@ class MesaTestCase
|
|
1258
1274
|
# if this is false, behave like each_test_run_and_diff. assume
|
1259
1275
|
# the checksum is up-to-date and check it matches after rn and re.
|
1260
1276
|
if @mesa.update_checksums
|
1277
|
+
@diff = 0 # this means no diffs run
|
1261
1278
|
puts "md5sum \"#{final_model}\" > checks.md5"
|
1262
1279
|
bash_execute("md5sum \"#{final_model}\" > checks.md5")
|
1263
1280
|
FileUtils.cp final_model, 'final_check.mod'
|
@@ -1269,6 +1286,7 @@ class MesaTestCase
|
|
1269
1286
|
end
|
1270
1287
|
|
1271
1288
|
# check that final model matches
|
1289
|
+
@diff = 1 # this means diffs were run
|
1272
1290
|
puts './ck >& final_check_diff.txt'
|
1273
1291
|
return fail_test(:run_checksum) unless
|
1274
1292
|
bash_execute('./ck >& final_check_diff.txt')
|
@@ -1284,7 +1302,8 @@ class MesaTestCase
|
|
1284
1302
|
|
1285
1303
|
# check that photo file actually exists
|
1286
1304
|
unless File.exist?(File.join('photos', photo)) ||
|
1287
|
-
File.exist?(File.join('photos1', photo))
|
1305
|
+
File.exist?(File.join('photos1', photo)) ||
|
1306
|
+
File.exist?(File.join('photos', "b_#{photo}"))
|
1288
1307
|
return fail_test(:photo_file)
|
1289
1308
|
end
|
1290
1309
|
|
@@ -1408,6 +1427,17 @@ class MesaTestCase
|
|
1408
1427
|
end
|
1409
1428
|
|
1410
1429
|
def get_summary_text
|
1430
|
+
# original plan was to include diff data in summary text... now it's just
|
1431
|
+
# part of the test_instance object and is submitted as an integer
|
1432
|
+
# res = case diff
|
1433
|
+
# when 0
|
1434
|
+
# "No Diff\n"
|
1435
|
+
# when 1
|
1436
|
+
# "Diff\n"
|
1437
|
+
# else
|
1438
|
+
# "Ambiguous Diff\n"
|
1439
|
+
# end
|
1440
|
+
# res +
|
1411
1441
|
IO.readlines(out_file).select do |line|
|
1412
1442
|
line =~ /^\s*runtime/
|
1413
1443
|
end.join
|
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.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Wolf
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03-
|
11
|
+
date: 2018-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|