Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 54 additions & 21 deletions source/api/ut.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ create or replace package body ut is
*/

g_nls_date_format varchar2(4000);
gc_fail_on_errors constant boolean := false;

g_result_line_no binary_integer;
g_result_lines ut_varchar2_list := ut_varchar2_list();
Expand Down Expand Up @@ -135,7 +134,8 @@ create or replace package body ut is
a_include_schema_expr varchar2 := null,
a_include_object_expr varchar2 := null,
a_exclude_schema_expr varchar2 := null,
a_exclude_object_expr varchar2 := null
a_exclude_object_expr varchar2 := null,
a_fail_on_errors boolean := false
) is
pragma autonomous_transaction;
begin
Expand All @@ -149,7 +149,7 @@ create or replace package body ut is
a_test_file_mappings,
a_include_objects,
a_exclude_objects,
gc_fail_on_errors,
a_fail_on_errors,
a_client_character_set,
false,
ut_utils.int_to_boolean(a_random_test_order),
Expand Down Expand Up @@ -179,7 +179,8 @@ create or replace package body ut is
a_include_schema_expr varchar2 := null,
a_include_object_expr varchar2 := null,
a_exclude_schema_expr varchar2 := null,
a_exclude_object_expr varchar2 := null
a_exclude_object_expr varchar2 := null,
a_fail_on_errors boolean := false
) is
pragma autonomous_transaction;
begin
Expand All @@ -194,7 +195,7 @@ create or replace package body ut is
ut_file_mapper.build_file_mappings(a_test_files),
a_include_objects,
a_exclude_objects,
gc_fail_on_errors,
a_fail_on_errors,
a_client_character_set,
false,
ut_utils.int_to_boolean(a_random_test_order),
Expand Down Expand Up @@ -254,6 +255,7 @@ create or replace package body ut is
a_include_object_expr varchar2 := null,
a_exclude_schema_expr varchar2 := null,
a_exclude_object_expr varchar2 := null
-- a_fail_on_errors boolean := false
) return ut_varchar2_rows pipelined is
l_reporter ut_reporter_base := a_reporter;
l_results sys_refcursor;
Expand All @@ -274,7 +276,8 @@ create or replace package body ut is
a_include_schema_expr,
a_include_object_expr,
a_exclude_schema_expr,
a_exclude_object_expr
a_exclude_object_expr

);
if l_reporter is of (ut_output_reporter_base) then
l_results := treat(l_reporter as ut_output_reporter_base).get_lines_cursor();
Expand Down Expand Up @@ -302,6 +305,7 @@ create or replace package body ut is
a_include_object_expr varchar2 := null,
a_exclude_schema_expr varchar2 := null,
a_exclude_object_expr varchar2 := null
-- a_fail_on_errors boolean := false
) return ut_varchar2_rows pipelined is
l_reporter ut_reporter_base := a_reporter;
l_results sys_refcursor;
Expand All @@ -323,6 +327,7 @@ create or replace package body ut is
a_include_object_expr,
a_exclude_schema_expr,
a_exclude_object_expr
--a_fail_on_errors
);
if l_reporter is of (ut_output_reporter_base) then
l_results := treat(l_reporter as ut_output_reporter_base).get_lines_cursor();
Expand Down Expand Up @@ -351,6 +356,7 @@ create or replace package body ut is
a_include_object_expr varchar2 := null,
a_exclude_schema_expr varchar2 := null,
a_exclude_object_expr varchar2 := null
-- a_fail_on_errors boolean := false
) return ut_varchar2_rows pipelined is
l_reporter ut_reporter_base := a_reporter;
l_results sys_refcursor;
Expand All @@ -372,6 +378,7 @@ create or replace package body ut is
a_include_object_expr,
a_exclude_schema_expr,
a_exclude_object_expr
--a_fail_on_errors
);
if l_reporter is of (ut_output_reporter_base) then
l_results := treat(l_reporter as ut_output_reporter_base).get_lines_cursor();
Expand Down Expand Up @@ -400,6 +407,7 @@ create or replace package body ut is
a_include_object_expr varchar2 := null,
a_exclude_schema_expr varchar2 := null,
a_exclude_object_expr varchar2 := null
-- a_fail_on_errors boolean := false
) return ut_varchar2_rows pipelined is
l_reporter ut_reporter_base := a_reporter;
l_results sys_refcursor;
Expand All @@ -421,6 +429,7 @@ create or replace package body ut is
a_include_object_expr,
a_exclude_schema_expr,
a_exclude_object_expr
-- a_fail_on_errors
);
if l_reporter is of (ut_output_reporter_base) then
l_results := treat(l_reporter as ut_output_reporter_base).get_lines_cursor();
Expand Down Expand Up @@ -449,6 +458,7 @@ create or replace package body ut is
a_include_object_expr varchar2 := null,
a_exclude_schema_expr varchar2 := null,
a_exclude_object_expr varchar2 := null
-- a_fail_on_errors boolean := false
) return ut_varchar2_rows pipelined is
l_reporter ut_reporter_base := a_reporter;
l_results sys_refcursor;
Expand All @@ -470,6 +480,7 @@ create or replace package body ut is
a_include_object_expr,
a_exclude_schema_expr,
a_exclude_object_expr
-- a_fail_on_errors
);
if l_reporter is of (ut_output_reporter_base) then
l_results := treat(l_reporter as ut_output_reporter_base).get_lines_cursor();
Expand Down Expand Up @@ -498,6 +509,7 @@ create or replace package body ut is
a_include_object_expr varchar2 := null,
a_exclude_schema_expr varchar2 := null,
a_exclude_object_expr varchar2 := null
-- a_fail_on_errors boolean := false
) return ut_varchar2_rows pipelined is
l_reporter ut_reporter_base := a_reporter;
l_results sys_refcursor;
Expand All @@ -518,7 +530,8 @@ create or replace package body ut is
a_include_schema_expr,
a_include_object_expr,
a_exclude_schema_expr,
a_exclude_object_expr
a_exclude_object_expr
-- a_fail_on_errors
);
if l_reporter is of (ut_output_reporter_base) then
l_results := treat(l_reporter as ut_output_reporter_base).get_lines_cursor();
Expand Down Expand Up @@ -547,12 +560,14 @@ create or replace package body ut is
a_include_schema_expr varchar2 := null,
a_include_object_expr varchar2 := null,
a_exclude_schema_expr varchar2 := null,
a_exclude_object_expr varchar2 := null
a_exclude_object_expr varchar2 := null,
a_fail_on_errors boolean := false
) is
l_reporter ut_reporter_base := a_reporter;
begin
l_reporter := coalesce(l_reporter,ut_documentation_reporter());
if a_force_manual_rollback then
l_reporter := coalesce(l_reporter,ut_documentation_reporter());

ut_runner.run(
a_paths,
ut_reporters(l_reporter),
Expand All @@ -562,7 +577,7 @@ create or replace package body ut is
a_test_file_mappings,
a_include_objects,
a_exclude_objects,
gc_fail_on_errors,
a_fail_on_errors,
a_client_character_set,
a_force_manual_rollback,
a_random_test_order,
Expand Down Expand Up @@ -590,13 +605,21 @@ create or replace package body ut is
a_include_schema_expr,
a_include_object_expr,
a_exclude_schema_expr,
a_exclude_object_expr
a_exclude_object_expr
-- a_fail_on_errors
);
end if;
if l_reporter is of (ut_output_reporter_base) then
treat(l_reporter as ut_output_reporter_base).lines_to_dbms_output();
end if;
raise_if_packages_invalidated();

exception when others then
if l_reporter is of (ut_output_reporter_base) then
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any specific reason to add this exception handler?
It seems to be out of scope of the change.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test results won't show up in the output without this exception.
without exception:
Zrzut ekranu 2026-03-09 101007

with exception:
Zrzut ekranu 2026-03-09 101230

treat(l_reporter as ut_output_reporter_base).lines_to_dbms_output();
end if;
raise_if_packages_invalidated();
raise;
end;

procedure run(
Expand All @@ -616,7 +639,8 @@ create or replace package body ut is
a_include_schema_expr varchar2 := null,
a_include_object_expr varchar2 := null,
a_exclude_schema_expr varchar2 := null,
a_exclude_object_expr varchar2 := null
a_exclude_object_expr varchar2 := null,
a_fail_on_errors boolean := false
) is
l_reporter ut_reporter_base := a_reporter;
begin
Expand All @@ -637,7 +661,8 @@ create or replace package body ut is
a_include_schema_expr,
a_include_object_expr,
a_exclude_schema_expr,
a_exclude_object_expr
a_exclude_object_expr ,
a_fail_on_errors
);
end;

Expand All @@ -657,7 +682,8 @@ create or replace package body ut is
a_include_schema_expr varchar2 := null,
a_include_object_expr varchar2 := null,
a_exclude_schema_expr varchar2 := null,
a_exclude_object_expr varchar2 := null
a_exclude_object_expr varchar2 := null,
a_fail_on_errors boolean := false
) is
begin
ut.run(
Expand All @@ -677,7 +703,8 @@ create or replace package body ut is
a_include_schema_expr,
a_include_object_expr,
a_exclude_schema_expr,
a_exclude_object_expr
a_exclude_object_expr ,
a_fail_on_errors
);
end;

Expand All @@ -697,7 +724,8 @@ create or replace package body ut is
a_include_schema_expr varchar2 := null,
a_include_object_expr varchar2 := null,
a_exclude_schema_expr varchar2 := null,
a_exclude_object_expr varchar2 := null
a_exclude_object_expr varchar2 := null,
a_fail_on_errors boolean := false
) is
begin
ut.run(
Expand All @@ -717,7 +745,8 @@ create or replace package body ut is
a_include_schema_expr,
a_include_object_expr,
a_exclude_schema_expr,
a_exclude_object_expr
a_exclude_object_expr ,
a_fail_on_errors
);
end;

Expand All @@ -738,7 +767,8 @@ create or replace package body ut is
a_include_schema_expr varchar2 := null,
a_include_object_expr varchar2 := null,
a_exclude_schema_expr varchar2 := null,
a_exclude_object_expr varchar2 := null
a_exclude_object_expr varchar2 := null,
a_fail_on_errors boolean := false
) is
begin
ut.run(
Expand All @@ -758,7 +788,8 @@ create or replace package body ut is
a_include_schema_expr,
a_include_object_expr,
a_exclude_schema_expr,
a_exclude_object_expr
a_exclude_object_expr ,
a_fail_on_errors
);
end;

Expand All @@ -779,7 +810,8 @@ create or replace package body ut is
a_include_schema_expr varchar2 := null,
a_include_object_expr varchar2 := null,
a_exclude_schema_expr varchar2 := null,
a_exclude_object_expr varchar2 := null
a_exclude_object_expr varchar2 := null,
a_fail_on_errors boolean := false
) is
begin
ut.run(
Expand All @@ -799,7 +831,8 @@ create or replace package body ut is
a_include_schema_expr,
a_include_object_expr,
a_exclude_schema_expr,
a_exclude_object_expr
a_exclude_object_expr,
a_fail_on_errors
);
end;

Expand Down
Loading
Loading