Skip to content

Commit ab17b56

Browse files
committed
Warn/workaround Octave 11.x multiple inheritance bug
... that complains of duplicate method definitions.
1 parent 9ce1f98 commit ab17b56

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

lib/t/test_most.m

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,26 @@
5757
tests{end+1} = 't_most_tlmp';
5858
tests{end+1} = 't_most_w_ds';
5959

60+
%% warning for bug in Octave 11.x
61+
is_octave11 = have_feature('octave') && floor(have_feature('octave', 'vnum')) == 11;
62+
if is_octave11
63+
persistent show_octave11_warning_once;
64+
if isempty(show_octave11_warning_once)
65+
show_octave11_warning_once = 1;
66+
warning(sprintf('\n###############################################################################\n# GNU Octave 11.x has a bug (https://savannah.gnu.org/bugs/index.php?68227) #\n# that results in lots of warnings when running MATPOWER. One workaround is #\n# to turn off all warnings using: warning off #\n# (applied automatically and temporarily for test_most) #\n###############################################################################\n'));
67+
end
68+
w = warning();
69+
warning('off');
70+
end
71+
6072
%% run the tests
6173
all_ok = t_run_tests( tests, verbose );
6274

75+
%% bug in Octave 11.x
76+
if is_octave11
77+
warning(w);
78+
end
79+
6380
%% handle success/failure
6481
if exit_on_fail && ~all_ok
6582
exit(1);

0 commit comments

Comments
 (0)