Skip to content

Commit 0aa9c35

Browse files
committed
Fixed install scripts.
Fixed examples and old tests.
1 parent 3cdca4d commit 0aa9c35

File tree

6 files changed

+20
-7
lines changed

6 files changed

+20
-7
lines changed

examples/RunExpectations.sql

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ set echo off
1111
@@demo_expectations.pck
1212

1313
begin
14-
ut_coverage.coverage_start_develop();
14+
ut_coverage.coverage_start();
15+
ut_coverage.set_develop_mode(true);
1516
ut.run();
16-
ut_coverage.coverage_stop_develop();
17+
ut_coverage.set_develop_mode(false);
18+
ut_coverage.coverage_stop();
1719
end;
1820
/
1921

old_tests/RunAll.sql

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ create table ut$test_table (val varchar2(1));
3434

3535
--Start coverage in develop mode (coverage for utPLSQL framework)
3636
--Regular coverage excludes the framework
37-
exec ut_coverage.coverage_start_develop();
37+
exec ut_coverage.coverage_start();
38+
exec ut_coverage.set_develop_mode(true);
3839

3940
@@lib/RunTest.sql ut_expectation_processor/who_called_expectation.parseStackTrace.sql
4041
@@lib/RunTest.sql ut_expectation_processor/who_called_expectation.parseStackTraceWith0x.sql
@@ -449,7 +450,8 @@ begin
449450
l_reporter.after_calling_run(l_test_run);
450451
l_reporter.on_finalize(l_test_run);
451452

452-
ut_coverage.coverage_stop_develop();
453+
ut_coverage.set_develop_mode(false);
454+
ut_coverage.coverage_stop();
453455

454456
--run for the second time to get the coverage report
455457
l_reporter := ut_coverage_html_reporter(a_project_name => 'utPLSQL v3');
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
begin
22
$if dbms_db_version.version = 12 and dbms_db_version.release >= 2 or dbms_db_version.version > 12 $then
33
dbms_plsql_code_coverage.create_coverage_tables(force_it => true);
4+
$else
5+
null;
46
$end
57
end;
68
/

source/core/coverage/ut_coverage.pkb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ create or replace package body ut_coverage is
157157
if not is_develop_mode() and not g_is_started then
158158
$if dbms_db_version.version = 12 and dbms_db_version.release >= 2 or dbms_db_version.version > 12 $then
159159
ut_coverage_helper_block.coverage_start( l_run_comment, g_coverage_id(gc_block_coverage) );
160-
-- g_coverage_id(gc_block_coverage) := dbms_plsql_code_coverage.start_coverage( l_run_comment );
161160
$end
162161
ut_coverage_helper_profiler.coverage_start( l_run_comment, g_coverage_id(gc_proftab_coverage) );
163162
coverage_pause();

source/create_synonyms_and_grants_for_public.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ begin
9393
execute immediate 'grant select, insert, delete, update on &&ut3_owner..dbmspcc_blocks to public';
9494
execute immediate 'grant select, insert, delete, update on &&ut3_owner..dbmspcc_runs to public';
9595
execute immediate 'grant select, insert, delete, update on &&ut3_owner..dbmspcc_units to public';
96+
$else
97+
null;
9698
$end
9799
end;
98100
/
@@ -148,6 +150,8 @@ begin
148150
execute immediate 'create public synonym dbmspcc_blocks for &&ut3_owner..dbmspcc_blocks';
149151
execute immediate 'create public synonym dbmspcc_runs for &&ut3_owner..dbmspcc_runs';
150152
execute immediate 'create public synonym dbmspcc_units for &&ut3_owner..dbmspcc_units';
153+
$else
154+
null;
151155
$end
152156
end;
153157
/

source/create_synonyms_and_grants_for_user.sql

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,10 @@ begin
113113
execute immediate 'grant select, insert, delete, update on &&ut3_owner..dbmspcc_blocks to &ut3_user';
114114
execute immediate 'grant select, insert, delete, update on &&ut3_owner..dbmspcc_runs to &ut3_user';
115115
execute immediate 'grant select, insert, delete, update on &&ut3_owner..dbmspcc_units to &ut3_user';
116+
$else
117+
null;
116118
$end
117-
end;
119+
end;
118120
/
119121

120122

@@ -169,6 +171,8 @@ begin
169171
execute immediate 'create or replace synonym &ut3_user..dbmspcc_blocks for &&ut3_owner..dbmspcc_blocks';
170172
execute immediate 'create or replace synonym &ut3_user..dbmspcc_runs for &&ut3_owner..dbmspcc_runs';
171173
execute immediate 'create or replace synonym &ut3_user..dbmspcc_units for &&ut3_owner..dbmspcc_units';
174+
$else
175+
null;
172176
$end
173-
end;
177+
end;
174178
/

0 commit comments

Comments
 (0)