mesa_test 0.0.13 → 0.0.14
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 +22 -11
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52edc717f3e8c1322b3448c01cb323857d86a1a2
|
4
|
+
data.tar.gz: 7287c330978661cd7a4a265c24f57cb09807a340
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9424e51b29121151ad2abc2b4d8ea5969263e0785a68111755b4b9318c722fb610f790d94a948b565c528d9b12fb76bc3c904a919a3dbaa5244207d8742a7146
|
7
|
+
data.tar.gz: aa31face553ef21a787e8a0540ac67a965e670f1009093390b5f02755c080b98bc6f56eda7b75c745ac0f6476306b9975238ceda3dbc3421f35a78e1593ffbc2
|
data/lib/mesa_test.rb
CHANGED
@@ -92,6 +92,7 @@ e-mail and password will be stored in plain text.'
|
|
92
92
|
def self.new_from_config(
|
93
93
|
config_file: File.join(ENV['HOME'], '.mesa_test.yml'), force_setup: false,
|
94
94
|
base_uri: 'https://mesa-test-hub.herokuapp.com'
|
95
|
+
# base_uri: 'http://localhost:3000'
|
95
96
|
)
|
96
97
|
new_submitter = new(config_file: config_file, base_uri: base_uri)
|
97
98
|
if force_setup
|
@@ -195,9 +196,9 @@ e-mail and password will be stored in plain text.'
|
|
195
196
|
'ram_gb' => ram_gb,
|
196
197
|
'platform_version' => platform_version,
|
197
198
|
'compiler' => compiler,
|
198
|
-
'compiler_version' => compiler_version
|
199
|
+
'compiler_version' => compiler_version
|
199
200
|
}
|
200
|
-
File.open(config_file, 'w') { |f| f.write(YAML.dump(data_hash))}
|
201
|
+
File.open(config_file, 'w') { |f| f.write(YAML.dump(data_hash)) }
|
201
202
|
end
|
202
203
|
|
203
204
|
def load_computer_data
|
@@ -218,6 +219,7 @@ e-mail and password will be stored in plain text.'
|
|
218
219
|
def submit_params(test_case)
|
219
220
|
res = {
|
220
221
|
test_case: test_case.test_name,
|
222
|
+
mod: test_case.mod,
|
221
223
|
computer: computer_name,
|
222
224
|
email: email,
|
223
225
|
password: password,
|
@@ -232,19 +234,19 @@ e-mail and password will be stored in plain text.'
|
|
232
234
|
failure_type: test_case.failure_type
|
233
235
|
}
|
234
236
|
|
235
|
-
# enter in test-specific data
|
236
|
-
test_case.data_names.each do |data_name|
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
end
|
237
|
+
# enter in test-specific data, DISABLED FOR NOW
|
238
|
+
# test_case.data_names.each do |data_name|
|
239
|
+
# unless test_case.data[data_name].nil?
|
240
|
+
# res[data_name] = test_case.data[data_name]
|
241
|
+
# end
|
242
|
+
# end
|
241
243
|
res
|
242
244
|
end
|
243
245
|
|
244
246
|
def confirm_computer
|
245
247
|
uri = URI.parse(base_uri + '/check_computer.json')
|
246
248
|
https = Net::HTTP.new(uri.hostname, uri.port)
|
247
|
-
https.use_ssl =
|
249
|
+
https.use_ssl = base_uri.include? 'https'
|
248
250
|
|
249
251
|
request = Net::HTTP::Post.new(
|
250
252
|
uri, initheader = { 'Content-Type' => 'application/json' }
|
@@ -634,7 +636,7 @@ end
|
|
634
636
|
class MesaTestCase
|
635
637
|
attr_reader :test_name, :mesa_dir, :mesa, :success_string, :final_model,
|
636
638
|
:failure_msg, :success_msg, :photo, :runtime_seconds,
|
637
|
-
:test_omp_num_threads, :mesa_version, :shell
|
639
|
+
:test_omp_num_threads, :mesa_version, :shell, :mod
|
638
640
|
attr_accessor :data_names, :data_types, :failure_type, :success_type,
|
639
641
|
:outcome
|
640
642
|
|
@@ -785,6 +787,7 @@ class MesaTestCase
|
|
785
787
|
shell.say "Logging test results to #{save_file}...", :blue
|
786
788
|
res = {
|
787
789
|
'test_case' => test_name,
|
790
|
+
'module' => mod,
|
788
791
|
'runtime_seconds' => runtime_seconds,
|
789
792
|
'mesa_version' => mesa_version,
|
790
793
|
'outcome' => outcome,
|
@@ -807,6 +810,7 @@ class MesaTestCase
|
|
807
810
|
end
|
808
811
|
data = YAML.safe_load(File.read(load_file), [Symbol])
|
809
812
|
@runtime_seconds = data['runtime_seconds']
|
813
|
+
@mod = data['module']
|
810
814
|
@mesa_version = data['mesa_version']
|
811
815
|
@outcome = data['outcome'].to_sym
|
812
816
|
@test_omp_num_threads = data['omp_num_threads']
|
@@ -923,7 +927,14 @@ class MesaTestCase
|
|
923
927
|
system("md5sum \"#{final_model}\" > checks.md5")
|
924
928
|
puts "md5sum \"#{final_model}\" > checks.md5"
|
925
929
|
FileUtils.cp final_model, 'final_check.mod'
|
926
|
-
|
930
|
+
|
931
|
+
if not photo
|
932
|
+
# if there's no photo, we won't check the checksum, so we've succeeded
|
933
|
+
return succeed(:run_test_string)
|
934
|
+
else
|
935
|
+
# if there is a photo, we'll have to wait and see
|
936
|
+
return true
|
937
|
+
end
|
927
938
|
end
|
928
939
|
|
929
940
|
# check that final model matches
|
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.14
|
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-11-
|
11
|
+
date: 2017-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|