@@ -97,11 +97,17 @@ def gen_test_file_times(db_results, old_test_times):
97
97
for test , times in test_times_no_test_config .items ():
98
98
test_times_no_test_config [test ] = sum (times ) / len (times )
99
99
100
- # Default should never be a build env
101
- test_times ["default" ] = test_times_no_build_env
102
- # Replace default's default with our own to account for tests that aren't
103
- # usually in the default test config like distributed
104
- test_times ["default" ]["default" ] = test_times_no_test_config
100
+ # Avoid overwriting the default if the new default is empty
101
+ if test_times_no_build_env :
102
+ # Default should never be a build env
103
+ test_times ["default" ] = test_times_no_build_env
104
+
105
+ # Avoid overwriting the default if the new default is empty
106
+ if test_times_no_test_config :
107
+ # Replace default's default with our own to account for tests that aren't
108
+ # usually in the default test config like distributed
109
+ test_times ["default" ]["default" ] = test_times_no_test_config
110
+
105
111
return test_times
106
112
107
113
@@ -136,11 +142,17 @@ def gen_test_class_times(db_results, old_test_times):
136
142
for testclass , times in test_times_no_test_config [file ].items ():
137
143
test_times_no_test_config [file ][testclass ] = sum (times ) / len (times )
138
144
139
- # Default should never be a build env
140
- test_times ["default" ] = test_times_no_build_env
141
- # Replace default's default with our own to account for tests that aren't
142
- # usually in the default test config like distributed
143
- test_times ["default" ]["default" ] = test_times_no_test_config
145
+ # Avoid overwriting the default if the new default is empty
146
+ if test_times_no_build_env :
147
+ # Default should never be a build env
148
+ test_times ["default" ] = test_times_no_build_env
149
+
150
+ # Avoid overwriting the default if the new default is empty
151
+ if test_times_no_test_config :
152
+ # Replace default's default with our own to account for tests that aren't
153
+ # usually in the default test config like distributed
154
+ test_times ["default" ]["default" ] = test_times_no_test_config
155
+
144
156
return test_times
145
157
146
158
0 commit comments