diff options
Diffstat (limited to 'scripts/lib')
| -rw-r--r-- | scripts/lib/resulttool/regression.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/lib/resulttool/regression.py b/scripts/lib/resulttool/regression.py index 04a2f3fbb0..74fd5f3895 100644 --- a/scripts/lib/resulttool/regression.py +++ b/scripts/lib/resulttool/regression.py | |||
| @@ -248,6 +248,24 @@ def regression_common(args, logger, base_results, target_results): | |||
| 248 | 248 | ||
| 249 | return 0 | 249 | return 0 |
| 250 | 250 | ||
| 251 | # Some test case naming is poor and contains random strings, particularly lttng/babeltrace. | ||
| 252 | # Truncating the test names works since they contain file and line number identifiers | ||
| 253 | # which allows us to match them without the random components. | ||
| 254 | def fixup_ptest_names(results, logger): | ||
| 255 | for r in results: | ||
| 256 | for i in results[r]: | ||
| 257 | tests = list(results[r][i]['result'].keys()) | ||
| 258 | for test in tests: | ||
| 259 | new = None | ||
| 260 | if test.startswith(("ptestresult.lttng-tools.", "ptestresult.babeltrace.", "ptestresult.babeltrace2")) and "_-_" in test: | ||
| 261 | new = test.split("_-_")[0] | ||
| 262 | elif test.startswith(("ptestresult.curl.")) and "__" in test: | ||
| 263 | new = test.split("__")[0] | ||
| 264 | if new: | ||
| 265 | results[r][i]['result'][new] = results[r][i]['result'][test] | ||
| 266 | del results[r][i]['result'][test] | ||
| 267 | |||
| 268 | |||
| 251 | def regression_git(args, logger): | 269 | def regression_git(args, logger): |
| 252 | base_results = {} | 270 | base_results = {} |
| 253 | target_results = {} | 271 | target_results = {} |
| @@ -309,6 +327,9 @@ def regression_git(args, logger): | |||
| 309 | base_results = resultutils.git_get_result(repo, revs[index1][2]) | 327 | base_results = resultutils.git_get_result(repo, revs[index1][2]) |
| 310 | target_results = resultutils.git_get_result(repo, revs[index2][2]) | 328 | target_results = resultutils.git_get_result(repo, revs[index2][2]) |
| 311 | 329 | ||
| 330 | fixup_ptest_names(base_results, logger) | ||
| 331 | fixup_ptest_names(target_results, logger) | ||
| 332 | |||
| 312 | regression_common(args, logger, base_results, target_results) | 333 | regression_common(args, logger, base_results, target_results) |
| 313 | 334 | ||
| 314 | return 0 | 335 | return 0 |
