Skip to content

Commit e8c8cc9

Browse files
authored
Merge pull request #3294 from vkarak/bugfix/disjoint-sets-groups-cols
[bugfix] Fix query error when aggregation groups and presentation columns are disjoint
2 parents 0bff947 + 68c32c8 commit e8c8cc9

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

reframe/frontend/reporting/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,7 @@ def _group_key(groups, testcase: _TCProxy):
576576
@time_function
577577
def _group_testcases(testcases, groups, columns):
578578
grouped = {}
579+
record_cols = groups + [c for c in columns if c not in groups]
579580
for tc in map(_TCProxy, testcases):
580581
for pvar, reftuple in tc['perfvalues'].items():
581582
pvar = pvar.split(':')[-1]
@@ -587,7 +588,7 @@ def _group_testcases(testcases, groups, columns):
587588

588589
plower = pref * (1 + plower) if plower is not None else -math.inf
589590
pupper = pref * (1 + pupper) if pupper is not None else math.inf
590-
record = _TCProxy(tc, include_only=columns)
591+
record = _TCProxy(tc, include_only=record_cols)
591592
record.update({
592593
'pvar': pvar,
593594
'pval': pval,

unittests/test_cli.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,6 +1297,13 @@ def test_storage_options(run_reframe, tmp_path, table_format):
12971297
assert_no_crash(*run_reframe2(
12981298
action=f'--list-stored-testcases={uuid}/mean:/'
12991299
))
1300+
1301+
# Check disjoint sets of groups and columns
1302+
assert_no_crash(*run_reframe2(
1303+
action='--list-stored-testcases=now-1d:now/mean:uuid/name'
1304+
))
1305+
1306+
# Describe test cases
13001307
assert_no_crash(
13011308
*run_reframe2(action=f'--describe-stored-testcases={uuid}')
13021309
)
@@ -1357,6 +1364,13 @@ def assert_no_crash(returncode, stdout, stderr, exitcode=0):
13571364
)
13581365
)
13591366

1367+
# Check disjoint sets of groups and columns
1368+
assert_no_crash(
1369+
*run_reframe2(
1370+
action='--performance-compare=now-1m:now/now-1d:now/mean:uuid/name'
1371+
)
1372+
)
1373+
13601374
# Check that invalid arguments do not crash the CLI
13611375
assert_no_crash(
13621376
*run_reframe2(

0 commit comments

Comments
 (0)