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

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
169c7c2
Adding additional installation of utPLSQL framework into schema ut3_r…
jgebal Jul 21, 2017
248b243
Changer install.sh to be runnable from both `sqlplus` and `sqlcl`.
jgebal Jul 22, 2017
c79afbd
Trying to test ut3 using ut3 framework installed in separate schema.
jgebal Jul 23, 2017
adbb543
Testing schema `UT3` with tests in schema `UT3_TESTER` and most recen…
jgebal Jul 28, 2017
746eb07
Moved test_annotations from commit a56231c9b232418f589709d5672c1bee23…
Pazus Jul 30, 2017
fe4b993
actualized ut_utils tests to current state of old tests
Pazus Jul 30, 2017
b7c5917
implemented matcher tests
Pazus Jul 30, 2017
2bde41a
Merge remote-tracking branch 'remotes/upstream/develop' into feature/…
Pazus Jul 30, 2017
74f6bc9
splitted old and new tests
Pazus Jul 30, 2017
266ac1f
added test_output_buffer tests
Pazus Jul 30, 2017
fdc2513
Merge branch 'develop' into feature/using_released_to_test_develop
jgebal Aug 2, 2017
d34c9a6
Updated test script to capture failed tests and return non-zero exit …
jgebal Aug 2, 2017
da01280
Merge remote-tracking branch 'upstream/feature/sonar_test_reporter_fi…
jgebal Aug 3, 2017
1b2dd8c
Enabling tests.
jgebal Aug 3, 2017
cc400cb
Fixing utplsql-cli run invocation.
jgebal Aug 3, 2017
34b94de
Enabling coverage for the framework.
jgebal Aug 3, 2017
e2dccea
Merge branch 'feature/sonar_test_reporter_fix' into feature/using_rel…
jgebal Aug 5, 2017
6155357
Changed the cli call to use doc reporter only once
jgebal Aug 5, 2017
d5abea9
enabled test
Pazus Aug 5, 2017
2155b99
added ut_suite_manager tests
Pazus Aug 5, 2017
37e5533
fixed references in test_suite_manager.pkb
Pazus Aug 5, 2017
adb9320
implemented clone of develop branch
Pazus Aug 5, 2017
c6d482c
simple structure
Pazus Aug 5, 2017
c004cc5
Merge remote-tracking branch 'remotes/upstream/develop' into feature/…
Pazus Aug 5, 2017
e678a4e
change to coverage be run for the main branch not the testing branch
Pazus Aug 5, 2017
4121aaf
changed path to sources
Pazus Aug 6, 2017
33ddecc
Update install_and_run_tests.sh
jgebal Aug 6, 2017
7ba703e
Update ut_sonar_test_reporter.tpb
jgebal Aug 6, 2017
ae9fd09
Update .travis.yml
jgebal Aug 6, 2017
97e408c
Update install_and_run_tests.sh
jgebal Aug 6, 2017
067595f
Update .travis.yml
jgebal Aug 6, 2017
dcce789
Update .travis.yml
jgebal Aug 6, 2017
01691eb
Update install_and_run_tests.sh
jgebal Aug 6, 2017
94cd8c6
Switch to new `utplsql-cli` again
jgebal Aug 6, 2017
bf0bd31
Back to old utlplsq-cli
jgebal Aug 6, 2017
d486456
Testing fix on utPLSQL-cli
viniciusam Aug 7, 2017
c0b1a5f
Testing new client build
viniciusam Aug 7, 2017
8e1ab7c
Added source schema parameter
viniciusam Aug 7, 2017
c2af62a
Adding coveralls reporter to check how coveralls handles multiple cov…
jgebal Aug 7, 2017
9180a2b
Merge branch 'feature/remove_pessimistic_coverage_on_project' into fe…
jgebal Aug 7, 2017
7cf00f0
Renamed `tests` directory to `old_tests`.
jgebal Aug 9, 2017
16e5a06
Disabled test due to failures on US7ASCII code page on 12.1 DB
jgebal Aug 13, 2017
cd0d954
Added test for `ut_coverage_sonar_reporter`
jgebal Aug 13, 2017
b330e74
Added test for `ut_coveralls_reporter`
jgebal Aug 13, 2017
c960d44
Fixed failing tests and refactored sonar reporter.
jgebal Aug 13, 2017
41b4849
Fixed issues with framework accessing wrong tables when running self-…
jgebal Aug 17, 2017
48b6b33
Merge remote-tracking branch 'upstream/develop' into feature/using_re…
jgebal Aug 17, 2017
8badb71
Fixed failing test after rename of `tests` to `old_tests`.
jgebal Aug 17, 2017
57902fc
Merge remote-tracking branch 'upstream/develop' into feature/using_re…
jgebal Aug 18, 2017
ff9865a
Moved new test to the old_tests
jgebal Aug 18, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
35 changes: 27 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ addons:
branches:
- develop
- master
- feature/using_released_to_test_develop

services:
- docker
Expand All @@ -23,8 +24,11 @@ env:
global:
- UT3_OWNER=ut3
- UT3_OWNER_PASSWORD=ut3
- UT3_RELEASE_VERSION_SCHEMA=UT3_LATEST_RELEASE
- UT3_USER="UT3\$USER#"
- UT3_USER_PASSWORD=ut3
- UT3_TESTER=ut3_tester
- UT3_TESTER_PASSWORD=ut3
- UT3_TABLESPACE=users
# Environment for building a release
- CURRENT_BRANCH=${TRAVIS_BRANCH}
Expand All @@ -41,6 +45,8 @@ env:
- ORACLE_PWD="oracle"
- UT3_DOCKER_REPO="utplsqlv3/oracledb"
- DOCKHER_HUB_REPO="${DOCKER_BASE_TAG:-$UT3_DOCKER_REPO}"
#utPLSQL released version directory
- UTPLSQL_DIR="utPLSQL"
matrix:
- ORACLE_VERSION="${DOCKER_TAG_11G:-11g-r2-xe}" CONNECTION_STR='127.0.0.1:1521/XE' DOCKER_OPTIONS='--shm-size=1g'
- ORACLE_VERSION="${DOCKER_TAG_12C:-12c-r1-se2}" CONNECTION_STR='127.0.0.1:1521/ORCLPDB1' DOCKER_OPTIONS="-v /dev/pdbs:/opt/oracle/oradata/pdbs"
Expand All @@ -52,7 +58,22 @@ cache:
- $CACHE_DIR
- node_modules

before_install:
#The update_project_version is done before deployment to validate that the change of project files does not break installation
- bash .travis/update_project_version.sh
- git config --global user.email "[email protected]"
- git config --global user.name "${UTPLSQL_BUILD_USER_NAME}"
- git remote rm origin
- git remote add origin https://${github_api_token}@github.com/${UTPLSQL_REPO}
# download latest utPLSQL release
#- curl -LOk $(curl --silent https://api.github.com/repos/utPLSQL/utPLSQL/releases/latest | awk '/browser_download_url/ { print $2 }' | grep ".zip" | sed 's/"//g')
- git clone --depth=1 --branch=develop https://github.com/utPLSQL/utPLSQL.git $UTPLSQL_DIR
# download utPLSQL-cli develop
- curl -Lk -o utPLSQL-cli.zip https://bintray.com/viniciusam/utPLSQL-cli/download_file?file_path=utPLSQL-cli-develop-test3.zip

install:
#- unzip utPLSQL.zip
- unzip utPLSQL-cli.zip && chmod -R u+x utPLSQL-cli
- pip install mkdocs
- bash .travis/install_sqlcl.sh
- sudo mkdir -p /dev/pdbs
Expand All @@ -61,16 +82,14 @@ install:
- df -h

before_script:
#The update_project_version is done before deployment to validate that the change of project files does not break installation
- bash .travis/update_project_version.sh
- git config --global user.email "[email protected]"
- git config --global user.name "${UTPLSQL_BUILD_USER_NAME}"
- git remote rm origin
- git remote add origin https://${github_api_token}@github.com/${UTPLSQL_REPO}
- if [ "${TRAVIS_TAG}" = "" ]; then bash .travis/install.sh; fi
- if [ "${TRAVIS_TAG}" = "" ]; then bash .travis/install_utplsql_release.sh; fi
- if [ "${TRAVIS_TAG}" = "" ]; then bash .travis/create_additional_grants_for_old_tests.sh; fi
- if [ "${TRAVIS_TAG}" = "" ]; then bash .travis/run_examples.sh; fi
- if [ "${TRAVIS_TAG}" = "" ]; then bash .travis/run_old_tests.sh; fi

script:
- if [ "${TRAVIS_TAG}" = "" ]; then bash .travis/install.sh; fi
- if [ "${TRAVIS_TAG}" = "" ]; then bash .travis/run_examples_and_tests.sh; fi
- if [ "${TRAVIS_TAG}" = "" ]; then bash test/install_and_run_tests.sh; fi
- if [ "${TRAVIS_TAG}" = "" ] && [ "${TRAVIS_REPO_SLUG}" = "${UTPLSQL_REPO}" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then sonar-scanner; fi
- if [ "${TRAVIS_TAG}" = "" ]; then bash .travis/coveralls_uploader.sh; fi
- bash .travis/build_docs.sh
Expand Down
8 changes: 4 additions & 4 deletions .travis/coveralls_uploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if (process.env.COVERALLS_URL_BASE) {
url = 'https://coveralls.io/api/v1/jobs';
}

fs.readFile('../tests/coverage.json',function (err,data) {
fs.readFile('../old_tests/coverage.json',function (err,data) {
if (err) {
return console.log(err);
}
Expand All @@ -19,13 +19,13 @@ fs.readFile('../tests/coverage.json',function (err,data) {
if (process.env.COVERALLS_REPO_TOKEN) {
req.repo_token = process.env.COVERALLS_REPO_TOKEN;
}

for (var i in req.source_files) {
req.source_files[i].source_digest = md5File.sync("../" + req.source_files[i].name);
}

var requestStr = JSON.stringify(req);

request.post({url : url, form : { json:requestStr}}, function(err, response, body){process.stdout.write(body);});

});
});
23 changes: 23 additions & 0 deletions .travis/create_additional_grants_for_old_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

cd source
set -ev

#additional privileges to run scripted tests
"$SQLCLI" sys/$ORACLE_PWD@//$CONNECTION_STR AS SYSDBA <<-SQL
set feedback on
--needed for Mystats script to work
grant select any dictionary to $UT3_OWNER;
--Needed for testing a coverage outside ut3_owner.
grant create any procedure, drop any procedure, execute any procedure to $UT3_OWNER;

exit
SQL

#Create additional users
"$SQLCLI" sys/$ORACLE_PWD@//$CONNECTION_STR AS SYSDBA <<-SQL
set feedback off
@create_utplsql_owner.sql $UT3_USER $UT3_USER_PASSWORD $UT3_TABLESPACE

exit
SQL
34 changes: 14 additions & 20 deletions .travis/install.sh
Original file line number Diff line number Diff line change
@@ -1,41 +1,35 @@
#!/bin/bash

cd "$(dirname "$(readlink -f "$0")")"
cd source
set -ev
#install core of utplsql
"$SQLCLI" sys/$ORACLE_PWD@//$CONNECTION_STR AS SYSDBA <<-SQL
pwd
set feedback off
set verify off

@../source/install_headless.sql $UT3_OWNER $UT3_OWNER_PASSWORD
@install_headless.sql $UT3_OWNER $UT3_OWNER_PASSWORD
SQL

#additional privileges to run scripted tests
"$SQLCLI" sys/$ORACLE_PWD@//$CONNECTION_STR AS SYSDBA <<-SQL
set feedback on
--needed for Mystats script to work
grant select any dictionary to $UT3_OWNER;
--Needed for testing a coverage outside ut3_owner.
grant create any procedure, drop any procedure, execute any procedure to $UT3_OWNER;

set feedback off
@../source/create_utplsql_owner.sql $UT3_USER $UT3_USER_PASSWORD $UT3_TABLESPACE

cd ..

--enable plsql debug
--cd development
--@ut_debug_enable.sql
--cd ..

--cd source
[email protected] $UT3_OWNER
--@create_synonyms_and_grants_for_user.sql $UT3_OWNER $UT3_USER
--cd ..

cd development
conn $UT3_OWNER/$UT3_OWNER_PASSWORD@//$CONNECTION_STR
@utplsql_style_check.sql
@../development/utplsql_style_check.sql
exit
SQL

#Create additional users
"$SQLCLI" sys/$ORACLE_PWD@//$CONNECTION_STR AS SYSDBA <<-SQL
set feedback off
@create_utplsql_owner.sql $UT3_TESTER $UT3_TESTER_PASSWORD $UT3_TABLESPACE

set feedback on
--Needed for testing coverage outside of main UT3 schema.
grant create any procedure, drop any procedure, execute any procedure, create any type, drop any type, execute any type, under any type, select any table, update any table, insert any table, delete any table, create any table, drop any table, alter any table, select any dictionary to $UT3_TESTER;
exit
SQL
44 changes: 44 additions & 0 deletions .travis/install_utplsql_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash

set -ev

cd $UTPLSQL_DIR/source

"$SQLCLI" sys/$ORACLE_PWD@//$CONNECTION_STR AS SYSDBA <<SQL
set serveroutput on
set linesize 200
set trimspool on
declare
i integer := 0;
begin
dbms_output.put_line('Dropping synonyms pointing to schema '||upper('${UT3_OWNER}'));
for syn in (
select
case when owner = 'PUBLIC'
then 'public synonym '
else 'synonym ' || owner || '.' end || synonym_name as syn_name,
table_owner||'.'||table_name as for_object
from all_synonyms s
where table_owner = upper('${UT3_OWNER}') and table_owner != owner
)
loop
i := i + 1;
begin
execute immediate 'drop '||syn.syn_name;
dbms_output.put_line('Dropped '||syn.syn_name||' for object '||syn.for_object);
exception
when others then
dbms_output.put_line('FAILED to drop '||syn.syn_name||' for object '||syn.for_object);
end;
end loop;
dbms_output.put_line(i||' synonyms dropped');
end;
/
SQL

"$SQLCLI" sys/$ORACLE_PWD@//$CONNECTION_STR AS SYSDBA @install_headless.sql ${UT3_RELEASE_VERSION_SCHEMA}

"$SQLCLI" sys/$ORACLE_PWD@//$CONNECTION_STR AS SYSDBA <<SQL
grant select any dictionary to ${UT3_RELEASE_VERSION_SCHEMA};
exit
SQL
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,4 @@ conn $UT3_USER/$UT3_USER_PASSWORD@//$CONNECTION_STR

exit

SQL

"$SQLCLI" $UT3_OWNER/$UT3_OWNER_PASSWORD@//$CONNECTION_STR <<SQL
cd tests
@RunAll.sql
exit
SQL
SQL
10 changes: 10 additions & 0 deletions .travis/run_old_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

set -ev

cd old_tests

"$SQLCLI" $UT3_OWNER/$UT3_OWNER_PASSWORD@//$CONNECTION_STR <<SQL
@RunAll.sql
exit
SQL
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 3 additions & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ sonar.projectVersion=v3.0.2
# If not set, SonarQube starts looking for source code from the directory containing
# the sonar-project.properties file.
sonar.sources=./source
sonar.coverageReportPaths=./tests/coverage.xml
sonar.coverageReportPaths=./old_tests/coverage.xml,coverage.xml
sonar.tests=./test
sonar.testExecutionReportPaths=./test_results.xml
sonar.links.issue=https://github.com/utPLSQL/utPLSQL/issues
sonar.links.ci=https://travis-ci.org/utPLSQL/utPLSQL
sonar.links.homepage=https://github.com/utPLSQL/utPLSQL
Expand Down
Loading