mesa_test 1.1.8 → 1.1.9
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 +52 -49
- data/lib/mesa_test.rb +13 -13
- 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: b1bc3ecd06c1d2cc95d041b7171dc9c6cda0ccb6536beec798f3969b8f8aa87d
|
4
|
+
data.tar.gz: 4c0109db46572db7e9dc3d2f2aa0dda259b21ba5049448874d5a0d1ec7a85d6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f28bd6704f63e5e37c9fc1bf253458012587febf4c11278e143ec2edf10d826d4c37a183cf0a870c6e92419c2145509407cc3cee37136ee43b02035d7f6254d0
|
7
|
+
data.tar.gz: 92055286204281167d4655278e9b36c35c4bc1c4de04fb8e41180d19cbc21d71f4b50d5f2489628068ffc79bf1fb0794e164b4f6dcdadac2ad46e31cf34c98d8
|
data/bin/mesa_test
CHANGED
@@ -57,29 +57,31 @@ class MesaTest < Thor
|
|
57
57
|
mod: options[:module].downcase.to_sym,
|
58
58
|
github_protocol: s.github_protocol
|
59
59
|
)
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
60
|
+
m.with_mesa_dir do
|
61
|
+
if test_case_name
|
62
|
+
# only testing one test case
|
63
|
+
t = create_and_check_test_case(mesa: m, test_case_name: test_case_name,
|
64
|
+
mod: options[:module].downcase.to_sym)
|
65
|
+
|
66
|
+
# run test
|
67
|
+
t.do_one
|
68
|
+
|
69
|
+
# bail out if not submitting
|
70
|
+
return unless options[:submit]
|
71
|
+
|
72
|
+
# submit results
|
73
|
+
shell.say 'Submitting results to ' + s.base_uri + '... ', :blue
|
74
|
+
s.submit_instance(m, t, force_logs: options['force-logs'])
|
75
|
+
else
|
76
|
+
# run all tests
|
77
|
+
m.each_test_run(mod: options[:module].downcase.to_sym)
|
78
|
+
|
79
|
+
# bail out if not submitting
|
80
|
+
return unless options[:submit]
|
81
|
+
|
82
|
+
shell.say 'Submitting results to ' + s.base_uri + '... ', :blue
|
83
|
+
s.submit_commit(m, force_logs: options['force-logs'])
|
84
|
+
end
|
83
85
|
end
|
84
86
|
shell.say "Done.\n", :green
|
85
87
|
end
|
@@ -123,31 +125,32 @@ class MesaTest < Thor
|
|
123
125
|
|
124
126
|
# default value for now; might change to false if we have a bad
|
125
127
|
# installation or if a test case is specified
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
128
|
+
m.with_mesa_dir do
|
129
|
+
if test_case_name
|
130
|
+
# just submitting one test case.
|
131
|
+
# this is not an empty submission since there is one test case (the
|
132
|
+
# +empty+ option is ignored in this case)
|
133
|
+
|
134
|
+
t = create_and_check_test_case(mesa: m, test_case_name: test_case_name,
|
135
|
+
mod: options[:module].downcase.to_sym)
|
136
|
+
# submit results
|
137
|
+
shell.say 'Submitting results to ' + s.base_uri + '... ', :blue
|
138
|
+
s.submit_instance(m, t, force_logs: options['force-logs'])
|
139
|
+
shell.say "Done.\n", :green
|
140
|
+
else
|
141
|
+
# submitting compilation information and either all tests (entire) or
|
142
|
+
# no tests (empty)
|
143
|
+
begin
|
144
|
+
m.check_installation
|
145
|
+
rescue MesaDirError
|
146
|
+
shell.say %q{This MESA installation doesn't seem to be compiled } \
|
147
|
+
'properly. Attempting to submit a compilation failure to '\
|
148
|
+
'MESATestHub.', :red
|
149
|
+
empty = true
|
150
|
+
ensure
|
151
|
+
# submit all tests
|
152
|
+
s.submit_commit(m, empty: empty, force_logs: options['force-logs'])
|
153
|
+
end
|
151
154
|
end
|
152
155
|
end
|
153
156
|
end
|
@@ -298,7 +301,7 @@ class MesaTest < Thor
|
|
298
301
|
|
299
302
|
# run all tests. Don't be fooled, whether or not a diff happens is set
|
300
303
|
# by the diff attribute of the mesa object, set above.
|
301
|
-
m.each_test_run(mod: options[:module].downcase.to_sym)
|
304
|
+
m.with_mesa_dir { m.each_test_run(mod: options[:module].downcase.to_sym) }
|
302
305
|
ensure
|
303
306
|
# submit all commit and test data
|
304
307
|
successfully_submitted = false
|
data/lib/mesa_test.rb
CHANGED
@@ -609,11 +609,11 @@ class Mesa
|
|
609
609
|
end
|
610
610
|
end
|
611
611
|
|
612
|
-
update_mirror
|
613
|
-
|
614
612
|
# ensure "work" directory is removed from worktree
|
615
613
|
remove
|
616
614
|
|
615
|
+
update_mirror
|
616
|
+
|
617
617
|
# create "work" directory with proper commit
|
618
618
|
shell.say "\nSetting up worktree repo...", :blue
|
619
619
|
FileUtils.mkdir_p mesa_dir
|
@@ -813,16 +813,6 @@ class Mesa
|
|
813
813
|
File.exist? File.join(mesa_dir, 'testhub.yml')
|
814
814
|
end
|
815
815
|
|
816
|
-
private
|
817
|
-
|
818
|
-
# verify that mesa_dir is valid by checking for existence of test_suite
|
819
|
-
# directory for each module (somewhat arbitrary)
|
820
|
-
def check_mesa_dir
|
821
|
-
MesaTestCase.modules.inject(true) do |res, mod|
|
822
|
-
res && dir_or_symlink_exists?(test_suite_dir(mod: mod))
|
823
|
-
end
|
824
|
-
end
|
825
|
-
|
826
816
|
# change MESA_DIR for the execution of the block and then revert to the
|
827
817
|
# original value
|
828
818
|
def with_mesa_dir
|
@@ -830,7 +820,7 @@ class Mesa
|
|
830
820
|
orig_mesa_dir = ENV['MESA_DIR']
|
831
821
|
ENV['MESA_DIR'] = mesa_dir
|
832
822
|
shell.say "Temporarily changed MESA_DIR to #{ENV['MESA_DIR']}.", :blue
|
833
|
-
|
823
|
+
|
834
824
|
# do the stuff
|
835
825
|
begin
|
836
826
|
yield
|
@@ -841,6 +831,16 @@ class Mesa
|
|
841
831
|
end
|
842
832
|
end
|
843
833
|
|
834
|
+
private
|
835
|
+
|
836
|
+
# verify that mesa_dir is valid by checking for existence of test_suite
|
837
|
+
# directory for each module (somewhat arbitrary)
|
838
|
+
def check_mesa_dir
|
839
|
+
MesaTestCase.modules.inject(true) do |res, mod|
|
840
|
+
res && dir_or_symlink_exists?(test_suite_dir(mod: mod))
|
841
|
+
end
|
842
|
+
end
|
843
|
+
|
844
844
|
def all_names_ordered(mod: :all)
|
845
845
|
load_test_source_data unless @names_to_numbers
|
846
846
|
if mod == :all
|
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.1.
|
4
|
+
version: 1.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: 2022-
|
11
|
+
date: 2022-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|