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

Skip to content

Commit e445432

Browse files
authored
Merge branch 'develop' into bugfix/coverage_filter_options
2 parents 34b2f48 + 965dda3 commit e445432

7 files changed

Lines changed: 163 additions & 16 deletions

File tree

.travis.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ env:
4646
- DOCKHER_HUB_REPO="${DOCKER_BASE_TAG:-$UT3_DOCKER_REPO}"
4747
#utPLSQL released version directory
4848
- UTPLSQL_DIR="utPLSQL_latest_release"
49-
- UTPLSQL_CLI_FILE="utPLSQL-cli-develop-test3.zip"
49+
- UTPLSQL_CLI_VERSION="3.0.4"
50+
# Maven
51+
- MAVEN_HOME=/usr/local/maven
52+
- MAVEN_CFG=$HOME/.m2
5053
matrix:
5154
- ORACLE_VERSION="${DOCKER_TAG_11G:-11g-r2-xe}" CONNECTION_STR='127.0.0.1:1521/XE' DOCKER_OPTIONS='--shm-size=1g'
5255
- 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"
@@ -57,6 +60,7 @@ cache:
5760
directories:
5861
- $CACHE_DIR
5962
- node_modules
63+
- $MAVEN_CFG
6064

6165
before_install:
6266
#The update_project_version is done before deployment to validate that the change of project files does not break installation
@@ -68,12 +72,14 @@ before_install:
6872
# download latest utPLSQL release
6973
#- curl -LOk $(curl --silent https://api.github.com/repos/utPLSQL/utPLSQL/releases/latest | awk '/browser_download_url/ { print $2 }' | grep ".zip" | sed 's/"//g')
7074
- git clone --depth=1 --branch=${SELFTESTING_BRANCH:-master} https://github.com/utPLSQL/utPLSQL.git $UTPLSQL_DIR
71-
# download utPLSQL-cli develop
72-
- curl -Lk -o utPLSQL-cli.zip https://bintray.com/viniciusam/utPLSQL-cli/download_file?file_path=${UTPLSQL_CLI_FILE}
75+
# download latest utPLSQL-cli release
76+
- curl -Lk -o utPLSQL-cli.zip https://github.com/utPLSQL/utPLSQL-cli/releases/download/v${UTPLSQL_CLI_VERSION}/utPLSQL-cli.zip
7377

7478
install:
7579
#- unzip utPLSQL.zip
7680
- unzip utPLSQL-cli.zip && chmod -R u+x utPLSQL-cli
81+
# Get ojdbc via maven
82+
- bash .travis/maven_cfg.sh
7783
- pip install mkdocs
7884
- bash .travis/install_sqlcl.sh
7985
- sudo mkdir -p /dev/pdbs

.travis/maven_cfg.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
set -ev
3+
cp .travis/settings.xml $MAVEN_CFG/settings.xml
4+
5+
cd $(dirname $(readlink -f $0))
6+
7+
# Download wagon-http recommended by Oracle.
8+
# On maven latest version this is not needed, but travis doesn't have it.
9+
if [ ! -f $CACHE_DIR/wagon-http-2.8-shaded.jar ]; then
10+
curl -L -O "http://central.maven.org/maven2/org/apache/maven/wagon/wagon-http/2.8/wagon-http-2.8-shaded.jar"
11+
mv wagon-http-2.8-shaded.jar $CACHE_DIR/
12+
sudo cp $CACHE_DIR/wagon-http-2.8-shaded.jar $MAVEN_HOME/lib/ext/
13+
else
14+
echo "Using cached wagon-http..."
15+
sudo cp $CACHE_DIR/wagon-http-2.8-shaded.jar $MAVEN_HOME/lib/ext/
16+
fi
17+
18+
mvn dependency:copy-dependencies -DoutputDirectory=../utPLSQL-cli/lib

.travis/pom.xml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<!--Used to obtain ojdbc8 and orai18n files that are needed for client-->
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<groupId>org.utplsql</groupId>
6+
<artifactId>utplsql</artifactId>
7+
<version>3.0.4-SNAPSHOT</version>
8+
<packaging>jar</packaging>
9+
10+
<name>utPLSQL</name>
11+
<url>https://github.com/utPLSQL/utPLSQL</url>
12+
13+
<properties>
14+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
15+
</properties>
16+
17+
<dependencies>
18+
<dependency>
19+
<groupId>com.oracle.jdbc</groupId>
20+
<artifactId>ojdbc8</artifactId>
21+
<version>12.2.0.1</version>
22+
<scope>compile</scope>
23+
</dependency>
24+
<dependency>
25+
<groupId>com.oracle.jdbc</groupId>
26+
<artifactId>orai18n</artifactId>
27+
<version>12.2.0.1</version>
28+
<scope>compile</scope>
29+
</dependency>
30+
</dependencies>
31+
32+
<repositories>
33+
<repository>
34+
<id>maven.oracle.com</id>
35+
<releases>
36+
<enabled>true</enabled>
37+
</releases>
38+
<snapshots>
39+
<enabled>false</enabled>
40+
</snapshots>
41+
<url>https://maven.oracle.com</url>
42+
<layout>default</layout>
43+
</repository>
44+
</repositories>
45+
46+
<pluginRepositories>
47+
<pluginRepository>
48+
<id>maven.oracle.com</id>
49+
<url>https://maven.oracle.com</url>
50+
</pluginRepository>
51+
</pluginRepositories>
52+
53+
<build>
54+
<extensions>
55+
<extension>
56+
<groupId>io.packagecloud.maven.wagon</groupId>
57+
<artifactId>maven-packagecloud-wagon</artifactId>
58+
<version>0.0.6</version>
59+
</extension>
60+
</extensions>
61+
</build>
62+
</project>

.travis/settings.xml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<!--
4+
Licensed to the Apache Software Foundation (ASF) under one
5+
or more contributor license agreements. See the NOTICE file
6+
distributed with this work for additional information
7+
regarding copyright ownership. The ASF licenses this file
8+
to you under the Apache License, Version 2.0 (the
9+
"License"); you may not use this file except in compliance
10+
with the License. You may obtain a copy of the License at
11+
12+
http://www.apache.org/licenses/LICENSE-2.0
13+
14+
Unless required by applicable law or agreed to in writing,
15+
software distributed under the License is distributed on an
16+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17+
KIND, either express or implied. See the License for the
18+
specific language governing permissions and limitations
19+
under the License.
20+
-->
21+
22+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
23+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
24+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
25+
26+
<servers>
27+
<server>
28+
<id>maven.oracle.com</id>
29+
<username>${env.ORACLE_OTN_USER}</username>
30+
<password>${env.ORACLE_OTN_PASSWORD}</password>
31+
<configuration>
32+
<basicAuthScope>
33+
<host>ANY</host>
34+
<port>ANY</port>
35+
<realm>OAM 11g</realm>
36+
</basicAuthScope>
37+
<httpConfiguration>
38+
<all>
39+
<params>
40+
<property>
41+
<name>http.protocol.allow-circular-redirects</name>
42+
<value>%b,true</value>
43+
</property>
44+
</params>
45+
</all>
46+
</httpConfiguration>
47+
</configuration>
48+
</server>
49+
</servers>
50+
51+
</settings>

docs/about/authors.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
| Pavel Kaplya | [Pazus](https://github.com/Pazus)
1111
| Robert Love | [rlove](https://github.com/rlove)
1212
| Vinicius Avellar | [viniciusam](https://github.com/viniciusam/)
13+
| Samuel Nitsche | [pesse](https://github.com/pesse/)
1314

1415

1516

docs/userguide/install.md

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Downloading latest version of utPLSQL
22

3-
It is quite easy to download latest version of utPLSQL from github on both Unix/Linux as well as Windows machines.
4-
Below are little snippets that can be handy for downloading latest version.
3+
To download latest version of utPLSQL from github on both Unix/Linux as well as Windows machines use the below smippets.
54

65
## Unix/Linux
76

@@ -52,42 +51,51 @@ foreach ($i in $urlList) {
5251

5352
# Headless installation
5453

55-
To simply install the utPLSQL into a new database schema and grant it to public, execute the script `install_headless.sql` as SYSDBA.
54+
To install the utPLSQL into a new database schema and grant it to public, execute the script `install_headless.sql` as SYSDBA.
5655

57-
This will create a new user `UT3` with password `XNtxj8eEgA6X6b6f`, grant all needed privileges to that user and create PUBLIC synonyms needed to use the utPLSQL framework.
56+
The script accepts three optional parameters that define:
57+
- username to create as owner of utPLSQL (default `ut3`)
58+
- password for owner of utPLSQL (default `XNtxj8eEgA6X6b6f`)
59+
- tablespace to use for storage of profiler data (default `users`)
5860

5961
Example invocation of the script from command line:
6062
```bash
6163
cd source
6264
sqlplus sys/sys_pass@db as sysdba @@install_headless.sql
6365
```
6466

65-
SYSDBA is needed to grant access to DBMS_LOCK.
67+
Invoking script with parameters:
68+
```bash
69+
cd source
70+
sqlplus sys/sys_pass@db as sysdba @@install_headless.sql utp3 my_verySecret_password utp3_tablespace
71+
```
72+
73+
The script needs to be executed by SYSDBA, in order to grant access to DBMS_LOCK system package.
6674

6775

6876
# Recommended Schema
69-
It is recommended to install utPLSQL in it's own schema. You are free to choose any name for this schema.
77+
It is highly recommended to install utPLSQL in it's own schema. You are free to choose any name for this schema.
78+
Installing uPLSQL into shared schema is really not recommended as you loose isolation of framework.
7079

71-
The installation user/schema must have the following Oracle system permissions during the installation.
80+
If the installation and utPLSQL owner user is one and the same, the user must have the following Oracle system permissions before you can proceed with the installation.
7281

7382
- CREATE SESSION
7483
- CREATE PROCEDURE
7584
- CREATE TYPE
7685
- CREATE TABLE
86+
- CREATE SEQUENCE
7787
- CREATE VIEW
7888
- CREATE SYNONYM
7989
- ALTER SESSION
8090

81-
In addition it must be granted execute to the following system packages.
82-
83-
- DBMS_LOCK
91+
In addition the user must be granted the execute privilege on `DBMS_LOCK` package.
8492

8593
utPLSQL is using [DBMS_PROFILER tables](https://docs.oracle.com/cd/E18283_01/appdev.112/e16760/d_profil.htm#i999476) for code coverage. The tables required by DBMS_PROFILER will be created in the installation schema unless they already exist.
8694
The uninstall process will **not** drop profiler tables, as they can potentially be shared and reused for profiling PLSQL code.
8795

8896
It is up to DBA to maintain the storage of the profiler tables.
89-
90-
# Installation Procedure
97+
98+
# Manual installation procedure
9199

92100
### Creating schema for utPLSQL
93101
To create the utPLSQL schema and grant all the needed privileges execute script `create_utplsql_owner.sql` from the `source` directory with parameters:

test/install_and_run_tests.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ utPLSQL-cli/bin/utplsql run ${UT3_TESTER}/${UT3_TESTER_PASSWORD}@${CONNECTION_ST
1616
-f=ut_coverage_sonar_reporter -o=coverage.xml \
1717
-f=ut_coverage_html_reporter -o=coverage.html \
1818
-f=ut_coveralls_reporter -o=coverage.json \
19-
-f=ut_sonar_test_reporter -o=test_results.xml
19+
-f=ut_sonar_test_reporter -o=test_results.xml \
20+
-scc
2021

2122
status_line_regex="^[0-9]+ tests, ([0-9]+) failed, ([0-9]+) errored.*"
2223

0 commit comments

Comments
 (0)