mesa_test 0.1.8 → 0.1.9
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 +5 -36
- 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: 6fc6c58b9993e65c17379bd8094937644a8bf81134da39de66d03cda525d9bde
|
|
4
|
+
data.tar.gz: 89b1ed5ba1fb2341ef5abab627545c5ea56fd4a9feba32b47b160f7d233af91f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b8fabe1c51cc00f9fbe0493f4aa4d60da03624d2b2e8e084fe7236b43dac2549ff5f1dc033760add5fda5bde18445a0b08fc5ed178b65971242957560c6e6790
|
|
7
|
+
data.tar.gz: eb69d91dd90c86f9b585457f38509d3e42a9ab5536be38f0371495aca938d528ed7192e8a1c9ea10ef8282b977c767284bd308f8b9f728df34e89f9c0be43c8c
|
data/lib/mesa_test.rb
CHANGED
|
@@ -252,7 +252,6 @@ 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,
|
|
256
255
|
summary_text: test_case.summary_text
|
|
257
256
|
}
|
|
258
257
|
|
|
@@ -307,7 +306,6 @@ e-mail and password will be stored in plain text.'
|
|
|
307
306
|
steps: test_case.steps,
|
|
308
307
|
retries: test_case.retries,
|
|
309
308
|
backups: test_case.backups,
|
|
310
|
-
diff: test_case.diff,
|
|
311
309
|
summary_text: test_case.summary_text
|
|
312
310
|
},
|
|
313
311
|
extra: { test_case: test_name, mod: mod }
|
|
@@ -459,7 +457,7 @@ e-mail and password will be stored in plain text.'
|
|
|
459
457
|
end
|
|
460
458
|
|
|
461
459
|
class Mesa
|
|
462
|
-
SVN_URI = '
|
|
460
|
+
SVN_URI = 'https://subversion.assembla.com/svn/mesa\^mesa/trunk'.freeze
|
|
463
461
|
|
|
464
462
|
attr_reader :mesa_dir, :test_data, :test_names, :test_cases, :shell,
|
|
465
463
|
:svn_version, :svn_author, :svn_log, :using_sdk
|
|
@@ -469,8 +467,7 @@ class Mesa
|
|
|
469
467
|
using_sdk: true)
|
|
470
468
|
new_mesa_dir ||= File.join(ENV['HOME'], 'mesa-test-r' + version_number.to_s)
|
|
471
469
|
success = bash_execute(
|
|
472
|
-
"svn co -r #{version_number} "
|
|
473
|
-
"svn://svn.code.sf.net/p/mesa/code/trunk #{new_mesa_dir}"
|
|
470
|
+
"svn co -r #{version_number} #{SVN_URI} #{new_mesa_dir}"
|
|
474
471
|
)
|
|
475
472
|
unless success
|
|
476
473
|
raise MesaDirError, 'Encountered a problem in downloading mesa ' \
|
|
@@ -897,7 +894,7 @@ class MesaTestCase
|
|
|
897
894
|
:failure_msg, :success_msg, :photo, :runtime_seconds,
|
|
898
895
|
:test_omp_num_threads, :mesa_version, :shell, :mod, :retries,
|
|
899
896
|
:backups, :steps, :runtime_minutes, :summary_text, :compiler,
|
|
900
|
-
:compiler_version
|
|
897
|
+
:compiler_version
|
|
901
898
|
attr_accessor :data_names, :data_types, :failure_type, :success_type,
|
|
902
899
|
:outcome
|
|
903
900
|
|
|
@@ -923,13 +920,7 @@ class MesaTestCase
|
|
|
923
920
|
@retries = 0
|
|
924
921
|
@backups = 0
|
|
925
922
|
@steps = 0
|
|
926
|
-
|
|
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
|
|
923
|
+
@summary_text = ''
|
|
933
924
|
|
|
934
925
|
# this overrides the submitters choice if it is non-nil
|
|
935
926
|
@compiler = mesa.using_sdk ? 'SDK' : nil
|
|
@@ -943,8 +934,6 @@ class MesaTestCase
|
|
|
943
934
|
@mod = mod
|
|
944
935
|
@failure_msg = {
|
|
945
936
|
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.',
|
|
948
937
|
run_checksum: "#{test_name} run failed: checksum for #{final_model} " \
|
|
949
938
|
'does not match after ./rn',
|
|
950
939
|
run_diff: "#{test_name} run failed: diff #{final_model} " \
|
|
@@ -1089,7 +1078,6 @@ class MesaTestCase
|
|
|
1089
1078
|
'retries' => retries,
|
|
1090
1079
|
'backups' => backups,
|
|
1091
1080
|
'steps' => steps,
|
|
1092
|
-
'diff' => diff,
|
|
1093
1081
|
'summary_text' => summary_text
|
|
1094
1082
|
}
|
|
1095
1083
|
if compiler == 'SDK'
|
|
@@ -1121,10 +1109,8 @@ class MesaTestCase
|
|
|
1121
1109
|
@retries = data['retries'] || @retries
|
|
1122
1110
|
@backups = data['backups'] || @backups
|
|
1123
1111
|
@steps = data['steps'] || @steps
|
|
1124
|
-
@diff = data['diff'] || @diff
|
|
1125
1112
|
@summary_text = data['summary_text'] || @summary_text
|
|
1126
1113
|
@compiler = data['compiler'] || @compiler
|
|
1127
|
-
|
|
1128
1114
|
@compiler_version = data['compiler_version'] || @compiler_version
|
|
1129
1115
|
|
|
1130
1116
|
# convert select data to symbols since that is how they are used
|
|
@@ -1263,9 +1249,6 @@ class MesaTestCase
|
|
|
1263
1249
|
# display runtime message
|
|
1264
1250
|
puts IO.readlines('out.txt').select { |line| line.scan(/runtime/i) }[-1]
|
|
1265
1251
|
|
|
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
|
-
|
|
1269
1252
|
# update checksums
|
|
1270
1253
|
#
|
|
1271
1254
|
# if this is true, behave like each_test_run. update the checksum
|
|
@@ -1274,7 +1257,6 @@ class MesaTestCase
|
|
|
1274
1257
|
# if this is false, behave like each_test_run_and_diff. assume
|
|
1275
1258
|
# the checksum is up-to-date and check it matches after rn and re.
|
|
1276
1259
|
if @mesa.update_checksums
|
|
1277
|
-
@diff = 0 # this means no diffs run
|
|
1278
1260
|
puts "md5sum \"#{final_model}\" > checks.md5"
|
|
1279
1261
|
bash_execute("md5sum \"#{final_model}\" > checks.md5")
|
|
1280
1262
|
FileUtils.cp final_model, 'final_check.mod'
|
|
@@ -1286,7 +1268,6 @@ class MesaTestCase
|
|
|
1286
1268
|
end
|
|
1287
1269
|
|
|
1288
1270
|
# check that final model matches
|
|
1289
|
-
@diff = 1 # this means diffs were run
|
|
1290
1271
|
puts './ck >& final_check_diff.txt'
|
|
1291
1272
|
return fail_test(:run_checksum) unless
|
|
1292
1273
|
bash_execute('./ck >& final_check_diff.txt')
|
|
@@ -1302,8 +1283,7 @@ class MesaTestCase
|
|
|
1302
1283
|
|
|
1303
1284
|
# check that photo file actually exists
|
|
1304
1285
|
unless File.exist?(File.join('photos', photo)) ||
|
|
1305
|
-
File.exist?(File.join('photos1', photo))
|
|
1306
|
-
File.exist?(File.join('photos', "b_#{photo}"))
|
|
1286
|
+
File.exist?(File.join('photos1', photo))
|
|
1307
1287
|
return fail_test(:photo_file)
|
|
1308
1288
|
end
|
|
1309
1289
|
|
|
@@ -1427,17 +1407,6 @@ class MesaTestCase
|
|
|
1427
1407
|
end
|
|
1428
1408
|
|
|
1429
1409
|
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 +
|
|
1441
1410
|
IO.readlines(out_file).select do |line|
|
|
1442
1411
|
line =~ /^\s*runtime/
|
|
1443
1412
|
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.1.
|
|
4
|
+
version: 0.1.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- William Wolf
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2018-03-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: json
|