mesa_test 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/mesa_test +16 -9
- data/lib/mesa_test.rb +1 -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: 4400ba9260e7fb896e1ae980fb7a8795b5efeaec672fcea5ce108eed8ae8a355
|
4
|
+
data.tar.gz: 60c95a170bfbdbafa537dc99bf7dc23822ea6a5dbea1093ede0d46e6d7ae19aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 938faed6625333b5890428d47495b0039b5a17bdaf09cdc703d38a4d07a1403c9f28d8a9fb98b360f9b9d5d32d48510d367b8c64381ef723ec58eb23550e72c7
|
7
|
+
data.tar.gz: b401ff50c34c01cda33f43fa5e3c5b88808f80ed6aaabd2300f2af15d7ac364dfb71f5880cf02ee9512f78e0967b34447ea98de304106eea2558bd0d8891e687
|
data/bin/mesa_test
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
#! /usr/bin/env ruby
|
2
2
|
|
3
|
-
# if
|
4
|
-
# rather than system version
|
3
|
+
# if :development, submit cases to localhost:3000 and load local mesa_test library
|
4
|
+
# rather than system version and run out of local lib, not installed
|
5
|
+
# if :staging, submit to beta version and run out of local lib, not installed
|
6
|
+
# anything else: trust rubygems to get lib and submit to real deal testhub
|
5
7
|
MODE = :production
|
6
8
|
|
7
9
|
case MODE
|
@@ -67,7 +69,6 @@ class MesaTest < Thor
|
|
67
69
|
# submit results
|
68
70
|
shell.say 'Submitting results to ' + s.base_uri + '... ', :blue
|
69
71
|
s.submit_instance(m, t)
|
70
|
-
shell.say "Done.\n", :green
|
71
72
|
else
|
72
73
|
# run all tests
|
73
74
|
m.each_test_run(mod: options[:module].downcase.to_sym)
|
@@ -77,8 +78,8 @@ class MesaTest < Thor
|
|
77
78
|
|
78
79
|
shell.say 'Submitting results to ' + s.base_uri + '... ', :blue
|
79
80
|
s.submit_commit(m)
|
80
|
-
shell.say "Done.\n", :green
|
81
81
|
end
|
82
|
+
shell.say "Done.\n", :green
|
82
83
|
end
|
83
84
|
|
84
85
|
desc 'submit [TEST CASE]', 'submit a test case or commit'
|
@@ -146,18 +147,20 @@ class MesaTest < Thor
|
|
146
147
|
end
|
147
148
|
end
|
148
149
|
|
149
|
-
desc 'checkout SHA', 'checkout a commit'
|
150
|
+
desc 'checkout [SHA]', 'checkout a commit'
|
150
151
|
long_desc <<-LONGDESC
|
151
152
|
Checks out a particular commit to default mesa directory (mesa_work in
|
152
153
|
.mesa_test.yml). Uses git worktree magic to avoid re-downloading all of
|
153
154
|
mesa history if a mirror repo is already set up. Does not affect the
|
154
155
|
user's MESA_DIR or other environment variables.
|
156
|
+
|
157
|
+
If no sha is provided, defaults to main (if checkout is occuring).
|
155
158
|
LONGDESC
|
156
159
|
|
157
160
|
option :mesadir, desc: 'Location of mesa dir, if not relying on config data',
|
158
161
|
type: :string
|
159
162
|
|
160
|
-
def checkout(sha)
|
163
|
+
def checkout(sha = 'main')
|
161
164
|
# assuming config wizard has already been set (perhaps a little reckless)
|
162
165
|
# so that we can get at the work directory and mirror directory
|
163
166
|
s = create_submitter(force: true)
|
@@ -177,7 +180,7 @@ class MesaTest < Thor
|
|
177
180
|
set up prior. Does not affect the user's MESA_DIR or other environment
|
178
181
|
variables outside of execution.
|
179
182
|
|
180
|
-
If no sha is provided, defaults to
|
183
|
+
If no sha is provided, defaults to main (if checkout is occuring). SHA is
|
181
184
|
ignored if using option --no-checkout
|
182
185
|
LONGDESC
|
183
186
|
|
@@ -187,7 +190,7 @@ class MesaTest < Thor
|
|
187
190
|
option :mesadir, desc: 'Location of mesa dir, if not relying on config data',
|
188
191
|
type: :string
|
189
192
|
|
190
|
-
def install(sha = '
|
193
|
+
def install(sha = 'main')
|
191
194
|
# assuming config wizard has already been set (perhaps a little reckless)
|
192
195
|
# so that we can get at the work directory and mirror directory
|
193
196
|
s = create_submitter(force: true)
|
@@ -226,6 +229,10 @@ class MesaTest < Thor
|
|
226
229
|
followed by
|
227
230
|
|
228
231
|
`mesa_test test`
|
232
|
+
|
233
|
+
If no sha is provided, defaults to main (if checkout is occuring). SHA is
|
234
|
+
ignored if using option --no-checkout
|
235
|
+
|
229
236
|
LONGDESC
|
230
237
|
|
231
238
|
option :checkout, desc: 'Whether a checkout needs to happen. Use '\
|
@@ -244,7 +251,7 @@ class MesaTest < Thor
|
|
244
251
|
option :destroy, type: :boolean, desc: 'Delete mesa installation upon ' \
|
245
252
|
'submission of complete results.', default: false
|
246
253
|
|
247
|
-
def install_and_test(sha)
|
254
|
+
def install_and_test(sha='main')
|
248
255
|
s = if options[:submit]
|
249
256
|
create_and_check_submitter(force: options[:force])
|
250
257
|
else
|
data/lib/mesa_test.rb
CHANGED
@@ -13,7 +13,6 @@ TestCaseDirError = Class.new(StandardError)
|
|
13
13
|
InvalidDataType = Class.new(StandardError)
|
14
14
|
GitHubError = Class.new(StandardError)
|
15
15
|
|
16
|
-
DEFAULT_REVISION = 10_000
|
17
16
|
GITHUB_HTTPS = 'https://github.com/MESAHub/mesa.git'.freeze
|
18
17
|
GITHUB_SSH = 'git@github.com:MESAHub/mesa.git'.freeze
|
19
18
|
|
@@ -145,7 +144,6 @@ e-mail and password will be stored in plain text.'
|
|
145
144
|
@config_file = config_file || File.join(ENV['HOME'], '.mesa_test',
|
146
145
|
'config.yml')
|
147
146
|
@base_uri = base_uri
|
148
|
-
@last_tested = last_tested || DEFAULT_REVISION
|
149
147
|
|
150
148
|
# set up thor-proof way to get responses from user. Thor hijacks the
|
151
149
|
# gets command, so we have to use its built-in "ask" method, which is
|
@@ -443,7 +441,7 @@ class Mesa
|
|
443
441
|
bash_execute(command)
|
444
442
|
|
445
443
|
raise(GitHubError, 'Error while executing the following command:'\
|
446
|
-
"#{command}. Perhaps you haven't set up
|
444
|
+
"#{command}. Perhaps you haven't set up "\
|
447
445
|
'ssh keys with your GitHub account?')
|
448
446
|
end
|
449
447
|
when :https
|
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: 1.0.
|
4
|
+
version: 1.0.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: 2020-12-
|
11
|
+
date: 2020-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|