@@ -20,27 +20,6 @@ create or replace package body ut_runner is
2020 /**
2121 * Private functions
2222 */
23- function to_ut_object_list(a_names ut_varchar2_list, a_schema_names ut_varchar2_rows) return ut_object_names is
24- l_result ut_object_names;
25- l_object_name ut_object_name;
26- begin
27- if a_names is not empty then
28- l_result := ut_object_names();
29- for i in 1 .. a_names.count loop
30- l_object_name := ut_object_name(a_names(i));
31- if l_object_name.owner is null then
32- for i in 1 .. cardinality(a_schema_names) loop
33- l_result.extend;
34- l_result(l_result.last) := ut_object_name(a_schema_names(i)||'.'||l_object_name.name);
35- end loop;
36- else
37- l_result.extend;
38- l_result(l_result.last) := l_object_name;
39- end if;
40- end loop;
41- end if;
42- return l_result;
43- end;
4423
4524 procedure finish_run(a_run ut_run, a_force_manual_rollback boolean) is
4625 begin
@@ -51,7 +30,6 @@ create or replace package body ut_runner is
5130 ut_compound_data_helper.cleanup_diff();
5231 if not a_force_manual_rollback then
5332 rollback;
54- ut_utils.cleanup_session_temp_tables;
5533 end if;
5634 end;
5735
@@ -95,9 +73,7 @@ create or replace package body ut_runner is
9573 ) is
9674 l_run ut_run;
9775 l_coverage_schema_names ut_varchar2_rows;
98- l_exclude_object_names ut_object_names := ut_object_names();
99- l_include_object_names ut_object_names;
100- l_paths ut_varchar2_list := ut_varchar2_list();
76+ l_paths ut_varchar2_list;
10177 l_random_test_order_seed positive;
10278 l_tags ut_varchar2_rows := ut_varchar2_rows();
10379 begin
@@ -113,55 +89,50 @@ create or replace package body ut_runner is
11389
11490 ut_event_manager.trigger_event(ut_event_manager.gc_initialize);
11591 ut_event_manager.trigger_event(ut_event_manager.gc_debug, ut_run_info());
92+
11693 if a_random_test_order_seed is not null then
11794 l_random_test_order_seed := a_random_test_order_seed;
11895 elsif a_random_test_order then
11996 dbms_random.seed( to_char(systimestamp,'yyyyddmmhh24missffff') );
12097 l_random_test_order_seed := trunc(dbms_random.value(1, 1000000000));
12198 end if;
122- if a_paths is null or a_paths is empty or a_paths.count = 1 and a_paths(1) is null then
99+
100+ l_paths := ut_utils.filter_list(ut_utils.string_table_to_table(a_paths,','), '.+');
101+ if l_paths is null or l_paths is empty then
123102 l_paths := ut_varchar2_list(sys_context('userenv', 'current_schema'));
124- else
125- for i in 1..a_paths.count loop
126- l_paths := l_paths multiset union ut_utils.string_to_table(a_string => a_paths(i),a_delimiter => ',');
127- end loop;
128103 end if;
129104
130105 begin
131106 ut_expectation_processor.reset_invalidation_exception();
132107 ut_utils.save_dbms_output_to_cache();
133108
134109 ut_console_reporter_base.set_color_enabled(a_color_console);
110+
135111 if a_coverage_schemes is not empty then
136112 l_coverage_schema_names := ut_utils.convert_collection(a_coverage_schemes);
137113 else
138114 l_coverage_schema_names := ut_suite_manager.get_schema_names(l_paths);
139115 end if;
140116
141- if a_exclude_objects is not empty then
142- l_exclude_object_names := to_ut_object_list(a_exclude_objects, l_coverage_schema_names);
143- end if;
144-
117+
145118 if a_tags is not null then
146- l_tags := l_tags multiset union distinct ut_utils.convert_collection(
119+ l_tags := l_tags multiset union distinct ut_utils.convert_collection(
147120 ut_utils.trim_list_elements(ut_utils.filter_list(ut_utils.string_to_table(a_tags,','),ut_utils.gc_word_no_space))
148121 );
149122 end if;
150- l_exclude_object_names := l_exclude_object_names multiset union all ut_suite_manager.get_schema_ut_packages(l_coverage_schema_names);
151-
152- l_include_object_names := to_ut_object_list(a_include_objects, l_coverage_schema_names);
153123
154124 l_run := ut_run(
155- null,
156- l_paths,
157- l_coverage_schema_names,
158- l_exclude_object_names,
159- l_include_object_names,
160- set(a_source_file_mappings),
161- set(a_test_file_mappings),
162- a_client_character_set,
163- l_random_test_order_seed,
164- l_tags
125+ a_run_paths => l_paths,
126+ a_coverage_options => ut_coverage_options(
127+ schema_names => l_coverage_schema_names,
128+ exclude_objects => ut_utils.convert_collection(a_exclude_objects),
129+ include_objects => ut_utils.convert_collection(a_include_objects),
130+ file_mappings => set(a_source_file_mappings)
131+ ),
132+ a_test_file_mappings => set(a_test_file_mappings),
133+ a_client_character_set => a_client_character_set,
134+ a_random_test_order_seed => l_random_test_order_seed,
135+ a_run_tags => l_tags
165136 );
166137
167138 ut_suite_manager.configure_execution_by_path(l_paths, l_run.items, l_random_test_order_seed, l_tags);
@@ -296,5 +267,15 @@ create or replace package body ut_runner is
296267 return l_result;
297268 end;
298269
270+ procedure coverage_start(a_coverage_run_id raw) is
271+ begin
272+ ut_coverage.coverage_start(a_coverage_run_id);
273+ end;
274+
275+ procedure coverage_stop is
276+ begin
277+ ut_coverage.coverage_stop;
278+ end;
279+
299280end ut_runner;
300281/
0 commit comments