You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Alan Conway <ac...@redhat.com> on 2013/11/23 04:04:54 UTC

Review Request 15818: QPID-5307: brokertest framework: remove dependencies on environment scripts.

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15818/
-----------------------------------------------------------

Review request for qpid, Justin Ross and Steve Huston.


Bugs: qpid-5307
    https://issues.apache.org/jira/browse/qpid-5307


Repository: qpid


Description
-------

QPID-5307: brokertest framework: remove dependencies on environment scripts.

The following improvements have been made to the brokertest.py framework,
and the ha_tests.py test module has been updated to take advantage:

- Tests are standard python unittest modules can be run via qpid-python-test or any python test runner
- Test modules are also executable scripts, they run themselves via qpid-python-test and accept all arguments that qpid-python-test does.
- No environment settings are required to run the tests, test_env.sh and test_env.ps1 are not required.
- Configuration formerly in the test_env scripts is provided in test_config.py
- Only requirement to run tests is that the current directory:
  - contains a test_config.py script
  - is writable so the tests can create output directories.
- CMake generates a test_config.py suitable for running tests against a qpid build.

TODO:
- Verify ha_tests.py runs under windows.
- Generate a test_config.py to run tests run against a qpid install.
- Restore windows store configuration removed temporarily.
- Convert some existing .sh/.ps1 script tests to a new test module as examples.


Diffs
-----

  /trunk/qpid/cpp/src/tests/CMakeLists.txt 1544228 
  /trunk/qpid/cpp/src/tests/brokertest.py 1544228 
  /trunk/qpid/cpp/src/tests/ha_test.py 1544228 
  /trunk/qpid/cpp/src/tests/ha_tests.py 1544228 
  /trunk/qpid/cpp/src/tests/test_config.py.in PRE-CREATION 

Diff: https://reviews.apache.org/r/15818/diff/


Testing
-------

ha_tests.py passing


Thanks,

Alan Conway


Re: Review Request 15818: QPID-5307: Make brokertest.py framework run on Windows, convert some tests.

Posted by Steve Huston <sh...@riverace.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15818/#review29778
-----------------------------------------------------------


Really liking this, Alan - thanks!

- Steve Huston


On Dec. 4, 2013, 10:20 p.m., Alan Conway wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15818/
> -----------------------------------------------------------
> 
> (Updated Dec. 4, 2013, 10:20 p.m.)
> 
> 
> Review request for qpid, Andrew Stitcher, Chug Rolke, Justin Ross, Rafael Schloming, and Steve Huston.
> 
> 
> Bugs: qpid-5307
>     https://issues.apache.org/jira/browse/qpid-5307
> 
> 
> Repository: qpid
> 
> 
> Description
> -------
> 
> QPID-5307: Make brokertest.py framework run on Windows, convert some tests.
> 
> The brokertest framework is a python unittest framework designed for test
> that need to run brokers and other processes. This commit makes the framework
> portable to window and converts the following test shell/ps1 scripts to python:
> 
> - run_python_tests -> python_tests.py
> - run_acl_tests  -> acl_tests.py
> 
> Each test module is a set of python unittests, and also an executable script
> that runs itself using qpid/python/qpid-python-test.
> 
> - No environment setting required, test_env.sh and test_env.ps1 are not required.
>   (Note they are still useful for working with a build from the command line.)
> - Configuration formerly in the test_env scripts is provided in test_config.py
> - Only requirement to run test modules is that the current directory:
>   - contains a test_config.py script (cmake creates one in build/src/tests)
>   - is writable so the tests can create output directories.
> 
> Each BrokerTest stores broker logs, data directories, command line, stderr
> and stdout of all processes run in <test-module>.tmp/<test-name>.
> 
> The framework automaticaly handles shutting down brokers and killing leftover
> processes at the end of the test, and verifies that all process exit with the
> expected exit status (expectation of running/exit-ok/crash can be set for each
> process.)
> 
> Some broker tests start a broker and then run other python tests against it
> (e.g. pyton_tests runs the tests under qpid/python, acl_tests runs the
> pre-existing acl.py tests.) Those sub-tests don't store output on disk so
> there's no corresponding directory in the <test-module>.tmp tree.
> 
> This is not yet complete, things to do include:
> 
> - Generate test_config.py to run tests against a qpid install.
> 
> - Tests failing on windows:
>   - broker crashes during python_tests.PythonTest.test_run_python_tests
>   - acl_tests.AclTests.test_noacl_noauth_deny_create_link assertion fails.
>   - ha_tests hang.
>   - missing store setup specific to windows stores.
> 
> - Broke pre-existing tests that use brokertest: configuration has moved.
>   - store.py
>   - qpidd_qmfv2_tests.py
>   - interlink_tests.py
>   - legacystore/python_tests/client_persistence.py
>   - legacystore/python_tests/resize.py
>   - legacystore/python_tests/store_test.py
> 
> - Nested test implementation self.run_test_modules is clunky.
>   - confusing reporting of # tests run.
>   - tests selection patterns need to include the parent test and the sub-tests.
> 
> QPID-5307: Added portable Path, check for isAbsolute()
> 
> qpid::sys::Path provides some basic operations on path names,
> with implementations for posix and windows.
> 
> QPID-5307: Fix bug in windows NullAuthenticator, not setting realm on user IDs.
> 
> 
> Diffs
> -----
> 
>   /trunk/qpid/cpp/src/CMakeLists.txt 1546628 
>   /trunk/qpid/cpp/src/qpid/acl/AclPlugin.cpp 1546628 
>   /trunk/qpid/cpp/src/qpid/broker/windows/SaslAuthenticator.cpp 1546628 
>   /trunk/qpid/cpp/src/qpid/sys/Path.h PRE-CREATION 
>   /trunk/qpid/cpp/src/qpid/sys/posix/Path.cpp PRE-CREATION 
>   /trunk/qpid/cpp/src/qpid/sys/windows/Path.cpp PRE-CREATION 
>   /trunk/qpid/cpp/src/tests/CMakeLists.txt 1546628 
>   /trunk/qpid/cpp/src/tests/acl.py 1546628 
>   /trunk/qpid/cpp/src/tests/acl_tests.py PRE-CREATION 
>   /trunk/qpid/cpp/src/tests/brokertest.py 1546628 
>   /trunk/qpid/cpp/src/tests/ha_test.py 1546628 
>   /trunk/qpid/cpp/src/tests/ha_tests.py 1546628 
>   /trunk/qpid/cpp/src/tests/python_tests.py PRE-CREATION 
>   /trunk/qpid/cpp/src/tests/run_acl_tests 1546628 
>   /trunk/qpid/cpp/src/tests/run_acl_tests.ps1 1546628 
>   /trunk/qpid/cpp/src/tests/test_config.py.in PRE-CREATION 
>   /trunk/qpid/python/qpid-python-test 1546628 
> 
> Diff: https://reviews.apache.org/r/15818/diff/
> 
> 
> Testing
> -------
> 
> ha_tests.py passing
> 
> 
> Thanks,
> 
> Alan Conway
> 
>


Re: Review Request 15818: QPID-5307: Make brokertest.py framework run on Windows, convert some tests.

Posted by Alan Conway <ac...@redhat.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15818/
-----------------------------------------------------------

(Updated Dec. 6, 2013, 5:05 p.m.)


Review request for qpid, Andrew Stitcher, Chug Rolke, Justin Ross, Rafael Schloming, and Steve Huston.


Changes
-------

Rebased on latest trunk -r1548596


Bugs: qpid-5307
    https://issues.apache.org/jira/browse/qpid-5307


Repository: qpid


Description (updated)
-------

QPID-5307: Make brokertest.py framework run on Windows, convert some tests.

The brokertest framework is a python unittest framework designed for test
that need to run brokers and other processes. This commit makes the framework
portable to window and converts the following test shell/ps1 scripts to python:

- run_python_tests -> python_tests.py
- run_acl_tests  -> acl_tests.py

Each test module is a set of python unittests, and also an executable script
that runs itself using qpid/python/qpid-python-test.

- No environment setting required, test_env.sh and test_env.ps1 are not required.
  (Note they are still useful for working with a build from the command line.)
- Configuration formerly in the test_env scripts is provided in test_config.py
- Only requirement to run test modules is that the current directory:
  - contains a test_config.py script (cmake creates one in build/src/tests)
  - is writable so the tests can create output directories.

Each BrokerTest stores broker logs, data directories, command line, stderr
and stdout of all processes run in <test-module>.tmp/<test-name>.

The framework automaticaly handles shutting down brokers and killing leftover
processes at the end of the test, and verifies that all process exit with the
expected exit status (expectation of running/exit-ok/crash can be set for each
process.)

Some broker tests start a broker and then run other python tests against it
(e.g. pyton_tests runs the tests under qpid/python, acl_tests runs the
pre-existing acl.py tests.) Those sub-tests don't store output on disk so
there's no corresponding directory in the <test-module>.tmp tree.

This is not yet complete, things to do include:

- Generate test_config.py to run tests against a qpid install.

- Tests failing on windows:
  - broker crashes during python_tests.PythonTest.test_run_python_tests
  - acl_tests.AclTests.test_noacl_noauth_deny_create_link assertion fails.
  - ha_tests hang.
  - missing store setup specific to windows stores.

- Broke pre-existing tests that use brokertest: configuration has moved.
  - store.py
  - qpidd_qmfv2_tests.py
  - interlink_tests.py
  - legacystore/python_tests/client_persistence.py
  - legacystore/python_tests/resize.py
  - legacystore/python_tests/store_test.py

- Nested test implementation self.run_test_modules is clunky.
  - confusing reporting of # tests run.
  - tests selection patterns need to include the parent test and the sub-tests.


Diffs (updated)
-----

  /trunk/qpid/cpp/src/tests/CMakeLists.txt 1548596 
  /trunk/qpid/cpp/src/tests/acl.py 1548596 
  /trunk/qpid/cpp/src/tests/acl_tests.py PRE-CREATION 
  /trunk/qpid/cpp/src/tests/brokertest.py 1548596 
  /trunk/qpid/cpp/src/tests/ha_test.py 1548596 
  /trunk/qpid/cpp/src/tests/ha_tests.py 1548596 
  /trunk/qpid/cpp/src/tests/python_tests.py PRE-CREATION 
  /trunk/qpid/cpp/src/tests/run_acl_tests 1548596 
  /trunk/qpid/cpp/src/tests/run_acl_tests.ps1 1548596 
  /trunk/qpid/cpp/src/tests/test_config.py.in PRE-CREATION 
  /trunk/qpid/python/qpid-python-test 1548596 

Diff: https://reviews.apache.org/r/15818/diff/


Testing
-------

ha_tests.py passing


Thanks,

Alan Conway


Re: Review Request 15818: QPID-5307: Make brokertest.py framework run on Windows, convert some tests.

Posted by Steve Huston <sh...@riverace.com>.

> On Dec. 6, 2013, 4:02 p.m., Chug Rolke wrote:
> > /trunk/qpid/cpp/src/qpid/sys/windows/Path.cpp, line 61
> > <https://reviews.apache.org/r/15818/diff/2/?file=394149#file394149line61>
> >
> >     The separator should be '\\' here.

separator[0] is '\\' - I think the check for '/' also catches the valid leading / - so this code is correct, I believe.


- Steve


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15818/#review29876
-----------------------------------------------------------


On Dec. 4, 2013, 10:20 p.m., Alan Conway wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15818/
> -----------------------------------------------------------
> 
> (Updated Dec. 4, 2013, 10:20 p.m.)
> 
> 
> Review request for qpid, Andrew Stitcher, Chug Rolke, Justin Ross, Rafael Schloming, and Steve Huston.
> 
> 
> Bugs: qpid-5307
>     https://issues.apache.org/jira/browse/qpid-5307
> 
> 
> Repository: qpid
> 
> 
> Description
> -------
> 
> QPID-5307: Make brokertest.py framework run on Windows, convert some tests.
> 
> The brokertest framework is a python unittest framework designed for test
> that need to run brokers and other processes. This commit makes the framework
> portable to window and converts the following test shell/ps1 scripts to python:
> 
> - run_python_tests -> python_tests.py
> - run_acl_tests  -> acl_tests.py
> 
> Each test module is a set of python unittests, and also an executable script
> that runs itself using qpid/python/qpid-python-test.
> 
> - No environment setting required, test_env.sh and test_env.ps1 are not required.
>   (Note they are still useful for working with a build from the command line.)
> - Configuration formerly in the test_env scripts is provided in test_config.py
> - Only requirement to run test modules is that the current directory:
>   - contains a test_config.py script (cmake creates one in build/src/tests)
>   - is writable so the tests can create output directories.
> 
> Each BrokerTest stores broker logs, data directories, command line, stderr
> and stdout of all processes run in <test-module>.tmp/<test-name>.
> 
> The framework automaticaly handles shutting down brokers and killing leftover
> processes at the end of the test, and verifies that all process exit with the
> expected exit status (expectation of running/exit-ok/crash can be set for each
> process.)
> 
> Some broker tests start a broker and then run other python tests against it
> (e.g. pyton_tests runs the tests under qpid/python, acl_tests runs the
> pre-existing acl.py tests.) Those sub-tests don't store output on disk so
> there's no corresponding directory in the <test-module>.tmp tree.
> 
> This is not yet complete, things to do include:
> 
> - Generate test_config.py to run tests against a qpid install.
> 
> - Tests failing on windows:
>   - broker crashes during python_tests.PythonTest.test_run_python_tests
>   - acl_tests.AclTests.test_noacl_noauth_deny_create_link assertion fails.
>   - ha_tests hang.
>   - missing store setup specific to windows stores.
> 
> - Broke pre-existing tests that use brokertest: configuration has moved.
>   - store.py
>   - qpidd_qmfv2_tests.py
>   - interlink_tests.py
>   - legacystore/python_tests/client_persistence.py
>   - legacystore/python_tests/resize.py
>   - legacystore/python_tests/store_test.py
> 
> - Nested test implementation self.run_test_modules is clunky.
>   - confusing reporting of # tests run.
>   - tests selection patterns need to include the parent test and the sub-tests.
> 
> QPID-5307: Added portable Path, check for isAbsolute()
> 
> qpid::sys::Path provides some basic operations on path names,
> with implementations for posix and windows.
> 
> QPID-5307: Fix bug in windows NullAuthenticator, not setting realm on user IDs.
> 
> 
> Diffs
> -----
> 
>   /trunk/qpid/cpp/src/CMakeLists.txt 1546628 
>   /trunk/qpid/cpp/src/qpid/acl/AclPlugin.cpp 1546628 
>   /trunk/qpid/cpp/src/qpid/broker/windows/SaslAuthenticator.cpp 1546628 
>   /trunk/qpid/cpp/src/qpid/sys/Path.h PRE-CREATION 
>   /trunk/qpid/cpp/src/qpid/sys/posix/Path.cpp PRE-CREATION 
>   /trunk/qpid/cpp/src/qpid/sys/windows/Path.cpp PRE-CREATION 
>   /trunk/qpid/cpp/src/tests/CMakeLists.txt 1546628 
>   /trunk/qpid/cpp/src/tests/acl.py 1546628 
>   /trunk/qpid/cpp/src/tests/acl_tests.py PRE-CREATION 
>   /trunk/qpid/cpp/src/tests/brokertest.py 1546628 
>   /trunk/qpid/cpp/src/tests/ha_test.py 1546628 
>   /trunk/qpid/cpp/src/tests/ha_tests.py 1546628 
>   /trunk/qpid/cpp/src/tests/python_tests.py PRE-CREATION 
>   /trunk/qpid/cpp/src/tests/run_acl_tests 1546628 
>   /trunk/qpid/cpp/src/tests/run_acl_tests.ps1 1546628 
>   /trunk/qpid/cpp/src/tests/test_config.py.in PRE-CREATION 
>   /trunk/qpid/python/qpid-python-test 1546628 
> 
> Diff: https://reviews.apache.org/r/15818/diff/
> 
> 
> Testing
> -------
> 
> ha_tests.py passing
> 
> 
> Thanks,
> 
> Alan Conway
> 
>


Re: Review Request 15818: QPID-5307: Make brokertest.py framework run on Windows, convert some tests.

Posted by Chug Rolke <cr...@redhat.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15818/#review29876
-----------------------------------------------------------



/trunk/qpid/cpp/src/qpid/sys/windows/Path.cpp
<https://reviews.apache.org/r/15818/#comment57341>

    The separator should be '\\' here.


- Chug Rolke


On Dec. 4, 2013, 10:20 p.m., Alan Conway wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15818/
> -----------------------------------------------------------
> 
> (Updated Dec. 4, 2013, 10:20 p.m.)
> 
> 
> Review request for qpid, Andrew Stitcher, Chug Rolke, Justin Ross, Rafael Schloming, and Steve Huston.
> 
> 
> Bugs: qpid-5307
>     https://issues.apache.org/jira/browse/qpid-5307
> 
> 
> Repository: qpid
> 
> 
> Description
> -------
> 
> QPID-5307: Make brokertest.py framework run on Windows, convert some tests.
> 
> The brokertest framework is a python unittest framework designed for test
> that need to run brokers and other processes. This commit makes the framework
> portable to window and converts the following test shell/ps1 scripts to python:
> 
> - run_python_tests -> python_tests.py
> - run_acl_tests  -> acl_tests.py
> 
> Each test module is a set of python unittests, and also an executable script
> that runs itself using qpid/python/qpid-python-test.
> 
> - No environment setting required, test_env.sh and test_env.ps1 are not required.
>   (Note they are still useful for working with a build from the command line.)
> - Configuration formerly in the test_env scripts is provided in test_config.py
> - Only requirement to run test modules is that the current directory:
>   - contains a test_config.py script (cmake creates one in build/src/tests)
>   - is writable so the tests can create output directories.
> 
> Each BrokerTest stores broker logs, data directories, command line, stderr
> and stdout of all processes run in <test-module>.tmp/<test-name>.
> 
> The framework automaticaly handles shutting down brokers and killing leftover
> processes at the end of the test, and verifies that all process exit with the
> expected exit status (expectation of running/exit-ok/crash can be set for each
> process.)
> 
> Some broker tests start a broker and then run other python tests against it
> (e.g. pyton_tests runs the tests under qpid/python, acl_tests runs the
> pre-existing acl.py tests.) Those sub-tests don't store output on disk so
> there's no corresponding directory in the <test-module>.tmp tree.
> 
> This is not yet complete, things to do include:
> 
> - Generate test_config.py to run tests against a qpid install.
> 
> - Tests failing on windows:
>   - broker crashes during python_tests.PythonTest.test_run_python_tests
>   - acl_tests.AclTests.test_noacl_noauth_deny_create_link assertion fails.
>   - ha_tests hang.
>   - missing store setup specific to windows stores.
> 
> - Broke pre-existing tests that use brokertest: configuration has moved.
>   - store.py
>   - qpidd_qmfv2_tests.py
>   - interlink_tests.py
>   - legacystore/python_tests/client_persistence.py
>   - legacystore/python_tests/resize.py
>   - legacystore/python_tests/store_test.py
> 
> - Nested test implementation self.run_test_modules is clunky.
>   - confusing reporting of # tests run.
>   - tests selection patterns need to include the parent test and the sub-tests.
> 
> QPID-5307: Added portable Path, check for isAbsolute()
> 
> qpid::sys::Path provides some basic operations on path names,
> with implementations for posix and windows.
> 
> QPID-5307: Fix bug in windows NullAuthenticator, not setting realm on user IDs.
> 
> 
> Diffs
> -----
> 
>   /trunk/qpid/cpp/src/CMakeLists.txt 1546628 
>   /trunk/qpid/cpp/src/qpid/acl/AclPlugin.cpp 1546628 
>   /trunk/qpid/cpp/src/qpid/broker/windows/SaslAuthenticator.cpp 1546628 
>   /trunk/qpid/cpp/src/qpid/sys/Path.h PRE-CREATION 
>   /trunk/qpid/cpp/src/qpid/sys/posix/Path.cpp PRE-CREATION 
>   /trunk/qpid/cpp/src/qpid/sys/windows/Path.cpp PRE-CREATION 
>   /trunk/qpid/cpp/src/tests/CMakeLists.txt 1546628 
>   /trunk/qpid/cpp/src/tests/acl.py 1546628 
>   /trunk/qpid/cpp/src/tests/acl_tests.py PRE-CREATION 
>   /trunk/qpid/cpp/src/tests/brokertest.py 1546628 
>   /trunk/qpid/cpp/src/tests/ha_test.py 1546628 
>   /trunk/qpid/cpp/src/tests/ha_tests.py 1546628 
>   /trunk/qpid/cpp/src/tests/python_tests.py PRE-CREATION 
>   /trunk/qpid/cpp/src/tests/run_acl_tests 1546628 
>   /trunk/qpid/cpp/src/tests/run_acl_tests.ps1 1546628 
>   /trunk/qpid/cpp/src/tests/test_config.py.in PRE-CREATION 
>   /trunk/qpid/python/qpid-python-test 1546628 
> 
> Diff: https://reviews.apache.org/r/15818/diff/
> 
> 
> Testing
> -------
> 
> ha_tests.py passing
> 
> 
> Thanks,
> 
> Alan Conway
> 
>


Re: Review Request 15818: QPID-5307: Make brokertest.py framework run on Windows, convert some tests.

Posted by Alan Conway <ac...@redhat.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15818/
-----------------------------------------------------------

(Updated Dec. 4, 2013, 10:20 p.m.)


Review request for qpid, Andrew Stitcher, Chug Rolke, Justin Ross, Rafael Schloming, and Steve Huston.


Bugs: qpid-5307
    https://issues.apache.org/jira/browse/qpid-5307


Repository: qpid


Description
-------

QPID-5307: Make brokertest.py framework run on Windows, convert some tests.

The brokertest framework is a python unittest framework designed for test
that need to run brokers and other processes. This commit makes the framework
portable to window and converts the following test shell/ps1 scripts to python:

- run_python_tests -> python_tests.py
- run_acl_tests  -> acl_tests.py

Each test module is a set of python unittests, and also an executable script
that runs itself using qpid/python/qpid-python-test.

- No environment setting required, test_env.sh and test_env.ps1 are not required.
  (Note they are still useful for working with a build from the command line.)
- Configuration formerly in the test_env scripts is provided in test_config.py
- Only requirement to run test modules is that the current directory:
  - contains a test_config.py script (cmake creates one in build/src/tests)
  - is writable so the tests can create output directories.

Each BrokerTest stores broker logs, data directories, command line, stderr
and stdout of all processes run in <test-module>.tmp/<test-name>.

The framework automaticaly handles shutting down brokers and killing leftover
processes at the end of the test, and verifies that all process exit with the
expected exit status (expectation of running/exit-ok/crash can be set for each
process.)

Some broker tests start a broker and then run other python tests against it
(e.g. pyton_tests runs the tests under qpid/python, acl_tests runs the
pre-existing acl.py tests.) Those sub-tests don't store output on disk so
there's no corresponding directory in the <test-module>.tmp tree.

This is not yet complete, things to do include:

- Generate test_config.py to run tests against a qpid install.

- Tests failing on windows:
  - broker crashes during python_tests.PythonTest.test_run_python_tests
  - acl_tests.AclTests.test_noacl_noauth_deny_create_link assertion fails.
  - ha_tests hang.
  - missing store setup specific to windows stores.

- Broke pre-existing tests that use brokertest: configuration has moved.
  - store.py
  - qpidd_qmfv2_tests.py
  - interlink_tests.py
  - legacystore/python_tests/client_persistence.py
  - legacystore/python_tests/resize.py
  - legacystore/python_tests/store_test.py

- Nested test implementation self.run_test_modules is clunky.
  - confusing reporting of # tests run.
  - tests selection patterns need to include the parent test and the sub-tests.

QPID-5307: Added portable Path, check for isAbsolute()

qpid::sys::Path provides some basic operations on path names,
with implementations for posix and windows.

QPID-5307: Fix bug in windows NullAuthenticator, not setting realm on user IDs.


Diffs
-----

  /trunk/qpid/cpp/src/CMakeLists.txt 1546628 
  /trunk/qpid/cpp/src/qpid/acl/AclPlugin.cpp 1546628 
  /trunk/qpid/cpp/src/qpid/broker/windows/SaslAuthenticator.cpp 1546628 
  /trunk/qpid/cpp/src/qpid/sys/Path.h PRE-CREATION 
  /trunk/qpid/cpp/src/qpid/sys/posix/Path.cpp PRE-CREATION 
  /trunk/qpid/cpp/src/qpid/sys/windows/Path.cpp PRE-CREATION 
  /trunk/qpid/cpp/src/tests/CMakeLists.txt 1546628 
  /trunk/qpid/cpp/src/tests/acl.py 1546628 
  /trunk/qpid/cpp/src/tests/acl_tests.py PRE-CREATION 
  /trunk/qpid/cpp/src/tests/brokertest.py 1546628 
  /trunk/qpid/cpp/src/tests/ha_test.py 1546628 
  /trunk/qpid/cpp/src/tests/ha_tests.py 1546628 
  /trunk/qpid/cpp/src/tests/python_tests.py PRE-CREATION 
  /trunk/qpid/cpp/src/tests/run_acl_tests 1546628 
  /trunk/qpid/cpp/src/tests/run_acl_tests.ps1 1546628 
  /trunk/qpid/cpp/src/tests/test_config.py.in PRE-CREATION 
  /trunk/qpid/python/qpid-python-test 1546628 

Diff: https://reviews.apache.org/r/15818/diff/


Testing
-------

ha_tests.py passing


Thanks,

Alan Conway


Re: Review Request 15818: QPID-5307: Make brokertest.py framework run on Windows, convert some tests.

Posted by Alan Conway <ac...@redhat.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15818/
-----------------------------------------------------------

(Updated Dec. 4, 2013, 10:18 p.m.)


Review request for qpid, Andrew Stitcher, Justin Ross, and Steve Huston.


Changes
-------

Should give a good indication of where I'm going, still has issues on windows.


Summary (updated)
-----------------

QPID-5307: Make brokertest.py framework run on Windows, convert some tests.


Bugs: qpid-5307
    https://issues.apache.org/jira/browse/qpid-5307


Repository: qpid


Description (updated)
-------

QPID-5307: Make brokertest.py framework run on Windows, convert some tests.

The brokertest framework is a python unittest framework designed for test
that need to run brokers and other processes. This commit makes the framework
portable to window and converts the following test shell/ps1 scripts to python:

- run_python_tests -> python_tests.py
- run_acl_tests  -> acl_tests.py

Each test module is a set of python unittests, and also an executable script
that runs itself using qpid/python/qpid-python-test.

- No environment setting required, test_env.sh and test_env.ps1 are not required.
  (Note they are still useful for working with a build from the command line.)
- Configuration formerly in the test_env scripts is provided in test_config.py
- Only requirement to run test modules is that the current directory:
  - contains a test_config.py script (cmake creates one in build/src/tests)
  - is writable so the tests can create output directories.

Each BrokerTest stores broker logs, data directories, command line, stderr
and stdout of all processes run in <test-module>.tmp/<test-name>.

The framework automaticaly handles shutting down brokers and killing leftover
processes at the end of the test, and verifies that all process exit with the
expected exit status (expectation of running/exit-ok/crash can be set for each
process.)

Some broker tests start a broker and then run other python tests against it
(e.g. pyton_tests runs the tests under qpid/python, acl_tests runs the
pre-existing acl.py tests.) Those sub-tests don't store output on disk so
there's no corresponding directory in the <test-module>.tmp tree.

This is not yet complete, things to do include:

- Generate test_config.py to run tests against a qpid install.

- Tests failing on windows:
  - broker crashes during python_tests.PythonTest.test_run_python_tests
  - acl_tests.AclTests.test_noacl_noauth_deny_create_link assertion fails.
  - ha_tests hang.
  - missing store setup specific to windows stores.

- Broke pre-existing tests that use brokertest: configuration has moved.
  - store.py
  - qpidd_qmfv2_tests.py
  - interlink_tests.py
  - legacystore/python_tests/client_persistence.py
  - legacystore/python_tests/resize.py
  - legacystore/python_tests/store_test.py

- Nested test implementation self.run_test_modules is clunky.
  - confusing reporting of # tests run.
  - tests selection patterns need to include the parent test and the sub-tests.

QPID-5307: Added portable Path, check for isAbsolute()

qpid::sys::Path provides some basic operations on path names,
with implementations for posix and windows.

QPID-5307: Fix bug in windows NullAuthenticator, not setting realm on user IDs.


Diffs (updated)
-----

  /trunk/qpid/cpp/src/CMakeLists.txt 1546628 
  /trunk/qpid/cpp/src/qpid/acl/AclPlugin.cpp 1546628 
  /trunk/qpid/cpp/src/qpid/broker/windows/SaslAuthenticator.cpp 1546628 
  /trunk/qpid/cpp/src/qpid/sys/Path.h PRE-CREATION 
  /trunk/qpid/cpp/src/qpid/sys/posix/Path.cpp PRE-CREATION 
  /trunk/qpid/cpp/src/qpid/sys/windows/Path.cpp PRE-CREATION 
  /trunk/qpid/cpp/src/tests/CMakeLists.txt 1546628 
  /trunk/qpid/cpp/src/tests/acl.py 1546628 
  /trunk/qpid/cpp/src/tests/acl_tests.py PRE-CREATION 
  /trunk/qpid/cpp/src/tests/brokertest.py 1546628 
  /trunk/qpid/cpp/src/tests/ha_test.py 1546628 
  /trunk/qpid/cpp/src/tests/ha_tests.py 1546628 
  /trunk/qpid/cpp/src/tests/python_tests.py PRE-CREATION 
  /trunk/qpid/cpp/src/tests/run_acl_tests 1546628 
  /trunk/qpid/cpp/src/tests/run_acl_tests.ps1 1546628 
  /trunk/qpid/cpp/src/tests/test_config.py.in PRE-CREATION 
  /trunk/qpid/python/qpid-python-test 1546628 

Diff: https://reviews.apache.org/r/15818/diff/


Testing
-------

ha_tests.py passing


Thanks,

Alan Conway


Re: Review Request 15818: QPID-5307: brokertest framework: remove dependencies on environment scripts.

Posted by Alan Conway <ac...@redhat.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15818/
-----------------------------------------------------------

(Updated Nov. 24, 2013, 12:38 a.m.)


Review request for qpid, Andrew Stitcher, Justin Ross, and Steve Huston.


Bugs: qpid-5307
    https://issues.apache.org/jira/browse/qpid-5307


Repository: qpid


Description
-------

QPID-5307: brokertest framework: remove dependencies on environment scripts.

The following improvements have been made to the brokertest.py framework,
and the ha_tests.py test module has been updated to take advantage:

- Tests are standard python unittest modules can be run via qpid-python-test or any python test runner
- Test modules are also executable scripts, they run themselves via qpid-python-test and accept all arguments that qpid-python-test does.
- No environment settings are required to run the tests, test_env.sh and test_env.ps1 are not required.
- Configuration formerly in the test_env scripts is provided in test_config.py
- Only requirement to run tests is that the current directory:
  - contains a test_config.py script
  - is writable so the tests can create output directories.
- CMake generates a test_config.py suitable for running tests against a qpid build.

TODO:
- Verify ha_tests.py runs under windows.
- Generate a test_config.py to run tests run against a qpid install.
- Restore windows store configuration removed temporarily.
- Convert some existing .sh/.ps1 script tests to a new test module as examples.


Diffs
-----

  /trunk/qpid/cpp/src/tests/CMakeLists.txt 1544228 
  /trunk/qpid/cpp/src/tests/brokertest.py 1544228 
  /trunk/qpid/cpp/src/tests/ha_test.py 1544228 
  /trunk/qpid/cpp/src/tests/ha_tests.py 1544228 
  /trunk/qpid/cpp/src/tests/test_config.py.in PRE-CREATION 

Diff: https://reviews.apache.org/r/15818/diff/


Testing
-------

ha_tests.py passing


Thanks,

Alan Conway