Add tests - DAO.
authorZbigniew Kostrzewa <z.kostrzewa@samsung.com>
Thu, 6 Dec 2012 17:22:13 +0000 (18:22 +0100)
committerGerrit Code Review <gerrit2@kim11>
Mon, 17 Dec 2012 10:13:33 +0000 (19:13 +0900)
commitaf6f2ed52016357933a8098e4e530ea46537649d
treeb875e9b50ce031348dcf388f5c1b930586c6df8a
parent5eecac74c28b80df6b98b687fd5b0f2b17db081b
Add tests - DAO.

[Issue#] N/A
[Feature] Add DAO tests back to wrt-commons. Build tests conditionally.
[Problem] N/A
[Cause] Unit tests should reside in the same repositories the code they test.
Tests should be built only on explicit request.
[Solution] Add DAO tests to wrt-commons repository. Build tests only
when option WITH_TESTS is set.
[SCMRequest] gbs >= 0.12

[Verification]
REQUIRES: gbs >= 0.12
1. Remove `wrt-extra` RPM package from the device, if present.
2. Make sure `wrt-tests-dao` binary is not present on the device.
3. Build repository using gbs with option `--define "WITH_TESTS OFF"`.
4. Check if subdirectory `tests/` was included in the build process
   (it should NOT be included) and if `wrt-tests-dao` is included in
   the RPM package (it should NOT be included).
5. Install RPM package created in step 3.
6. Check if `wrt-tests-dao` binary is present on the device (it should
   NOT be present).
7. Build repository using gbs with option `--define "WITH_TESTS ON"`.
8. Check if subdirectory `tests/` was included in build process (it
   should be included) and if `wrt-tests-dao` is included in the RPM
   package (it should be included).
9. Install RPM package created in step 7.
10. Run `wrt-tests-dao` test suite.

Change-Id: I5dbe07a30f9ab1d2c3f106e704a4d9254f5e493f
13 files changed:
CMakeLists.txt
packaging/wrt-commons.spec
tests/CMakeLists.txt [new file with mode: 0644]
tests/CMakeUtils.txt [new file with mode: 0644]
tests/dao/CMakeLists.txt [new file with mode: 0644]
tests/dao/README [new file with mode: 0644]
tests/dao/TestCases_FeatureDAO.cpp [new file with mode: 0644]
tests/dao/TestCases_GlobalDAO.cpp [new file with mode: 0644]
tests/dao/TestCases_PluginDAO.cpp [new file with mode: 0644]
tests/dao/TestCases_PropertyDAO.cpp [new file with mode: 0644]
tests/dao/TestCases_WidgetDAO.cpp [new file with mode: 0644]
tests/dao/tests_dao.cpp [new file with mode: 0644]
tests/dao/wrt_dao_tests_prepare_db.sh [new file with mode: 0755]