~renatofilho/address-book-app/extend-avatar

« back to all changes in this revision

Viewing changes to tests/qml/CMakeLists.txt

  • Committer: Renato Araujo Oliveira Filho
  • Date: 2014-07-04 17:32:05 UTC
  • mfrom: (169.1.56 address-book-app)
  • Revision ID: renato.filho@canonical.com-20140704173205-xvlxcx5zqb8mgegk
Trunk merged.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
add_test(NAME qmltestrunner
2
 
         WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
3
 
         COMMAND xvfb-run -a -s "-screen 0 1024x768x24" qmltestrunner -import ${imports_BINARY_DIR} -input ${CMAKE_SOURCE_DIR}/tests/qml
4
 
)
 
1
find_program(QMLTESTRUNNER_BIN
 
2
    NAMES qmltestrunner
 
3
    PATHS /usr/lib/*/qt5/bin
 
4
    NO_DEFAULT_PATH
 
5
)
 
6
 
 
7
find_program(XVFB_RUN_BIN
 
8
    NAMES xvfb-run
 
9
)
 
10
 
 
11
if(QMLTESTRUNNER_BIN AND XVFB_RUN_BIN)
 
12
    add_test(NAME qmltestrunner
 
13
        WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
 
14
        COMMAND ${XVFB_RUN_BIN} -a -s "-screen 0 1024x768x24" ${QMLTESTRUNNER_BIN} -import ${imports_BINARY_DIR} -input ${CMAKE_SOURCE_DIR}/tests/qml
 
15
    )
 
16
else()
 
17
    if (NOT QMLTESTRUNNER_BIN)
 
18
        message(WARNING "Qml tests disabled: qmltestrunner not found")
 
19
    else()
 
20
        message(WARNING "Qml tests disabled: xvfb-run not found")
 
21
    endif()
 
22
endif()