cosmos 3.4.1 → 3.4.2
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/.gitattributes +1 -0
- data/autohotkey/tools/OpenGLBuilderAHK +4 -0
- data/autohotkey/tools/TlmViewerAHK2 +4 -0
- data/autohotkey/tools/TlmViewerAHK3 +5 -0
- data/autohotkey/tools/TlmViewerAHK4 +4 -0
- data/autohotkey/tools/packet_viewer.ahk +13 -7
- data/autohotkey/tools/script_runner2.ahk +4 -0
- data/cosmos.gemspec +1 -1
- data/data/crc.txt +9 -9
- data/lib/cosmos/gui/choosers/integer_chooser.rb +1 -1
- data/lib/cosmos/gui/choosers/telemetry_chooser.rb +33 -22
- data/lib/cosmos/gui/utilities/script_module_gui.rb +3 -3
- data/lib/cosmos/tools/test_runner/test.rb +16 -16
- data/lib/cosmos/tools/test_runner/test_runner.rb +36 -9
- data/lib/cosmos/tools/test_runner/test_runner_chooser.rb +7 -4
- data/lib/cosmos/tools/tlm_extractor/tlm_extractor.rb +3 -1
- data/lib/cosmos/tools/tlm_grapher/tabbed_plots/overview_tabbed_plots.rb +28 -15
- data/lib/cosmos/version.rb +4 -4
- data/run_gui_tests.bat +2 -0
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 98b8a89318fe76b8b0a3dd2c5950e9cea1d59120
|
|
4
|
+
data.tar.gz: 0fdf696e10d06b9078a91383afce71bedfa943a1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 44b8a6a65aa65b1aa1476a8a8f0b180e8684ae4b81d056d10e9fdb12cea1fd8209dd91f553ddc2de6cf5ee3de5219e430fdf6bd691a10c4f34d1c2d5d7393521
|
|
7
|
+
data.tar.gz: 6722a9c843f572a5b864142c0fe6965b0cbe1882f07442c173d6519ef48f9cef35f0bea7a52144680a0c88858212cac3a53243ff0c2d6054050735e7ae4b3996
|
data/.gitattributes
CHANGED
|
@@ -17,4 +17,8 @@ end
|
|
|
17
17
|
|
|
18
18
|
# Clean up scene output
|
|
19
19
|
File.delete('autohotkey/config/tools/opengl_builder/scene.txt')
|
|
20
|
+
# Remove known exception file
|
|
21
|
+
Dir["autohotkey/outputs/logs/*exception.txt"].each do |file|
|
|
22
|
+
File.delete file if File.read(file).include? "Unknown keyword THIS with parameters is just here to cause an error"
|
|
23
|
+
end
|
|
20
24
|
|
|
@@ -16,3 +16,7 @@ autohotkey('TlmViewer2', 'tlm_viewer2.ahk') do
|
|
|
16
16
|
Cosmos::TlmViewer.run
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
+
# Remove known exception file
|
|
20
|
+
Dir["autohotkey/outputs/logs/*exception.txt"].each do |file|
|
|
21
|
+
File.delete file if File.read(file).include? "Unable to require this_widget due to cannot load such file -- this_widget"
|
|
22
|
+
end
|
|
@@ -16,3 +16,7 @@ autohotkey('TlmViewer4', 'tlm_viewer4.ahk') do
|
|
|
16
16
|
Cosmos::TlmViewer.run
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
+
# Remove known exception file
|
|
20
|
+
Dir["autohotkey/outputs/logs/*exception.txt"].each do |file|
|
|
21
|
+
File.delete file if File.read(file).include? "NoMethodError : undefined method `columns' for nil:NilClass"
|
|
22
|
+
end
|
|
@@ -132,40 +132,46 @@ Send {Enter}
|
|
|
132
132
|
Sleep 2000
|
|
133
133
|
|
|
134
134
|
Click right 380, 595 ; TEMP1 details
|
|
135
|
-
Sleep
|
|
135
|
+
Sleep 1000
|
|
136
136
|
Send {Tab}{Enter}
|
|
137
137
|
WinWaitActive TEMP1
|
|
138
|
+
Sleep 1000
|
|
139
|
+
; Leave this window open because we use it later
|
|
138
140
|
|
|
139
141
|
WinActivate Packet Viewer
|
|
140
142
|
WinWaitActive Packet Viewer
|
|
141
143
|
Click right 380, 685 ; ARY details
|
|
142
|
-
Sleep
|
|
144
|
+
Sleep 1000
|
|
143
145
|
Send {Tab}{Enter}
|
|
144
146
|
WinWaitActive ARY
|
|
147
|
+
Sleep 1000
|
|
148
|
+
Send {Enter} ; Close the window
|
|
145
149
|
|
|
146
150
|
WinActivate Packet Viewer
|
|
147
151
|
WinWaitActive Packet Viewer
|
|
148
152
|
Click right 380, 735 ; COLLECT_TYPE details
|
|
149
|
-
Sleep
|
|
153
|
+
Sleep 1000
|
|
150
154
|
Send {Tab}{Enter}
|
|
151
155
|
WinWaitActive COLLECT_TYPE
|
|
156
|
+
Sleep 1000
|
|
157
|
+
Send {Enter} ; Close the window
|
|
152
158
|
|
|
153
159
|
WinActivate TEMP1
|
|
154
160
|
WinWaitActive TEMP1
|
|
155
|
-
Sleep
|
|
161
|
+
Sleep 2000
|
|
156
162
|
|
|
157
163
|
Run ruby.exe %A_ScriptDir%/ScriptRunner -w 600 -t 600
|
|
158
164
|
Sleep 2000
|
|
159
165
|
WinActivate Script Runner
|
|
160
|
-
Sleep
|
|
166
|
+
Sleep 1000
|
|
161
167
|
Send set_limits("INST","HEALTH_STATUS","TEMP1",-110,-105,105,110,-100,100){ENTER}
|
|
162
168
|
Send set_limits_set("CUSTOM"){ENTER}
|
|
163
|
-
Sleep
|
|
169
|
+
Sleep 1000
|
|
164
170
|
Click 400, 88 ; Start
|
|
165
171
|
|
|
166
172
|
WinActivate TEMP1
|
|
167
173
|
WinWaitActive TEMP1
|
|
168
|
-
Sleep
|
|
174
|
+
Sleep 3000
|
|
169
175
|
|
|
170
176
|
WinActivate Script Runner
|
|
171
177
|
WinWaitActive Script Runner
|
|
@@ -13,6 +13,7 @@ Click 400 90 ; Start
|
|
|
13
13
|
WinWaitActive Telemetry Viewer
|
|
14
14
|
Sleep 6000
|
|
15
15
|
WinActivate Script Runner
|
|
16
|
+
WinWaitActive Script Runner
|
|
16
17
|
Sleep 6000
|
|
17
18
|
Click 400 90 ; Go
|
|
18
19
|
Sleep 500
|
|
@@ -22,12 +23,15 @@ Click 400 90 ; Go
|
|
|
22
23
|
Sleep 3000
|
|
23
24
|
|
|
24
25
|
WinActivate Telemetry Viewer
|
|
26
|
+
WinWaitActive Telemetry Viewer
|
|
25
27
|
Sleep 1000
|
|
26
28
|
Send ^q ; File Quit
|
|
27
29
|
WinWaitActive Confirm
|
|
28
30
|
Send {Enter}
|
|
31
|
+
Sleep 500
|
|
29
32
|
|
|
30
33
|
WinActivate Script Runner
|
|
34
|
+
WinWaitActive Script Runner
|
|
31
35
|
Sleep 2000
|
|
32
36
|
Send ^q ; File Quit
|
|
33
37
|
Sleep 500
|
data/cosmos.gemspec
CHANGED
|
@@ -78,7 +78,7 @@ spec = Gem::Specification.new do |s|
|
|
|
78
78
|
s.add_runtime_dependency 'opengl', '>= 0.7', '< 0.10'
|
|
79
79
|
s.add_runtime_dependency 'snmp', '~> 1'
|
|
80
80
|
s.add_runtime_dependency 'rubyzip', '~> 1.1'
|
|
81
|
-
s.add_runtime_dependency 'qtbindings', '~> 4.8', '>= 4.8.
|
|
81
|
+
s.add_runtime_dependency 'qtbindings', '~> 4.8', '>= 4.8.6.2'
|
|
82
82
|
|
|
83
83
|
# Development Dependencies
|
|
84
84
|
s.add_development_dependency 'rspec', '~> 3'
|
data/data/crc.txt
CHANGED
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"lib/cosmos/gui/dialogs/tlm_details_dialog.rb" 0x18B1DB71
|
|
54
54
|
"lib/cosmos/gui/dialogs/calendar_dialog.rb" 0x688D3D3B
|
|
55
55
|
"lib/cosmos/gui/qt_tool.rb" 0x840EF801
|
|
56
|
-
"lib/cosmos/gui/utilities/script_module_gui.rb"
|
|
56
|
+
"lib/cosmos/gui/utilities/script_module_gui.rb" 0xBFDD40DD
|
|
57
57
|
"lib/cosmos/gui/utilities/screenshot.rb" 0x65F75371
|
|
58
58
|
"lib/cosmos/gui/widgets/full_text_search_line_edit.rb" 0x7AAF694C
|
|
59
59
|
"lib/cosmos/gui/widgets/realtime_button_bar.rb" 0xEB0CE858
|
|
@@ -83,10 +83,10 @@
|
|
|
83
83
|
"lib/cosmos/gui/opengl/texture_mapped_sphere.rb" 0x12D03C0E
|
|
84
84
|
"lib/cosmos/gui/opengl/gl_viewport.rb" 0x49CAD811
|
|
85
85
|
"lib/cosmos/gui/opengl/opengl.rb" 0xBE4A454D
|
|
86
|
-
"lib/cosmos/gui/choosers/integer_chooser.rb"
|
|
86
|
+
"lib/cosmos/gui/choosers/integer_chooser.rb" 0x0CCB26E3
|
|
87
87
|
"lib/cosmos/gui/choosers/string_chooser.rb" 0x0A60837D
|
|
88
88
|
"lib/cosmos/gui/choosers/file_chooser.rb" 0x575A4333
|
|
89
|
-
"lib/cosmos/gui/choosers/telemetry_chooser.rb"
|
|
89
|
+
"lib/cosmos/gui/choosers/telemetry_chooser.rb" 0x26375593
|
|
90
90
|
"lib/cosmos/gui/choosers/combobox_chooser.rb" 0xAD5383D5
|
|
91
91
|
"lib/cosmos/gui/choosers/float_chooser.rb" 0x23B2FA77
|
|
92
92
|
"lib/cosmos/tools/script_runner/script_runner_config.rb" 0x1E46E8AA
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"lib/cosmos/tools/replay/replay_server.rb" 0x307A7329
|
|
105
105
|
"lib/cosmos/tools/replay/replay.rb" 0xE9D02C47
|
|
106
106
|
"lib/cosmos/tools/tlm_extractor/tlm_extractor_processor.rb" 0x2AA9C2F5
|
|
107
|
-
"lib/cosmos/tools/tlm_extractor/tlm_extractor.rb"
|
|
107
|
+
"lib/cosmos/tools/tlm_extractor/tlm_extractor.rb" 0xDA3CEF74
|
|
108
108
|
"lib/cosmos/tools/tlm_extractor/tlm_extractor_config.rb" 0x7779DCEC
|
|
109
109
|
"lib/cosmos/tools/tlm_extractor/text_item_chooser.rb" 0x587768C6
|
|
110
110
|
"lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_config.rb" 0xA1C38662
|
|
@@ -137,10 +137,10 @@
|
|
|
137
137
|
"lib/cosmos/tools/cmd_sender/cmd_sender.rb" 0xCE30B8BE
|
|
138
138
|
"lib/cosmos/tools/cmd_sender/cmd_sender_item_delegate.rb" 0x8297CC9D
|
|
139
139
|
"lib/cosmos/tools/cmd_sender/cmd_sender_text_edit.rb" 0xB192AF6E
|
|
140
|
-
"lib/cosmos/tools/test_runner/test_runner_chooser.rb"
|
|
140
|
+
"lib/cosmos/tools/test_runner/test_runner_chooser.rb" 0xB2BC3115
|
|
141
141
|
"lib/cosmos/tools/test_runner/results_writer.rb" 0x25101A48
|
|
142
|
-
"lib/cosmos/tools/test_runner/test_runner.rb"
|
|
143
|
-
"lib/cosmos/tools/test_runner/test.rb"
|
|
142
|
+
"lib/cosmos/tools/test_runner/test_runner.rb" 0xA498E23D
|
|
143
|
+
"lib/cosmos/tools/test_runner/test.rb" 0x27942572
|
|
144
144
|
"lib/cosmos/tools/tlm_grapher/plots/xy_plot.rb" 0x98F7712F
|
|
145
145
|
"lib/cosmos/tools/tlm_grapher/plots/singlexy_plot.rb" 0xA01649EC
|
|
146
146
|
"lib/cosmos/tools/tlm_grapher/plots/linegraph_plot.rb" 0xF0F6A243
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
"lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_tab.rb" 0xD0AC7888
|
|
159
159
|
"lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_config.rb" 0x08E6FA35
|
|
160
160
|
"lib/cosmos/tools/tlm_grapher/tlm_grapher.rb" 0xBBFC2272
|
|
161
|
-
"lib/cosmos/tools/tlm_grapher/tabbed_plots/overview_tabbed_plots.rb"
|
|
161
|
+
"lib/cosmos/tools/tlm_grapher/tabbed_plots/overview_tabbed_plots.rb" 0xB0994B7A
|
|
162
162
|
"lib/cosmos/tools/tlm_grapher/plot_editors/plot_editor.rb" 0x0C92BBB8
|
|
163
163
|
"lib/cosmos/tools/tlm_grapher/plot_editors/xy_plot_editor.rb" 0x724D9469
|
|
164
164
|
"lib/cosmos/tools/tlm_grapher/plot_editors/singlexy_plot_editor.rb" 0xA9B7CD4C
|
|
@@ -234,7 +234,7 @@
|
|
|
234
234
|
"lib/cosmos/tools/tlm_viewer/tlm_viewer.rb" 0x1D2090F6
|
|
235
235
|
"lib/cosmos/system.rb" 0x735DFB42
|
|
236
236
|
"lib/cosmos/conversions.rb" 0x43679D05
|
|
237
|
-
"lib/cosmos/version.rb"
|
|
237
|
+
"lib/cosmos/version.rb" 0x2945A487
|
|
238
238
|
"lib/cosmos/core_ext.rb" 0x1951B346
|
|
239
239
|
"lib/cosmos/interfaces.rb" 0x7E3EA326
|
|
240
240
|
"lib/cosmos/processors.rb" 0x5241327D
|
|
@@ -37,7 +37,7 @@ module Cosmos
|
|
|
37
37
|
if minimum_value or maximum_value
|
|
38
38
|
validator = Qt::IntValidator.new(@integer_value)
|
|
39
39
|
validator.setBottom(minimum_value) if minimum_value
|
|
40
|
-
validator.setTop(
|
|
40
|
+
validator.setTop(maximum_value) if maximum_value
|
|
41
41
|
@integer_value.setValidator(validator)
|
|
42
42
|
end
|
|
43
43
|
@callback_in_progress = false
|
|
@@ -102,6 +102,7 @@ module Cosmos
|
|
|
102
102
|
@packet_layout.addWidget(@packet_combobox)
|
|
103
103
|
@overall_frame.addLayout(@packet_layout)
|
|
104
104
|
|
|
105
|
+
@item_combobox = nil
|
|
105
106
|
if choose_item
|
|
106
107
|
# Item Selection
|
|
107
108
|
@item_layout = Qt::HBoxLayout.new
|
|
@@ -142,7 +143,7 @@ module Cosmos
|
|
|
142
143
|
current_packet_name = packet_name()
|
|
143
144
|
current_item_name = item_name()
|
|
144
145
|
update_targets()
|
|
145
|
-
if current_target_name and current_packet_name and current_item_name
|
|
146
|
+
if current_target_name and current_packet_name and (current_item_name or !@item_combobox)
|
|
146
147
|
begin
|
|
147
148
|
set_item(current_target_name, current_packet_name, current_item_name)
|
|
148
149
|
rescue Exception
|
|
@@ -168,7 +169,11 @@ module Cosmos
|
|
|
168
169
|
|
|
169
170
|
# Returns the selected item name
|
|
170
171
|
def item_name
|
|
171
|
-
@item_combobox
|
|
172
|
+
if @item_combobox
|
|
173
|
+
@item_combobox.text
|
|
174
|
+
else
|
|
175
|
+
nil
|
|
176
|
+
end
|
|
172
177
|
end
|
|
173
178
|
|
|
174
179
|
# Returns the list of all target names in the target combobox
|
|
@@ -188,7 +193,9 @@ module Cosmos
|
|
|
188
193
|
# Returns the list of all item names in the item combobox
|
|
189
194
|
def item_names
|
|
190
195
|
item_names_array = []
|
|
191
|
-
@item_combobox
|
|
196
|
+
if @item_combobox
|
|
197
|
+
@item_combobox.each {|item_text, item_data| item_names_array << item_text}
|
|
198
|
+
end
|
|
192
199
|
item_names_array
|
|
193
200
|
end
|
|
194
201
|
|
|
@@ -229,17 +236,19 @@ module Cosmos
|
|
|
229
236
|
set_packet(target_name, packet_name)
|
|
230
237
|
|
|
231
238
|
# Select desired item
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
239
|
+
if @item_combobox
|
|
240
|
+
index = 0
|
|
241
|
+
found = false
|
|
242
|
+
@item_combobox.each do |item_text, item_data|
|
|
243
|
+
if item_name.upcase == item_text.upcase
|
|
244
|
+
found = true
|
|
245
|
+
break
|
|
246
|
+
end
|
|
247
|
+
index += 1
|
|
238
248
|
end
|
|
239
|
-
|
|
249
|
+
Kernel.raise "TelemetryChooser unknown item_name #{item_name}" unless found
|
|
250
|
+
@item_combobox.setCurrentIndex(index)
|
|
240
251
|
end
|
|
241
|
-
Kernel.raise "TelemetryChooser unknown item_name #{item_name}" unless found
|
|
242
|
-
@item_combobox.setCurrentIndex(index)
|
|
243
252
|
end
|
|
244
253
|
|
|
245
254
|
protected
|
|
@@ -297,16 +306,18 @@ module Cosmos
|
|
|
297
306
|
# Updates the item names based on a change
|
|
298
307
|
def update_items
|
|
299
308
|
return unless target_name() and packet_name()
|
|
300
|
-
@item_combobox
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
309
|
+
if @item_combobox
|
|
310
|
+
@item_combobox.clearItems()
|
|
311
|
+
item_names = System.telemetry.item_names(target_name(), packet_name())
|
|
312
|
+
item_names.sort!
|
|
313
|
+
item_names.each do |name|
|
|
314
|
+
@item_combobox.addItem(name)
|
|
315
|
+
end
|
|
316
|
+
if item_names.length > 20
|
|
317
|
+
@item_combobox.setMaxVisibleItems(20)
|
|
318
|
+
else
|
|
319
|
+
@item_combobox.setMaxVisibleItems(item_names.length)
|
|
320
|
+
end
|
|
310
321
|
end
|
|
311
322
|
end
|
|
312
323
|
|
|
@@ -61,13 +61,13 @@ module Cosmos
|
|
|
61
61
|
return answer.to_s
|
|
62
62
|
end
|
|
63
63
|
|
|
64
|
-
def prompt_dialog_box(title, message
|
|
64
|
+
def prompt_dialog_box(title, message)
|
|
65
65
|
result = nil
|
|
66
66
|
Qt.execute_in_main_thread(true, 0.05) do
|
|
67
67
|
window = nil
|
|
68
68
|
window = get_cmd_tlm_gui_window() if get_cmd_tlm_gui_window()
|
|
69
69
|
msg = Qt::MessageBox.new(window)
|
|
70
|
-
msg.setIcon(
|
|
70
|
+
msg.setIcon(Qt::MessageBox::Warning)
|
|
71
71
|
msg.setText(message)
|
|
72
72
|
msg.setWindowTitle(title)
|
|
73
73
|
msg.setStandardButtons(Qt::MessageBox::Yes | Qt::MessageBox::No)
|
|
@@ -89,7 +89,7 @@ module Cosmos
|
|
|
89
89
|
message = "Warning: Command #{target_name} #{cmd_name} is Hazardous. "
|
|
90
90
|
message << "\n#{hazardous_description}\n" if hazardous_description
|
|
91
91
|
message << "Send?"
|
|
92
|
-
return prompt_dialog_box('Hazardous Command', message
|
|
92
|
+
return prompt_dialog_box('Hazardous Command', message)
|
|
93
93
|
end
|
|
94
94
|
|
|
95
95
|
def prompt_for_script_abort
|
|
@@ -31,7 +31,7 @@ module Cosmos
|
|
|
31
31
|
@total = 1
|
|
32
32
|
end
|
|
33
33
|
|
|
34
|
-
def total=
|
|
34
|
+
def total=(new_total)
|
|
35
35
|
if new_total <= 0
|
|
36
36
|
@total = 1
|
|
37
37
|
else
|
|
@@ -141,12 +141,12 @@ module Cosmos
|
|
|
141
141
|
end
|
|
142
142
|
|
|
143
143
|
# Run a specific test case
|
|
144
|
-
def run_test_case
|
|
144
|
+
def run_test_case(test_case)
|
|
145
145
|
TestStatus.instance.status = "#{self.class} : #{test_case}"
|
|
146
146
|
run_function(self, test_case)
|
|
147
147
|
end
|
|
148
148
|
|
|
149
|
-
def run_function
|
|
149
|
+
def run_function(object, method_name)
|
|
150
150
|
# Convert to a symbol to use as a method_name
|
|
151
151
|
method_name = method_name.to_s.intern unless method_name.class == Symbol
|
|
152
152
|
|
|
@@ -265,7 +265,7 @@ module Cosmos
|
|
|
265
265
|
num_tests
|
|
266
266
|
end
|
|
267
267
|
|
|
268
|
-
def self.puts
|
|
268
|
+
def self.puts(string)
|
|
269
269
|
$stdout.puts string
|
|
270
270
|
if @@current_test_result
|
|
271
271
|
@@current_test_result.message ||= ''
|
|
@@ -284,7 +284,7 @@ module Cosmos
|
|
|
284
284
|
@plans = []
|
|
285
285
|
end
|
|
286
286
|
|
|
287
|
-
def <=>
|
|
287
|
+
def <=>(other_test_suite)
|
|
288
288
|
self.name <=> other_test_suite.name
|
|
289
289
|
end
|
|
290
290
|
|
|
@@ -298,35 +298,35 @@ module Cosmos
|
|
|
298
298
|
end
|
|
299
299
|
|
|
300
300
|
# Add a test to the suite
|
|
301
|
-
def add_test
|
|
301
|
+
def add_test(test_class)
|
|
302
302
|
test_class = Object.const_get(test_class.to_s.intern) unless test_class.class == Class
|
|
303
303
|
@tests[test_class] = test_class.new unless @tests[test_class]
|
|
304
304
|
@plans << [:TEST, test_class, nil]
|
|
305
305
|
end
|
|
306
306
|
|
|
307
307
|
# Add a test case to the suite
|
|
308
|
-
def add_test_case
|
|
308
|
+
def add_test_case(test_class, test_case)
|
|
309
309
|
test_class = Object.const_get(test_class.to_s.intern) unless test_class.class == Class
|
|
310
310
|
@tests[test_class] = test_class.new unless @tests[test_class]
|
|
311
311
|
@plans << [:TEST_CASE, test_class, test_case]
|
|
312
312
|
end
|
|
313
313
|
|
|
314
314
|
# Add a test setup to the suite
|
|
315
|
-
def add_test_setup
|
|
315
|
+
def add_test_setup(test_class)
|
|
316
316
|
test_class = Object.const_get(test_class.to_s.intern) unless test_class.class == Class
|
|
317
317
|
@tests[test_class] = test_class.new unless @tests[test_class]
|
|
318
318
|
@plans << [:TEST_SETUP, test_class, nil]
|
|
319
319
|
end
|
|
320
320
|
|
|
321
321
|
# Add a test teardown to the suite
|
|
322
|
-
def add_test_teardown
|
|
322
|
+
def add_test_teardown(test_class)
|
|
323
323
|
test_class = Object.const_get(test_class.to_s.intern) unless test_class.class == Class
|
|
324
324
|
@tests[test_class] = test_class.new unless @tests[test_class]
|
|
325
325
|
@plans << [:TEST_TEARDOWN, test_class, nil]
|
|
326
326
|
end
|
|
327
327
|
|
|
328
328
|
# Run all the tests
|
|
329
|
-
def run
|
|
329
|
+
def run(&block)
|
|
330
330
|
TestStatus.instance.total = get_num_tests()
|
|
331
331
|
results = []
|
|
332
332
|
|
|
@@ -374,7 +374,7 @@ module Cosmos
|
|
|
374
374
|
end
|
|
375
375
|
|
|
376
376
|
# Run a specific test
|
|
377
|
-
def run_test
|
|
377
|
+
def run_test(test_class, internal = false, &block)
|
|
378
378
|
# Determine if this test_class is in the plan and the number of tests associated with this test_class
|
|
379
379
|
in_plan = false
|
|
380
380
|
num_tests = 0
|
|
@@ -426,12 +426,12 @@ module Cosmos
|
|
|
426
426
|
end
|
|
427
427
|
|
|
428
428
|
# Run a specific test case
|
|
429
|
-
def run_test_case
|
|
429
|
+
def run_test_case(test_class, test_case, internal = false)
|
|
430
430
|
TestStatus.instance.total = 1 unless internal
|
|
431
431
|
@tests[test_class].run_test_case(test_case)
|
|
432
432
|
end
|
|
433
433
|
|
|
434
|
-
def run_setup
|
|
434
|
+
def run_setup(internal = false)
|
|
435
435
|
result = nil
|
|
436
436
|
if self.class.method_defined?(:setup) and @tests.length > 0
|
|
437
437
|
TestStatus.instance.total = 1 unless internal
|
|
@@ -441,7 +441,7 @@ module Cosmos
|
|
|
441
441
|
result
|
|
442
442
|
end
|
|
443
443
|
|
|
444
|
-
def run_teardown
|
|
444
|
+
def run_teardown(internal = false)
|
|
445
445
|
result = nil
|
|
446
446
|
if self.class.method_defined?(:teardown) and @tests.length > 0
|
|
447
447
|
TestStatus.instance.total = 1 unless internal
|
|
@@ -451,12 +451,12 @@ module Cosmos
|
|
|
451
451
|
result
|
|
452
452
|
end
|
|
453
453
|
|
|
454
|
-
def run_test_setup
|
|
454
|
+
def run_test_setup(test_class, internal = false)
|
|
455
455
|
TestStatus.instance.total = 1 unless internal
|
|
456
456
|
@tests[test_class].run_setup
|
|
457
457
|
end
|
|
458
458
|
|
|
459
|
-
def run_test_teardown
|
|
459
|
+
def run_test_teardown(test_class, internal = false)
|
|
460
460
|
TestStatus.instance.total = 1 unless internal
|
|
461
461
|
@tests[test_class].run_teardown
|
|
462
462
|
end
|
|
@@ -72,6 +72,12 @@ module Cosmos
|
|
|
72
72
|
Splash.execute(self) do |splash|
|
|
73
73
|
ConfigParser.splash = splash
|
|
74
74
|
process_config(options.config_file)
|
|
75
|
+
if options.test_suite
|
|
76
|
+
Qt.execute_in_main_thread do
|
|
77
|
+
# Start the test and don't warn the user about their options
|
|
78
|
+
handle_start(options.test_suite, options.test_group, options.test_case, false)
|
|
79
|
+
end
|
|
80
|
+
end
|
|
75
81
|
ConfigParser.splash = nil
|
|
76
82
|
end
|
|
77
83
|
|
|
@@ -422,9 +428,11 @@ module Cosmos
|
|
|
422
428
|
# Callbacks
|
|
423
429
|
###########################################
|
|
424
430
|
|
|
425
|
-
def generic_handler(test_suite, test = nil, test_case = nil)
|
|
426
|
-
|
|
427
|
-
|
|
431
|
+
def generic_handler(test_suite, test = nil, test_case = nil, warnings = true)
|
|
432
|
+
if warnings
|
|
433
|
+
return unless continue_without_pausing_on_errors?
|
|
434
|
+
return unless continue_loop_testing?()
|
|
435
|
+
end
|
|
428
436
|
|
|
429
437
|
# TODO: This can take a while depending on the number of tests and their
|
|
430
438
|
# complexity. Consider making a progress bar for this.
|
|
@@ -439,8 +447,8 @@ module Cosmos
|
|
|
439
447
|
end
|
|
440
448
|
end
|
|
441
449
|
|
|
442
|
-
def handle_start(test_suite, test = nil, test_case = nil)
|
|
443
|
-
generic_handler(test_suite, test, test_case) do
|
|
450
|
+
def handle_start(test_suite, test = nil, test_case = nil, warnings = true)
|
|
451
|
+
generic_handler(test_suite, test, test_case, warnings) do
|
|
444
452
|
if test_case
|
|
445
453
|
@script_runner_frame.set_text("TestRunner.start(#{test_suite}, #{test}, '#{test_case}')", "#{test_suite}_#{test}_#{test_case}")
|
|
446
454
|
elsif test
|
|
@@ -514,10 +522,12 @@ module Cosmos
|
|
|
514
522
|
end
|
|
515
523
|
|
|
516
524
|
def handle_error(script_runner_frame)
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
525
|
+
Qt.execute_in_main_thread(true) do
|
|
526
|
+
if @@settings['Continue Test Case after Error']
|
|
527
|
+
script_runner_frame.enable_retry()
|
|
528
|
+
else
|
|
529
|
+
script_runner_frame.disable_retry()
|
|
530
|
+
end
|
|
521
531
|
end
|
|
522
532
|
end
|
|
523
533
|
|
|
@@ -1152,6 +1162,23 @@ module Cosmos
|
|
|
1152
1162
|
option_parser.on("-s", "--server FILE", "Use the specified server configuration file for disconnect mode") do |arg|
|
|
1153
1163
|
options.server_config_file = arg
|
|
1154
1164
|
end
|
|
1165
|
+
option_parser.on("--suite SUITE", "Start the specified test suite.") do |arg|
|
|
1166
|
+
options.test_suite = arg
|
|
1167
|
+
end
|
|
1168
|
+
option_parser.on("--group GROUP", "Start the specified test group. Requires the --suite option.") do |arg|
|
|
1169
|
+
unless options.test_suite
|
|
1170
|
+
puts option_parser
|
|
1171
|
+
exit
|
|
1172
|
+
end
|
|
1173
|
+
options.test_group = arg
|
|
1174
|
+
end
|
|
1175
|
+
option_parser.on("--case CASE", "Start the specified test case. Requires the --suite and --group options.") do |arg|
|
|
1176
|
+
unless options.test_suite && options.test_group
|
|
1177
|
+
puts option_parser
|
|
1178
|
+
exit
|
|
1179
|
+
end
|
|
1180
|
+
options.test_case = arg
|
|
1181
|
+
end
|
|
1155
1182
|
end
|
|
1156
1183
|
|
|
1157
1184
|
super(option_parser, options)
|
|
@@ -12,10 +12,13 @@ require 'cosmos'
|
|
|
12
12
|
|
|
13
13
|
module Cosmos
|
|
14
14
|
|
|
15
|
-
#
|
|
16
|
-
#
|
|
17
|
-
#
|
|
18
|
-
#
|
|
15
|
+
# Qt Widget used by the Cosmos::TestRunner application.
|
|
16
|
+
# It constructs a list of Test Suites, Test Groups, and
|
|
17
|
+
# Test Cases in combo box choosers. All combo boxes are folowed by
|
|
18
|
+
# Start buttons and Suites and Groups also have Setup and Teardown
|
|
19
|
+
# buttons. When a new Test Suite is choosen the Test Group and
|
|
20
|
+
# Test Case combo boxes update. When a Test Group is changed the
|
|
21
|
+
# Test Case combo box is updated.
|
|
19
22
|
class TestRunnerChooser < Qt::Widget
|
|
20
23
|
|
|
21
24
|
# Width of the button in the Combobox
|
|
@@ -510,7 +510,9 @@ module Cosmos
|
|
|
510
510
|
@input_filenames = @packet_log_frame.filenames.sort
|
|
511
511
|
@batch_filenames = []
|
|
512
512
|
output_extension = '.txt'
|
|
513
|
+
batch_name = nil
|
|
513
514
|
if @batch_mode_check.checked?
|
|
515
|
+
batch_name = @batch_name_entry.text
|
|
514
516
|
@batch_filenames_entry.each {|list_item| @batch_filenames << list_item.text}
|
|
515
517
|
if @packet_log_frame.output_filename_filter == Cosmos::CSV_FILE_PATTERN
|
|
516
518
|
output_extension = '.csv'
|
|
@@ -539,7 +541,7 @@ module Cosmos
|
|
|
539
541
|
process_args = [@input_filenames, [@tlm_extractor_config], @packet_log_frame.time_start, @packet_log_frame.time_end]
|
|
540
542
|
else
|
|
541
543
|
process_method = :process_batch
|
|
542
|
-
process_args = [
|
|
544
|
+
process_args = [batch_name, @input_filenames, @log_dir, output_extension, @batch_filenames, @packet_log_frame.time_start, @packet_log_frame.time_end]
|
|
543
545
|
end
|
|
544
546
|
|
|
545
547
|
@tlm_extractor_processor.send(process_method, *process_args) do |input_file_index, packet_count, file_progress|
|
|
@@ -269,10 +269,13 @@ module Cosmos
|
|
|
269
269
|
|
|
270
270
|
# Returns the index of the current tab or nil if no tabs exist
|
|
271
271
|
def current_tab_index
|
|
272
|
+
tab_index = -1
|
|
272
273
|
unless @tabbed_plots_config.tabs.empty?
|
|
273
|
-
|
|
274
|
-
|
|
274
|
+
Qt.execute_in_main_thread(true) do
|
|
275
|
+
tab_index = @tab_book.currentIndex
|
|
276
|
+
end
|
|
275
277
|
end
|
|
278
|
+
return tab_index if tab_index >= 0
|
|
276
279
|
nil
|
|
277
280
|
end # def current_tab_index
|
|
278
281
|
|
|
@@ -444,14 +447,16 @@ module Cosmos
|
|
|
444
447
|
|
|
445
448
|
# Exports data objects on a plot - defaults to selected plot on the current tab
|
|
446
449
|
def export_plot(filename, progress, tab_index = nil, plot_index = nil)
|
|
447
|
-
|
|
448
|
-
|
|
450
|
+
Qt.execute_in_main_thread(true) do
|
|
451
|
+
# Select the current tab by default
|
|
452
|
+
tab_index = current_tab_index() unless tab_index
|
|
449
453
|
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
454
|
+
# Select selected plot by default
|
|
455
|
+
plot_index = selected_plot_index(tab_index) if tab_index and not plot_index
|
|
456
|
+
unless plot_index
|
|
457
|
+
Qt::MessageBox.information(self, 'Information', 'Please select a plot')
|
|
458
|
+
return
|
|
459
|
+
end
|
|
455
460
|
end
|
|
456
461
|
|
|
457
462
|
export_data_objects(filename, progress, tab_index, plot_index)
|
|
@@ -486,12 +491,18 @@ module Cosmos
|
|
|
486
491
|
# Select the current tab by default
|
|
487
492
|
tab_index = current_tab_index() unless tab_index
|
|
488
493
|
|
|
494
|
+
plot_index = nil
|
|
489
495
|
if tab_index
|
|
490
|
-
|
|
491
|
-
|
|
496
|
+
Qt.execute_in_main_thread(true) do
|
|
497
|
+
@tabbed_plots_config.tabs[tab_index].plots.each_with_index do |plot, index|
|
|
498
|
+
if plot.gui_object.selected?
|
|
499
|
+
plot_index = index
|
|
500
|
+
break
|
|
501
|
+
end
|
|
502
|
+
end
|
|
492
503
|
end
|
|
493
504
|
end
|
|
494
|
-
|
|
505
|
+
return plot_index
|
|
495
506
|
end # def selected_plot_index
|
|
496
507
|
|
|
497
508
|
# Indicates if the plot has any data objects
|
|
@@ -703,9 +714,11 @@ module Cosmos
|
|
|
703
714
|
def selected_data_object_indexes
|
|
704
715
|
selected = []
|
|
705
716
|
index = 0
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
717
|
+
Qt.execute_in_main_thread(true) do
|
|
718
|
+
@data_object_list.each do |list_item|
|
|
719
|
+
selected << index if list_item.selected? and @data_object_list.item(index).text != 'No Plot Selected'
|
|
720
|
+
index += 1
|
|
721
|
+
end
|
|
709
722
|
end
|
|
710
723
|
selected
|
|
711
724
|
end # def selected_data_object_indexes
|
data/lib/cosmos/version.rb
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# encoding: ascii-8bit
|
|
2
2
|
|
|
3
|
-
COSMOS_VERSION = '3.4.
|
|
3
|
+
COSMOS_VERSION = '3.4.2'
|
|
4
4
|
module Cosmos
|
|
5
5
|
module Version
|
|
6
6
|
MAJOR = '3'
|
|
7
7
|
MINOR = '4'
|
|
8
|
-
PATCH = '
|
|
9
|
-
BUILD = '
|
|
8
|
+
PATCH = '2'
|
|
9
|
+
BUILD = 'd7b8067e652f11393629c9e8e1708cb846c5d233'
|
|
10
10
|
end
|
|
11
|
-
VERSION = '3.4.
|
|
11
|
+
VERSION = '3.4.2'
|
|
12
12
|
end
|
data/run_gui_tests.bat
CHANGED
|
@@ -17,6 +17,8 @@ call bundle exec ruby autohotkey\tools\TestRunnerAHK -w 800 -t 800
|
|
|
17
17
|
call bundle exec ruby autohotkey\tools\TestRunnerAHK2 -w 800 -t 800 -c test_runner2.txt
|
|
18
18
|
call bundle exec ruby autohotkey\tools\TestRunnerAHK3 -w 800 -t 800 -c test_runner3.txt
|
|
19
19
|
call bundle exec ruby autohotkey\tools\TestRunnerAHK4 -w 800 -t 800 -c test_runner4.txt
|
|
20
|
+
call bundle exec ruby autohotkey\tools\TestRunnerAHK5 -w 800 -t 800 --suite ExampleTestSuite --group ExampleTest --case test_3xx
|
|
21
|
+
call bundle exec ruby autohotkey\tools\TestRunnerAHK6 --group ExampleTest --case test_3xx
|
|
20
22
|
call bundle exec ruby autohotkey\tools\TlmGrapherAHK -w 800 -t 800
|
|
21
23
|
call bundle exec ruby autohotkey\tools\TlmGrapherAHK2 -s -c test2.txt -w 1200 -t 800
|
|
22
24
|
call bundle exec ruby autohotkey\tools\TlmGrapherAHK3 -i 'INST HEALTH_STATUS TEMP1'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cosmos
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.4.
|
|
4
|
+
version: 3.4.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ryan Melton
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2015-05-
|
|
12
|
+
date: 2015-05-08 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: bundler
|
|
@@ -216,7 +216,7 @@ dependencies:
|
|
|
216
216
|
version: '4.8'
|
|
217
217
|
- - ">="
|
|
218
218
|
- !ruby/object:Gem::Version
|
|
219
|
-
version: 4.8.
|
|
219
|
+
version: 4.8.6.2
|
|
220
220
|
type: :runtime
|
|
221
221
|
prerelease: false
|
|
222
222
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -226,7 +226,7 @@ dependencies:
|
|
|
226
226
|
version: '4.8'
|
|
227
227
|
- - ">="
|
|
228
228
|
- !ruby/object:Gem::Version
|
|
229
|
-
version: 4.8.
|
|
229
|
+
version: 4.8.6.2
|
|
230
230
|
- !ruby/object:Gem::Dependency
|
|
231
231
|
name: rspec
|
|
232
232
|
requirement: !ruby/object:Gem::Requirement
|