Merge lp:~unity-team/unity/phablet.unittests_new-cmake into lp:unity/phablet

Proposed by Andrea Cimitan
Status: Rejected
Rejected by: Michał Sawicz
Proposed branch: lp:~unity-team/unity/phablet.unittests_new-cmake
Merge into: lp:unity/phablet
Diff against target: 45 lines (+28/-3)
2 files modified
tests/unittests/CMakeLists.txt (+27/-2)
tests/unittests/tst_AnimationControllerWithSignals.qml (+1/-1)
To merge this branch: bzr merge lp:~unity-team/unity/phablet.unittests_new-cmake
Reviewer Review Type Date Requested Status
Michał Sawicz Disapprove
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+154401@code.launchpad.net

Commit message

New CMakeLists for unittests allowing import paths.

Description of the change

New CMakeLists for unittests allowing import paths.

To post a comment you must log in.
Revision history for this message
Michał Sawicz (saviq) wrote :

This means that "make test" nor "make check" will not run those tests, is that on purpose?

Why are we _not_ using add_test() in the macro and a custom target instead?

review: Needs Information
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :
review: Disapprove

Unmerged revisions

500. By Andrea Cimitan

Changed Test name for AnimationControllerWithSignals

499. By Andrea Cimitan

New CMakeLists.txt for unittests

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tests/unittests/CMakeLists.txt'
--- tests/unittests/CMakeLists.txt 2013-03-14 15:27:09 +0000
+++ tests/unittests/CMakeLists.txt 2013-03-20 15:13:38 +0000
@@ -1,2 +1,27 @@
1add_test(tst_QmlTests qmltestrunner -input ${CMAKE_SOURCE_DIR}/tests/unittests/ -o ${CMAKE_BINARY_DIR}/qmltestrun.xml,xunitxml -o -,txt)1add_custom_target(tests)
2set_tests_properties(tst_QmlTests PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=minimal")2
3# add_qml_test(COMPONENT_NAME [IMPORT_PATH])
4macro(add_qml_test COMPONENT_NAME)
5 if(${ARGC} EQUAL 1)
6 add_custom_target(test${COMPONENT_NAME}
7 qmltestrunner -input ${CMAKE_CURRENT_SOURCE_DIR}/tst_${COMPONENT_NAME}.qml
8 -o ${CMAKE_BINARY_DIR}/test${COMPONENT_NAME}.xml,xunitxml
9 -o -,txt)
10 else(${ARGC} EQUAL 1)
11 add_custom_target(test${COMPONENT_NAME}
12 qmltestrunner -input ${CMAKE_CURRENT_SOURCE_DIR}/tst_${COMPONENT_NAME}.qml
13 -import ${ARGV1}
14 -o ${CMAKE_BINARY_DIR}/test${COMPONENT_NAME}.xml,xunitxml
15 -o -,txt)
16 endif(${ARGC} EQUAL 1)
17
18 set_target_properties(test${COMPONENT_NAME} PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=minimal")
19 add_dependencies(tests test${COMPONENT_NAME})
20endmacro(add_qml_test)
21
22add_qml_test(AnimationControllerWithSignals)
23add_qml_test(Carousel)
24add_qml_test(CrossFadeImage)
25add_qml_test(MathLocal)
26add_qml_test(RatingStars)
27add_qml_test(TimeLocal)
328
=== modified file 'tests/unittests/tst_AnimationControllerWithSignals.qml'
--- tests/unittests/tst_AnimationControllerWithSignals.qml 2013-03-14 12:32:50 +0000
+++ tests/unittests/tst_AnimationControllerWithSignals.qml 2013-03-20 15:13:38 +0000
@@ -20,7 +20,7 @@
2020
21TestCase {21TestCase {
22 id: testCase22 id: testCase
23 name: "AnimationControllerWithSignals"23 name: "AnimationControllerWithSignalsTest"
2424
25 property real someNumber: 0.025 property real someNumber: 0.0
2626

Subscribers

People subscribed via source and target branches

to all changes: