File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -1123,3 +1123,38 @@ def test_flatten_results(self):
1123
1123
1124
1124
self .assertEqual (flattened , answer )
1125
1125
self .assertEqual (unflattened , answer )
1126
+
1127
+ def test_key_results (self ):
1128
+ """Check that specifying key results causes those values to show up
1129
+ in the results table."""
1130
+
1131
+ cfg = self ._quick_test_cfg ()
1132
+
1133
+ cfg ['run' ]['cmds' ] = [
1134
+ 'echo hello'
1135
+ ]
1136
+ cfg ['result_parse' ]['regex' ] = {
1137
+ 'hello' : {
1138
+ 'regex' : 'hello' ,
1139
+ }
1140
+ }
1141
+ cfg ['key_results' ] = ['hello' ]
1142
+
1143
+ test = self ._quick_test (cfg , name = "key_results_test" )
1144
+ run_result = test .run ()
1145
+ results = test .gather_results (run_result )
1146
+ test .save_results (results )
1147
+
1148
+ result_cmd = commands .get_command ('result' )
1149
+ result_cmd .silence ()
1150
+
1151
+ arg_parser = arguments .get_parser ()
1152
+ res_args = arg_parser .parse_args (("result" , test .full_id ))
1153
+
1154
+ result_cmd .run (self .pav_cfg , res_args )
1155
+ cmd_out , cmd_err = result_cmd .clear_output ()
1156
+
1157
+ lines = cmd_out .split ('\n ' )
1158
+
1159
+ self .assertIn ("Hello" , lines [2 ])
1160
+ self .assertIn ("hello" , lines [4 ])
You can’t perform that action at this time.
0 commit comments