Skip to content

Commit 9febac9

Browse files
committed
Merge branch 'develop' into feature/improve_cursor_comparison
# Conflicts: # development/refresh_sources.sh
2 parents a0c2f59 + 61b60fe commit 9febac9

File tree

80 files changed

+1209
-1061
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+1209
-1061
lines changed

CONTRIBUTING.md

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
# How to contribute
22

33
The following are the guidelines everyone should use to contribute to utPLSQL.
4-
Changes are welcome from all members of the Community.
4+
Changes are welcome from all members of the Community.
55

66
# Getting Started
77

88
1. Create a [GitHub Account](https://github.com/join).
99
2. Fork the utPLSQL Repository and setup your local Repository. _See [how to Fork](https://help.github.com/articles/fork-a-repo) article_
10-
* Each of the steps below are detailed in **Get started with development** section.
10+
* Each of the steps below are detailed in **Get started with development** section.
1111
* Clone your Fork to your local machine.
1212
* Configure "upstream" remote to the [utPLSQL repository](https://github.com/utPLSQL/utPLSQL.git).
1313
3. For each change you want to make:
1414
* Make sure your forked repository is up to date with upstream before you start coding. See [syncing your local repository](https://help.github.com/articles/syncing-a-fork) with upstream utPLSQL repository.
1515
* Create a new branch for your change. We use `feature/feature_name` or `bugfix/fixed_issue_name` to identify branch types.
16-
* Make your change in your new branch.
16+
* Make your change in your new branch.
1717
* Make sure your change is covered with unit tests.
1818
* **Verify code compiles and all existing and new unit tests pass.**
1919
* The quickest way to have a Pull Request not approved, is to submit code that does not compile or pass tests.
@@ -27,24 +27,24 @@ Changes are welcome from all members of the Community.
2727
* We use snake case for all identifiers in PLSQL code. This separates keywords in names with underscores. `execute_test`
2828
* All code is lower case.
2929
* Prefixes:
30-
* Arguments to procedures and functions will start with `a_` an Example would be procedure `is_valid(a_owner_name varchar2)`
30+
* Arguments to procedures and functions will start with `a_`, an Example would be procedure `is_valid(a_owner_name varchar2)`
3131
* Object types and packages will start with `ut_`
3232
* Local variables `l_`
3333
* Global variables `g_`
3434
* Global Constants start with `gc_`
3535
* Types in packages, objects start with `t_`
3636
* Nested Tables start with `tt_`
37-
* varchar2 lengths are set in characters not bytes
37+
* varchar2 lengths are set in characters not bytes
3838

3939

4040
# Configuring local environment
4141

42-
Your local environment can be of any flavor (Unix/Linux/Windows/Mac).
42+
Your local environment can be of any flavor (Unix/Linux/Windows/Mac).
4343
At minimum you need to have Oracle database 11.2 XE accessible for the project and SYS account access to install and develop utPLSQL.
4444

4545
We use four different database accounts (users) for development process.
4646
* `ut3_latest_release` - holds latest released version of utPLSQL. This schema holds the testing framework used for self-testing of utPLSQL development.
47-
* `ut3` - holds latest (current) development version of utPLSQL. This is the schema you will be working on.
47+
* `ut3` - holds the version of utPLSQL of your current branch. This is the schema you will be working on.
4848
* `ut3_tester` - holds unit test packages for development of utPLSQL.
4949
* `ut3$user#` - used for testing accessibility to schema names with special characters.
5050

@@ -56,7 +56,7 @@ To get started with development, follow the below steps.
5656

5757
_If you're using Windows, run the shell scripts using `GIT bash` - Windows-based bash command line._
5858

59-
### Clone your fork of utPLSQL git repository
59+
### Clone your fork of utPLSQL git repository
6060

6161
```bash
6262
# clone your fork of utPLSQL
@@ -73,7 +73,7 @@ git fetch --all
7373

7474
### Prepare environment script
7575

76-
Copy the environment variables template `development/template.env.sh` to `development/env.sh`
76+
Copy the environment variables template `development/template.env.sh` to `development/env.sh`
7777
```bash
7878
cp development/template.env.sh development/env.sh
7979
chmod u+w development/env.sh
@@ -109,10 +109,26 @@ You now have the following:
109109
- sources from `master` branch of utPLSQL/utPLSQL repository in `utPLSQL/ut3_latest_release` directory
110110
- binaries of `utplsql-cli` in `utPLSQL/utPLSQL-cli` directory
111111
- database users created
112-
- utPLSQL develop version deployed to `ut3` schema
112+
- your current branch of utPLSQL deployed into `ut3` schema
113113
- utPLSQL released version deployed to `ut3_latest_release`
114114

115-
At any time, if you need to refresh your database, the below scripts might be helpful.
115+
At any time, if you need to refresh your database, the below scripts might be helpful.
116+
117+
## Cleanup of utPLSQL installation in local database
118+
119+
```bash
120+
development/cleanup.sh
121+
```
122+
123+
## Reinstalling utPLSQL development in `ut3` schema
124+
125+
```bash
126+
development/refresh_ut3.sh
127+
```
128+
129+
## Refreshing after release
130+
131+
Whenever a new version of utPLSQL or a new version of utPLSQL-cli is available, use `development/refresh_sources.sh` to refresh files in your local project folders.
116132

117133
## Running unit tests
118134

@@ -142,23 +158,6 @@ test/install_and_run_tests.sh
142158
You can review the results of tests as well as see information about code coverage in `./old_tests/coverage.html, ./coverage.html` files.
143159

144160

145-
## Cleanup of utPLSQL installation in local database
146-
147-
```bash
148-
development/cleanup.sh
149-
```
150-
151-
## Reinstalling utPLSQL development in `ut3` schema
152-
153-
```bash
154-
development/refresh_ut3.sh
155-
```
156-
157-
## Refreshing after release
158-
159-
Whenever a new version of utPLSQL or a new version of utPLSQL-cli is available, use `development/refresh_sources.sh` to refresh files in your local project folders.
160-
161-
162161
## Modules
163162

164163
Below diagram gives a high-level overview of utPLSQL v3 modules and their dependencies.
@@ -214,4 +213,4 @@ If you are new to GIT here are some links to help you with understanding how it
214213

215214
- [GIT Documentation](http://git-scm.com/doc)
216215
- [Atlassian Git Tutorial](https://www.atlassian.com/git/tutorial/git-basics)
217-
- [What are other resources for learning Git and GitHub](https://help.github.com/articles/what-are-other-good-resources-for-learning-git-and-github)
216+
- [What are other resources for learning Git and GitHub](https://help.github.com/articles/what-are-other-good-resources-for-learning-git-and-github)

development/install.sh

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,20 @@ git rev-parse && cd "$(git rev-parse --show-cdup)"
55

66
. development/env.sh
77

8-
development/cleanup.sh
9-
10-
.travis/install.sh
11-
.travis/install_utplsql_release.sh
12-
.travis/create_additional_grants_for_old_tests.sh
8+
header="******************************************************************************************"
9+
if ! development/cleanup.sh; then
10+
echo -e ${header}"\nFailed to cleanup utPLSQL environment\n"${header}
11+
exit 1
12+
fi
13+
if ! .travis/install.sh; then
14+
echo -e ${header}"\nFailed to install utPLSQL from current branch into ${UT3_OWNER} schema\n"${header}
15+
exit 1
16+
fi
17+
if ! .travis/install_utplsql_release.sh; then
18+
echo -e ${header}"\nFailed to install utPLSQL from branch ${SELFTESTING_BRANCH} into ${UT3_RELEASE_VERSION_SCHEMA}\n"${header}
19+
exit 1
20+
fi
21+
if ! .travis/create_additional_grants_for_old_tests.sh; then
22+
echo -e ${header}"Failed to add grants needed old_tests\n"${header}
23+
exit 1
24+
fi

docs/userguide/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ You may download with a one-liner if that is more convenient.
2020
curl -LOk $(curl --silent https://api.github.com/repos/utPLSQL/utPLSQL/releases/latest | awk '/browser_download_url/ { print $2 }' | grep ".zip" | sed 's/"//g')
2121
```
2222

23-
##Windows
23+
## Windows
2424

2525
To run the script on windows you will need [PowerShell 3.0](https://blogs.technet.microsoft.com/heyscriptingguy/2013/06/02/weekend-scripter-install-powershell-3-0-on-windows-7/) or above.
2626
You will also need .NET 4.0 Framework or above.

old_tests/RunAll.sql

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ spool RunAll.log
2020
@@helpers/ut_example_tests.pkb
2121
--@@helpers/cre_tab_ut_test_table.sql
2222
create table ut$test_table (val varchar2(1));
23-
@@helpers/ut_transaction_control.pck
2423
@@helpers/department.tps
2524
@@helpers/department1.tps
2625
@@helpers/test_package_3.pck
@@ -39,7 +38,6 @@ exec ut_coverage.coverage_start_develop();
3938

4039
@@lib/RunTest.sql ut_expectation_processor/who_called_expectation.parseStackTrace.sql
4140
@@lib/RunTest.sql ut_expectation_processor/who_called_expectation.parseStackTraceWith0x.sql
42-
@@ut_expectations/ut.expect.not_to_be_null.sql
4341
@@lib/RunTest.sql ut_expectations/ut.expect.to_be_false.GivesFailureWhenExpessionIsNotBoolean.sql
4442
@@lib/RunTest.sql ut_expectations/ut.expect.to_be_false.GivesFailureWhenExpessionIsNull.sql
4543
@@lib/RunTest.sql ut_expectations/ut.expect.to_be_false.GivesFailureWhenExpessionIsTrue.sql
@@ -193,18 +191,13 @@ exec ut_coverage.coverage_start_develop();
193191
@@lib/RunTest.sql ut_suite_manager/ut_suite_manager.TestWithHashSign.sql
194192

195193

196-
@@lib/RunTest.sql ut_test/ut_test.DisabledFlagSkipTest.sql
197194
@@lib/RunTest.sql ut_test/ut_test.OwnerNameInvalid.sql
198195
@@lib/RunTest.sql ut_test/ut_test.OwnerNameNull.sql
199196
@@lib/RunTest.sql ut_test/ut_test.PackageInInvalidState.sql
200197
@@lib/RunTest.sql ut_test/ut_test.PackageNameInvalid.sql
201198
@@lib/RunTest.sql ut_test/ut_test.PackageNameNull.sql
202199
@@lib/RunTest.sql ut_test/ut_test.ProcedureNameInvalid.sql
203200
@@lib/RunTest.sql ut_test/ut_test.ProcedureNameNull.sql
204-
@@lib/RunTest.sql ut_test/ut_test.Rollback_type.Auto.sql
205-
@@lib/RunTest.sql ut_test/ut_test.Rollback_type.AutoOnFailure.sql
206-
@@lib/RunTest.sql ut_test/ut_test.Rollback_type.Manual.sql
207-
@@lib/RunTest.sql ut_test/ut_test.Rollback_type.ManualOnFailure.sql
208201
@@lib/RunTest.sql ut_test/ut_test.SetupExecutedBeforeTest.sql
209202
@@lib/RunTest.sql ut_test/ut_test.SetupProcedureNameInvalid.sql
210203
@@lib/RunTest.sql ut_test/ut_test.SetupProcedureNameNull.sql
@@ -223,20 +216,6 @@ exec ut_coverage.coverage_start_develop();
223216
@@lib/RunTest.sql ut_test/ut_test.ReportWarningOnRollbackFailed.sql
224217
@@lib/RunTest.sql ut_test/ut_test.ApplicationInfoOnExecution.sql
225218

226-
@@lib/RunTest.sql ut_test_suite/ut_test_suite.ErrorsATestWhenAfterTestFails.sql
227-
@@lib/RunTest.sql ut_test_suite/ut_test_suite.ErrorsATestWhenBeforeTestFails.sql
228-
@@lib/RunTest.sql ut_test_suite/ut_test_suite.ErrorsEachTestWhenBeforeAllFails.sql
229-
@@lib/RunTest.sql ut_test_suite/ut_test_suite.ErrorsEachTestWhenBeforeEachFails.sql
230-
@@lib/RunTest.sql ut_test_suite/ut_test_suite.ErrorsEachTestWhenPackageHasInvalidBody.sql
231-
@@lib/RunTest.sql ut_test_suite/ut_test_suite.ErrorsEachTestWhenPackageHasNoBody.sql
232-
@@lib/RunTest.sql ut_test_suite/ut_test_suite.DisabledFlagSkipSuite.sql
233-
@@lib/RunTest.sql ut_test_suite/ut_test_suite.ReportsWarningsATestWhenAfterAllFails.sql
234-
@@lib/RunTest.sql ut_test_suite/ut_test_suite.ReportsWarningsATestWhenAfterEachFails.sql
235-
@@lib/RunTest.sql ut_test_suite/ut_test_suite.Rollback_type.Auto.sql
236-
@@lib/RunTest.sql ut_test_suite/ut_test_suite.Rollback_type.AutoOnFailure.sql
237-
@@lib/RunTest.sql ut_test_suite/ut_test_suite.Rollback_type.Manual.sql
238-
@@lib/RunTest.sql ut_test_suite/ut_test_suite.Rollback_type.ManualOnFailure.sql
239-
240219
@@ut_utils/ut_utils.clob_to_table.sql
241220
@@ut_utils/ut_utils.table_to_clob.sql
242221
@@lib/RunTest.sql ut_utils/ut_utils.append_to_clob.worksWithMultiByteChars.sql
@@ -270,7 +249,6 @@ spool off
270249
--Global cleanup
271250
--removing objects that should not be part of coverage report
272251
drop package ut_example_tests;
273-
drop package ut_transaction_control;
274252
drop table ut$test_table;
275253
drop type department$;
276254
drop type department1$;

old_tests/helpers/ut_transaction_control.pck

Lines changed: 0 additions & 44 deletions
This file was deleted.

old_tests/ut_expectations/ut.expect.not_to_be_null.sql

Lines changed: 0 additions & 19 deletions
This file was deleted.

old_tests/ut_test/ut_test.DisabledFlagSkipTest.sql

Lines changed: 0 additions & 29 deletions
This file was deleted.

old_tests/ut_test/ut_test.Rollback_type.Auto.sql

Lines changed: 0 additions & 29 deletions
This file was deleted.

old_tests/ut_test/ut_test.Rollback_type.AutoOnFailure.sql

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)