Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 83624eb

Browse files
authored
Merge pull request #42 from jgebal/feature/adding_failure_on_sources_installation
Updated install script.It now fails on invalid sources after installation
2 parents e7e8fcb + 2fc64b8 commit 83624eb

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

source/install.sql

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
whenever sqlerror exit failure rollback
22
whenever oserror exit failure rollback
33

4+
prompt Installing utplsql framework
45
@@types/ut_object.tps
56
@@types/ut_objects_list.tps
67
@@types/ut_composite_object.tps
@@ -34,7 +35,20 @@ whenever oserror exit failure rollback
3435
@@ut_assert.pkb
3536
@@ut_suite_manager.pkb
3637

37-
select * from user_errors
38-
where name not like 'BIN$%';
38+
39+
prompt Validating installation
40+
select * from user_errors where name not like 'BIN$%' and name like 'UT\_%' escape '\';
41+
42+
declare
43+
l_cnt integer;
44+
begin
45+
select count(1)
46+
into l_cnt
47+
from user_errors where name not like 'BIN$%' and name like 'UT\_%' escape '\';
48+
if l_cnt > 0 then
49+
raise_application_error(-20000, 'Not all sources were successfully installed.');
50+
end if;
51+
end;
52+
/
3953
4054
exit success

0 commit comments

Comments
 (0)