Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
e623664
Merge remote-tracking branch 'origin/master' into develop
jgebal Feb 23, 2020
532073b
Updated version to 3.1.11
jgebal Feb 23, 2020
1b00d27
Updated project version after build [skip ci]
Feb 23, 2020
63f17a2
Improved the way utPLSQL checks if user has the `execute any procedur…
jgebal Mar 12, 2020
4979cf9
Added check for sys grants added via role when installing utPLSQL fra…
jgebal Mar 12, 2020
5532191
Merge pull request #1056 from utPLSQL/feature/improve_ut3_user_support
jgebal Mar 14, 2020
4d865ae
Fixed flay tests that can fail on occasion when a second flips during…
jgebal Mar 14, 2020
d9fc007
Merge pull request #1058 from utPLSQL/feature/fixing_flaky_tests
jgebal Mar 14, 2020
8d37591
Updated project version after build [skip ci]
Mar 14, 2020
725d367
Refactored and fixed code to use be fully schema-independent.
jgebal Mar 15, 2020
2c0b2d0
Refactored tests to comply with new schema layout
jgebal Mar 15, 2020
0d9eddc
Fixing examples run
jgebal Mar 15, 2020
179586a
Enabled echo and feedback for examples
jgebal Mar 15, 2020
0793607
Enabled echo and feedback for examples
jgebal Mar 15, 2020
eb5dad6
Changed the way session context is created.
jgebal Mar 15, 2020
22f0ec7
Fixed failing tests - wrong context name
jgebal Mar 16, 2020
09b79bf
Removed copy of ojdbc jar files - no longed valid and no longer needed.
jgebal Mar 17, 2020
6e2a4b4
Updated documentation. No need to download OJDBC drivers anymore.
jgebal Mar 17, 2020
6b1dad8
Merge pull request #1059 from utPLSQL/feature/swap_develop_schema
jgebal Mar 17, 2020
ea4c9fb
Updated project version after build [skip ci]
Mar 17, 2020
b8c0287
Resolves issue #1060 with suites not properly built with GERMAN (non-…
jgebal Mar 25, 2020
2689052
Merge pull request #1061 from utPLSQL/bugfix/suitepath_with_nlssort
jgebal Mar 25, 2020
fa4c6b7
Restructuring utPSLQL install guide.
jgebal Mar 25, 2020
62ef235
Fixed some typos
jgebal Mar 26, 2020
4be8465
Merge pull request #1063 from utPLSQL/feature/install_doc_update
jgebal Mar 27, 2020
72a6809
Updated project version after build [skip ci]
Mar 27, 2020
83ee513
Added explicit requirements
jgebal Mar 29, 2020
c5d53fb
Added explicit 11g release 2 requirement
jgebal Mar 29, 2020
41328a5
Merge pull request #1065 from utPLSQL/feature/add_explicit_requirements
jgebal Mar 31, 2020
789ad61
Updated project version after build [skip ci]
Apr 1, 2020
0dd978f
grant privileges to debug via UT3_USER
PhilippSalvisberg Jun 4, 2020
9ea6ab4
add test case to reproduce bug #1073
PhilippSalvisberg Jun 4, 2020
bfe94cd
handle nested CDATA sections to fix bug #1073
PhilippSalvisberg Jun 4, 2020
6631930
support Oracle DB 11.2, add ace only on 12c and higher
PhilippSalvisberg Jun 4, 2020
d9a0457
Merge pull request #1075 from utPLSQL/bugfix/issue-1073-nested-cdata
PhilippSalvisberg Jun 4, 2020
c465151
Updated project version after build [skip ci]
Jun 4, 2020
a3b3a20
Changed `dbms_plssqlcode` tables to be permanent.
jgebal Jun 10, 2020
199ce0b
Merge pull request #1078 from utPLSQL/feature/change_coverage_to_perm…
jgebal Jun 10, 2020
93fd222
Reworked coverage to allow for gathering coverage without calling utP…
jgebal Jun 10, 2020
a23f7be
Updated project version after build [skip ci]
Jun 10, 2020
641d87c
Removed mocking API for coverage,
jgebal Jun 13, 2020
52e1db9
Workaround for 12.2 issue with conditional compilation in package spec.
jgebal Jun 14, 2020
a17c3af
cleanup of unneeded safety code
jgebal Jun 14, 2020
09ab226
Refactoring tests
jgebal Jun 14, 2020
631d6da
Renamed master to main
jgebal Jun 14, 2020
d5cca04
Merge pull request #1080 from utPLSQL/feature/rename_from_master_to_main
jgebal Jun 15, 2020
4e7631b
Updated project version after build [skip ci]
Jun 15, 2020
e9e4b9e
Reorganized and cleaned up tests to have only one package used for co…
jgebal Jun 21, 2020
a4ae4cf
Removed dead code.
jgebal Jun 21, 2020
0e72abc
Added support for client_character_set as report parameter.
jgebal Jun 21, 2020
955de5c
Made coverage_run_id mandatory in `ut_coverage_options`
jgebal Jun 21, 2020
cd7d738
Fixed CDATA tagging in JUnit reporter
jgebal Jun 28, 2020
20bf6dd
Merge pull request #1085 from utPLSQL/feature/fix_cdata_tagging
jgebal Jul 18, 2020
2956d07
Updated project version after build [skip ci]
Jul 18, 2020
ad39737
Merge pull request #1079 from utPLSQL/feature/standalone_coverage
jgebal Jul 18, 2020
89d546a
Extended UK on ut_coverage_sources_tmp table.
jgebal Jul 18, 2020
461bc01
Updated project version after build [skip ci]
Jul 19, 2020
e96b978
Added object type to name in coverage reports.
jgebal Jul 20, 2020
09e495e
Merge pull request #1091 from utPLSQL/feature/fix_coverage_uk_violati…
jgebal Jul 20, 2020
507c176
Updated project version after build [skip ci]
Jul 20, 2020
959c1c9
Added example of a reporter that reports out all expectation outputs,…
jgebal Aug 3, 2020
81d4194
Fixes to annotation parsing.
jgebal Aug 3, 2020
86e335e
Fixed issue by removing owner from beginning of source code.
jgebal Aug 3, 2020
74b77b5
Merge pull request #1093 from utPLSQL/feature/fix_ddl_trigger_parsing
jgebal Aug 9, 2020
7eeae39
Updated project version after build [skip ci]
Aug 9, 2020
eced7a5
add executable flag (required on macOS and Linux)
PhilippSalvisberg Dec 9, 2020
7812a8a
resolves #1111 - use dbms_crypto instead of dbms_obfuscation_toolkit
PhilippSalvisberg Dec 9, 2020
abfa190
Merge pull request #1112 from utPLSQL/feature/issue-1111-oracle-21c
jgebal Dec 9, 2020
04b5f52
Updated project version after build [skip ci]
Dec 9, 2020
ae50802
Added missing <classes> tag
OsBlaineOra May 20, 2021
bbc8e9a
Merge pull request #1137 from OsBlaineOra/bugfix/partial_fix_1107_Mis…
jgebal May 20, 2021
ed87327
Merge pull request #1092 from utPLSQL/feature/sample_reporters
jgebal May 20, 2021
12f9bdf
Updated unit tests after coverage format fix
jgebal May 20, 2021
f671acf
Merge pull request #1138 from utPLSQL/feature/test_fixes_after_covera…
jgebal May 20, 2021
75037c8
Updated project version after build [skip ci]
May 20, 2021
7498530
Replaced hard coded 0 in total test coverage
OsBlaineOra Jun 1, 2021
70ccc22
Update readme.md
jgebal Aug 17, 2021
3b7687b
Update readme.md
jgebal Aug 17, 2021
cbfac19
Updated project version after build [skip ci]
Aug 17, 2021
4acb559
Adjusting build to work with new travis server.
jgebal Aug 17, 2021
59f630c
Merge pull request #1152 from utPLSQL/feature/move_to_travis-ci.com
jgebal Aug 18, 2021
ff11584
Updated project version after build [skip ci]
Aug 18, 2021
b0031ab
Update annotations documentation
jgebal Sep 3, 2021
b33d395
Updated project version after build [skip ci]
Sep 4, 2021
4e2b9f5
Fixed a divide by zero error.
OsBlaineOra Sep 7, 2021
9cbcaa1
Update of slack invite link
jgebal Oct 29, 2021
56ee7c9
Update link for slack
jgebal Oct 29, 2021
2967725
Adjusting tests for Oracle21cXE
jgebal Nov 3, 2021
a36d796
Adding ORacle 21c XE to the build process
jgebal Nov 3, 2021
ee7d9e2
Adding Oracle 21c XE to the build process
jgebal Nov 3, 2021
e48508f
Updated project version after build [skip ci]
Nov 4, 2021
14eca7f
Adding noparallel hint to elements causing issues on parallel-enabled…
jgebal Aug 17, 2021
f35694e
Added no_parallel hints to all SQLs to assure stable performance on p…
jgebal Nov 7, 2021
b7fbfeb
Merge pull request #1158 from utPLSQL/feature/add_21cXE_to_pipeline
jgebal Nov 7, 2021
c930ba6
Updated project version after build [skip ci]
Nov 7, 2021
45d1d5b
Improved build speed by ~1.5 minute
jgebal Nov 8, 2021
8080604
Testing build on images from Gerald Venzl
jgebal Nov 9, 2021
23d8651
Testing build on images from Gerald Venzl
jgebal Nov 10, 2021
2c1624e
Disabled 11g build from Gerald as utPLSQL fails on that build.
jgebal Nov 11, 2021
78ae58d
Increasing wait time before proceeding with background job run for tests
jgebal Nov 11, 2021
938a06f
Merge pull request #1160 from utPLSQL/feature/fix_cache_when_parallel…
jgebal Nov 11, 2021
9388cb3
Updated project version after build [skip ci]
Nov 11, 2021
e4c67a9
Merge pull request #1162 from utPLSQL/feature/build_process_improvements
jgebal Nov 11, 2021
1e19520
Updated project version after build [skip ci]
Nov 11, 2021
38c53b6
Update copyright dates in license
jgebal Nov 15, 2021
000aeab
Updated project version after build [skip ci]
Nov 15, 2021
581991b
Fixed failing tests and improved coverage reporting
jgebal Nov 15, 2021
b4c7db8
Merge pull request #1140 from OsBlaineOra/bugfix/missing_total_lines_…
jgebal Nov 15, 2021
ad5faa8
Updated project version after build [skip ci]
Nov 15, 2021
fae53a4
Removed duplicate profiler table installation.
jgebal Nov 16, 2021
159f4be
Merge pull request #1164 from utPLSQL/bugfix/duplicated_profiler_tabl…
jgebal Nov 16, 2021
f841ecf
Updated project version after build [skip ci]
Nov 16, 2021
36279f9
Merge branch 'develop' into release/v3.1.11
jgebal Nov 16, 2021
5eaefd3
Updated project version after build [skip ci]
Nov 16, 2021
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
53 changes: 35 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ env:
- UT3_TESTER_HELPER=UT3_TESTER_HELPER
- UT3_TESTER_HELPER_PASSWORD=ut3
- UT3_TABLESPACE=users
- BUILD_DIR=${TRAVIS_BUILD_DIR}
- JOB_ID=${TRAVIS_JOB_ID}
- JOB_NUMBER=${TRAVIS_JOB_NUMBER}
- PULL_REQUEST_NAME=${TRAVIS_PULL_REQUEST}
- PULL_REQUEST_BRANCH=${TRAVIS_PULL_REQUEST_BRANCH}
- TAG_NAME=${TRAVIS_TAG}
- REPO_SLUG=${TRAVIS_REPO_SLUG}
- PR_SLUG=${TRAVIS_PULL_REQUEST_SLUG}
- BRANCH_NAME=${TRAVIS_BRANCH}
# Environment for building a release
- CURRENT_BRANCH=${TRAVIS_BRANCH}
- UTPLSQL_REPO="utPLSQL/utPLSQL"
Expand All @@ -35,25 +44,28 @@ env:
- UTPLSQL_BUILD_USER_NAME="Travis CI"
- CACHE_DIR=$HOME/.cache
# Database Env
- SQLCLI="$HOME/sqlcl/bin/sql"
- OJDBC_HOME="$HOME/sqlcl/lib"
- SQLCLI="${BUILD_DIR}/sqlcl/bin/sql"
- OJDBC_HOME="${BUILD_DIR}/ojdbc"
- ORACLE_PWD="oracle"
- UT3_DOCKER_REPO="utplsqlv3/oracledb"
- DOCKHER_HUB_REPO="${DOCKER_BASE_TAG:-$UT3_DOCKER_REPO}"
- DOCKHER_HUB_REPO="utplsqlv3/oracledb"
- DOCKER_VOLUME="/home/oracle/host"
- DOCKER_ENV="-e SQLCLI=sqlplus -e UT3_DEVELOP_SCHEMA -e UT3_DEVELOP_SCHEMA_PASSWORD -e UT3_RELEASE_VERSION_SCHEMA -e UT3_RELEASE_VERSION_SCHEMA_PASSWORD -e UT3_USER -e UT3_USER_PASSWORD -e UT3_TESTER -e UT3_TESTER_PASSWORD -e UT3_TESTER_HELPER -e UT3_TESTER_HELPER_PASSWORD -e UT3_TABLESPACE -e ORACLE_PWD -e CONNECTION_STR -e UTPLSQL_DIR"
#utPLSQL released version directory
- UTPLSQL_DIR="utPLSQL_latest_release"
- SELFTESTING_BRANCH=${TRAVIS_BRANCH}
- UTPLSQL_CLI_VERSION="3.1.8"
# Maven
- MAVEN_HOME=/usr/local/maven
- MAVEN_CFG=$HOME/.m2
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-small}" CONNECTION_STR='127.0.0.1:1521/ORCLCDB'
- ORACLE_VERSION="${DOCKER_TAG_12C2:-12c-r2-se2-small}" CONNECTION_STR='127.0.0.1:1521/ORCLCDB'
- ORACLE_VERSION="${DOCKER_TAG_18:-18c-se2-small}" CONNECTION_STR='127.0.0.1:1521/ORCLCDB'
- ORACLE_VERSION="${DOCKER_TAG_19:-19c-se2-small}" CONNECTION_STR='127.0.0.1:1521/ORCLCDB'
- ORACLE_VERSION="${DOCKER_TAG_21XE:-21c-xe-full}" CONNECTION_STR='127.0.0.1:1521/XEPDB1' DOCKER_OPTIONS='-e ORACLE_PASSWORD=oracle'
jobs:
- ORACLE_VERSION="11g-r2-xe" CONNECTION_STR='127.0.0.1:1521/XE' DOCKER_VOLUME="/mnt/host" DOCKER_OPTIONS='--shm-size=1g'
# - ORACLE_VERSION="11-full" CONNECTION_STR='127.0.0.1:1521/XE' DOCKHER_HUB_REPO="gvenzl/oracle-xe" DOCKER_OPTIONS='-e ORACLE_PASSWORD=oracle --shm-size=1g' DOCKER_VOLUME="/mnt/host"
- ORACLE_VERSION="12c-r1-se2-small" CONNECTION_STR='127.0.0.1:1521/ORCLCDB'
- ORACLE_VERSION="12c-r2-se2-small" CONNECTION_STR='127.0.0.1:1521/ORCLCDB'
- ORACLE_VERSION="18-slim" CONNECTION_STR='127.0.0.1:1521/XEPDB1' DOCKHER_HUB_REPO="gvenzl/oracle-xe" DOCKER_OPTIONS='-e ORACLE_PASSWORD=oracle'
- ORACLE_VERSION="18c-se2-small" CONNECTION_STR='127.0.0.1:1521/ORCLCDB'
- ORACLE_VERSION="19c-se2-small" CONNECTION_STR='127.0.0.1:1521/ORCLCDB'
- ORACLE_VERSION="21-full" CONNECTION_STR='127.0.0.1:1521/XEPDB1' DOCKHER_HUB_REPO="gvenzl/oracle-xe" DOCKER_OPTIONS='-e ORACLE_PASSWORD=oracle'

cache:
pip: true
Expand All @@ -73,24 +85,29 @@ before_install:
#Allow for sonar to blame issues
- git fetch --unshallow
# 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=${SELFTESTING_BRANCH:-main} https://github.com/utPLSQL/utPLSQL.git $UTPLSQL_DIR
# download latest utPLSQL-cli release
- curl -Lk -o utPLSQL-cli.zip https://github.com/utPLSQL/utPLSQL-cli/releases/download/v${UTPLSQL_CLI_VERSION}/utPLSQL-cli.zip

install:
#- unzip utPLSQL.zip
- unzip utPLSQL-cli.zip && chmod -R u+x utPLSQL-cli
- bash .travis/install_sqlcl.sh
# - curl -Lk -o sqlcl-latest.zip https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-latest.zip
# - unzip -q sqlcl-latest.zip -d $HOME
- mkdir -p ${OJDBC_HOME} #get JDBC driver and orai18n
- curl -Lk -o ${OJDBC_HOME}/ojdbc8.jar https://download.oracle.com/otn-pub/otn_software/jdbc/213/ojdbc8.jar
- curl -Lk -o ${OJDBC_HOME}/orai18n.jar https://download.oracle.com/otn-pub/otn_software/jdbc/213/orai18n.jar
# Chmod is needed to allow for write access within from docker container volume
- chmod -R go+w ./{source,test,examples,${UTPLSQL_DIR}/source}
- if [[ ! $TRAVIS_TAG ]]; then bash .travis/start_db.sh; fi
- if [[ ! $TRAVIS_TAG ]]; then docker exec ${ORACLE_VERSION} ${DOCKER_VOLUME}/.travis/install.sh; fi
- if [[ ! $TRAVIS_TAG ]]; then docker exec ${ORACLE_VERSION} ${DOCKER_VOLUME}/.travis/install_utplsql_release.sh; fi

before_script:
- 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/run_examples.sh; fi
- if [[ ! $TRAVIS_TAG ]]; then docker exec ${ORACLE_VERSION} ${DOCKER_VOLUME}/.travis/run_examples.sh; fi
- if [[ ! $TRAVIS_TAG ]]; then docker exec ${ORACLE_VERSION} ${DOCKER_VOLUME}/test/install_tests.sh; fi

script:
- if [[ ! $TRAVIS_TAG ]]; then bash test/install_and_run_tests.sh; fi
- if [[ ! $TRAVIS_TAG ]]; then bash test/run_tests.sh; fi
- if [[ ! $TRAVIS_TAG ]]; then bash .travis/validate_report_files.sh; fi
- if [[ ! $TRAVIS_TAG ]] && [[ ("${TRAVIS_REPO_SLUG}" = "${UTPLSQL_REPO}" && "${TRAVIS_PULL_REQUEST}" == false) || ("${TRAVIS_PULL_REQUEST_SLUG}" = "${UTPLSQL_REPO}") ]]; then bash .travis/run_sonar_scanner.sh; fi
- if [[ ! $TRAVIS_TAG ]]; then bash .travis/coveralls_uploader.sh; fi
Expand Down
2 changes: 1 addition & 1 deletion .travis/coveralls_uploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fs.readFile('../coverage.json',function (err,data) {
return console.log(err);
}
req = JSON.parse(data);
req.service_job_id = process.env.TRAVIS_JOB_ID;
req.service_job_id = process.env.JOB_ID;
req.service_name = 'travis-ci';
if (process.env.COVERALLS_REPO_TOKEN) {
req.repo_token = process.env.COVERALLS_REPO_TOKEN;
Expand Down
5 changes: 3 additions & 2 deletions .travis/install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash

cd source
set -ev
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
cd ${SCRIPT_DIR}/../source

INSTALL_FILE="install_headless_with_trigger.sql"
if [[ ! -f "${INSTALL_FILE}" ]]; then
Expand All @@ -20,7 +21,7 @@ alter session set plsql_optimize_level=0;
SQL

#Run this step only on second child job (12.1 - at it's fastest)
if [[ "${TRAVIS_JOB_NUMBER}" =~ \.2$ ]]; then
if [[ "${JOB_NUMBER}" =~ \.2$ ]]; then

#check code-style for errors
time "$SQLCLI" $UT3_DEVELOP_SCHEMA/$UT3_DEVELOP_SCHEMA_PASSWORD@//$CONNECTION_STR @../development/utplsql_style_check.sql
Expand Down
20 changes: 0 additions & 20 deletions .travis/install_sqlcl.sh

This file was deleted.

4 changes: 2 additions & 2 deletions .travis/install_utplsql_release.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

set -ev

cd $UTPLSQL_DIR/source
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
cd ${SCRIPT_DIR}/../${UTPLSQL_DIR}/source

"$SQLCLI" sys/$ORACLE_PWD@//$CONNECTION_STR AS SYSDBA <<SQL
set serveroutput on
Expand Down
10 changes: 5 additions & 5 deletions .travis/push_docs_to_github_io.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ GITHUB_IO_BRANCH='main'
# TRAVIS_* variables are set by travis directly and only need to be if testing externally

# We deploy only when building on develop branch or on TAG (release)
if [ "$TRAVIS_PULL_REQUEST" == "false" ] && { [ "${CURRENT_BRANCH}" == "${LATEST_DOCS_BRANCH}" ] || [ -n "${TRAVIS_TAG}" ]; }; then
if [ "${PULL_REQUEST_NAME}" == "false" ] && { [ "${CURRENT_BRANCH}" == "${LATEST_DOCS_BRANCH}" ] || [ -n "${TAG_NAME}" ]; }; then

# ENV Variable checks are to help with configuration troubleshooting, they silently exit with unique message.
# Anyone one of them not set can be used to turn off this functionality.
Expand All @@ -47,7 +47,7 @@ if [ "$TRAVIS_PULL_REQUEST" == "false" ] && { [ "${CURRENT_BRANCH}" == "${LATEST
cp -a ../../docs/. ./develop

# If a Tagged Build then copy to it's own directory as well and to the 'latest' release directory
if [ -n "$TRAVIS_TAG" ]; then
if [ -n "${TAG_NAME}" ]; then
echo "Creating directory ./${UTPLSQL_VERSION}"
mkdir -p ./${UTPLSQL_VERSION}
rm -rf ./${UTPLSQL_VERSION}/**./* || exit 0
Expand Down Expand Up @@ -81,10 +81,10 @@ if [ "$TRAVIS_PULL_REQUEST" == "false" ] && { [ "${CURRENT_BRANCH}" == "${LATEST
echo "" >>index.md
fi
#If build running on a TAG - it's a new release - need to add it to documentation
if [ -n "${TRAVIS_TAG}" ]; then
sed -i '7s@.*@'" - [Latest ${TRAVIS_TAG} documentation](latest/) - Created $now"'@' index.md
if [ -n "${TAG_NAME}" ]; then
sed -i '7s@.*@'" - [Latest ${TAG_NAME} documentation](latest/) - Created $now"'@' index.md
#add entry to the top of version history (line end of file - ## Released Version Doc History
sed -i '12i'" - [${TRAVIS_TAG} documentation](${UTPLSQL_VERSION}/) - Created $now" index.md
sed -i '12i'" - [${TAG_NAME} documentation](${UTPLSQL_VERSION}/) - Created $now" index.md
fi
#replace 4th line in log
sed -i '8s@.*@'" - [Latest development version](develop/) - Created $now"'@' index.md
Expand Down
4 changes: 2 additions & 2 deletions .travis/push_release_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# We are updating version number only when:
# - not a pull request
# - branch name is = develop or branch name is like release/vX.X.X...
if [ "${TRAVIS_REPO_SLUG}" = "${UTPLSQL_REPO}" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [[ "${CURRENT_BRANCH}" =~ ^(release/v[0-9]+\.[0-9]+\.[0-9]+.*|develop)$ ]]; then
if [ "${REPO_SLUG}" = "${UTPLSQL_REPO}" ] && [ "${PULL_REQUEST_NAME}" == "false" ] && [[ "${CURRENT_BRANCH}" =~ ^(release/v[0-9]+\.[0-9]+\.[0-9]+.*|develop)$ ]]; then
echo Current branch is "${CURRENT_BRANCH}"
echo "Committing version & buildNo into branch (${CURRENT_BRANCH})"
git add sonar-project.properties
Expand All @@ -14,5 +14,5 @@ if [ "${TRAVIS_REPO_SLUG}" = "${UTPLSQL_REPO}" ] && [ "$TRAVIS_PULL_REQUEST" ==
echo "Pushing to origin"
git push --quiet origin HEAD:${CURRENT_BRANCH}
else
echo "Publishing of version skipped for branch ${CURRENT_BRANCH}, pull request ${TRAVIS_PULL_REQUEST}"
echo "Publishing of version skipped for branch ${CURRENT_BRANCH}, pull request ${PULL_REQUEST_NAME}"
fi
4 changes: 2 additions & 2 deletions .travis/run_examples.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

cd "$(dirname "$(readlink -f "$0")")"/../examples

set -ev
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
cd ${SCRIPT_DIR}/../examples

"$SQLCLI" $UT3_DEVELOP_SCHEMA/$UT3_DEVELOP_SCHEMA_PASSWORD@//$CONNECTION_STR <<SQL

Expand Down
16 changes: 8 additions & 8 deletions .travis/run_sonar_scanner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,28 @@ function add_sonar_property {
}


if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
BRANCH=$TRAVIS_BRANCH;
if [ "${PULL_REQUEST_NAME}" == "false" ]; then
BRANCH=${BRANCH_NAME};
PR_BRANCH=""
echo "BRANCH=$BRANCH"
else
BRANCH=$TRAVIS_PULL_REQUEST_BRANCH
PR_BRANCH=$TRAVIS_BRANCH
echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, PR=$TRAVIS_PULL_REQUEST, BRANCH=$BRANCH"
BRANCH=${PULL_REQUEST_BRANCH}
PR_BRANCH=${BRANCH_NAME}
echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, PR=${PULL_REQUEST_NAME}, BRANCH=$BRANCH"

fi


#Are we running on utPLSQL repo and not an external PR?
echo "Check if we running from develop or on branch"
if [ "${TRAVIS_REPO_SLUG}" = "${UTPLSQL_REPO}" ] && [[ ! "${BRANCH}" =~ ^(release/v[0-9]+\.[0-9]+\.[0-9]+.*|"${MAIN_DEV_BRANCH}")$ ]]; then
if [ "${REPO_SLUG}" = "${UTPLSQL_REPO}" ] && [[ ! "${BRANCH}" =~ ^(release/v[0-9]+\.[0-9]+\.[0-9]+.*|"${MAIN_DEV_BRANCH}")$ ]]; then

echo "" >> sonar-project.properties
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
if [ "${PULL_REQUEST_NAME}" == "false" ]; then
echo "Updating sonar properties to include branch ${BRANCH}"
add_sonar_property "${BRANCH_SONAR_PROPERTY}" "${BRANCH}"
add_sonar_property "${BRANCH_SONAR_TARGET_PROPERTY}" "${MAIN_DEV_BRANCH}"
elif [ "${TRAVIS_PULL_REQUEST_SLUG}" = "${TRAVIS_REPO_SLUG}" ]; then
elif [ "${PR_SLUG}" = "${REPO_SLUG}" ]; then
echo "Updating sonar properties to include pull request ${BRANCH}"
add_sonar_property "${PR_SONAR_TOKEN_PROPERTY}" "${GITHUB_TRAVISCI_TOKEN}"
add_sonar_property "${PR_SONAR_BRANCH_PROPERTY}" "${BRANCH}"
Expand Down
5 changes: 1 addition & 4 deletions .travis/start_db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ else
mkdir -p $HOME/.docker && cp $CACHE_DIR/.docker/config.json $HOME/.docker/
fi

df -h
time docker pull $DOCKHER_HUB_REPO:$ORACLE_VERSION
df -h
docker run -d --name $ORACLE_VERSION $DOCKER_OPTIONS -p 1521:1521 $DOCKHER_HUB_REPO:$ORACLE_VERSION
docker run -d --name $ORACLE_VERSION --mount type=bind,source=${BUILD_DIR},target=${DOCKER_VOLUME} $DOCKER_OPTIONS $DOCKER_ENV -p 1521:1521 $DOCKHER_HUB_REPO:$ORACLE_VERSION
time docker logs -f $ORACLE_VERSION | grep -m 1 "DATABASE IS READY TO USE!" --line-buffered
df -h
4 changes: 2 additions & 2 deletions .travis/validate_report_files.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bash

GL_VALID=1
XSD_DIR="$TRAVIS_BUILD_DIR/.travis/xsd"
XML_JAR_DIR="$TRAVIS_BUILD_DIR/.travis/lib"
XSD_DIR="$BUILD_DIR/.travis/xsd"
XML_JAR_DIR="$BUILD_DIR/.travis/lib"
#XML Validator
XML_VALIDATOR="$XML_JAR_DIR/xml_validator.jar"
HTML_VALIDATOR_URL="https://validator.w3.org/nu/"
Expand Down
3 changes: 2 additions & 1 deletion development/template.env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

export SQLCLI=sql # For sqlcl client
#export SQLCLI=sqlplus # For sqlplus client
export CONNECTION_STR=127.0.0.1:1521/xe # Adjust the connect string
export CONNECTION_STR=127.0.0.1:1521/xe ORACLE_VERSION=11g-r2-xe# Adjust the connect string
export ORACLE_PWD=oracle # Adjust your local SYS password
export UTPLSQL_CLI_VERSION="3.1.6"
export SELFTESTING_BRANCH=develop
Expand All @@ -19,3 +19,4 @@ export UT3_TESTER_HELPER_PASSWORD=ut3
export UT3_TABLESPACE=users
export UT3_USER="UT3\$USER#"
export UT3_USER_PASSWORD=ut3
export DOCKER_ENV="-e SQLCLI=sqlplus -e UT3_DEVELOP_SCHEMA -e UT3_DEVELOP_SCHEMA_PASSWORD -e UT3_RELEASE_VERSION_SCHEMA -e UT3_RELEASE_VERSION_SCHEMA_PASSWORD -e UT3_USER -e UT3_USER_PASSWORD -e UT3_TESTER -e UT3_TESTER_PASSWORD -e UT3_TESTER_HELPER -e UT3_TESTER_HELPER_PASSWORD -e UT3_TABLESPACE -e ORACLE_PWD -e CONNECTION_STR -e UTPLSQL_DIR"
6 changes: 3 additions & 3 deletions test/install_tests.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash
set -ev

#goto git root directory
git rev-parse && cd "$(git rev-parse --show-cdup)"
cd test
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
cd ${SCRIPT_DIR}


"$SQLCLI" ${UT3_TESTER_HELPER}/${UT3_TESTER_HELPER_PASSWORD}@//${CONNECTION_STR} @install_ut3_tester_helper.sql

Expand Down
2 changes: 1 addition & 1 deletion test/ut3_tester_helper/coverage_helper.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ create or replace package body coverage_helper is
begin
g_job_no := g_job_no + 1;
l_job_name := 'utPLSQL_selftest_job_'||g_job_no;
sleep(0.01);
sleep(0.15);
dbms_scheduler.create_job(
job_name => l_job_name,
job_type => 'PLSQL_BLOCK',
Expand Down
60 changes: 59 additions & 1 deletion test/ut3_user/reporters/test_documentation_reporter.pkb
Original file line number Diff line number Diff line change
@@ -1 +1,59 @@
create or replace package body test_documentation_reporter as procedure report_produces_expected_out is l_results ut3_develop.ut_varchar2_list; l_actual clob; l_expected varchar2(32767):=q'[%org utplsql tests helpers A suite for testing different outcomes from reporters <!beforeall!> A description of some context passing_test [% sec] <!beforeeach!> <!beforetest!> <!passing test!> <!aftertest!> <!aftereach!> a test with failing assertion [% sec] (FAILED - 1) <!beforeeach!> <!failing test!> <!aftereach!> a test raising unhandled exception [% sec] (FAILED - 2) <!beforeeach!> <!erroring test!> <!aftereach!> a disabled test [0 sec] (DISABLED) <!afterall!>%Failures:% 1) failing_test "Fails as values are different" Actual: 'number [1] ' (varchar2) was expected to equal: 'number [2] ' (varchar2)% at "UT3$USER#.TEST_REPORTERS%", line 36 ut3_develop.ut.expect('number [1] ','Fails as values are different').to_equal('number [2] ');%% 2) erroring_test ORA-06502: PL/SQL: numeric or value error: character to number conversion error ORA-06512: at "UT3$USER#.TEST_REPORTERS", line 44% ORA-06512: at line 6Finished in % seconds4 tests, 1 failed, 1 errored, 1 disabled, 0 warning(s)%]'; begin select * bulk collect into l_results from table( ut3_develop.ut.run( 'test_reporters', ut3_develop.ut_documentation_reporter() ) ); l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); ut.expect(l_actual).to_be_like(l_expected); end;end;/
create or replace package body test_documentation_reporter as

procedure report_produces_expected_out is
l_results ut3_develop.ut_varchar2_list;
l_actual clob;
l_expected varchar2(32767):=q'[%org
utplsql
tests
helpers
A suite for testing different outcomes from reporters
<!beforeall!>
A description of some context
passing_test [% sec]
<!beforeeach!>
<!beforetest!>
<!passing test!>
<!aftertest!>
<!aftereach!>
a test with failing assertion [% sec] (FAILED - 1)
<!beforeeach!>
<!failing test!>
<!aftereach!>
a test raising unhandled exception [% sec] (FAILED - 2)
<!beforeeach!>
<!erroring test!>
<!aftereach!>
a disabled test [0 sec] (DISABLED)
<!afterall!>
%
Failures:
%
1) failing_test
"Fails as values are different"
Actual: 'number [1] ' (varchar2) was expected to equal: 'number [2] ' (varchar2)%
at "UT3$USER#.TEST_REPORTERS%", line 36 ut3_develop.ut.expect('number [1] ','Fails as values are different').to_equal('number [2] ');
%
%
2) erroring_test
ORA-06502: PL/SQL: numeric or value error: character to number conversion error
ORA-06512: at "UT3$USER#.TEST_REPORTERS", line 44%
ORA-06512: at line 6
Finished in % seconds
4 tests, 1 failed, 1 errored, 1 disabled, 0 warning(s)%]';

begin
select *
bulk collect into l_results
from table(
ut3_develop.ut.run(
'test_reporters',
ut3_develop.ut_documentation_reporter()
)
);
l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results);
ut.expect(l_actual).to_be_like(l_expected);
end;

end;
/