Qt World Summit: Submit your Presentation

QtCreator - excluding testcase from "Files to deploy" on remote target

  • I use QtCreator 4.0.3. In my project that uses the subdirs template I have an application that must be run on a remote Linux host. For that I added to the project file for the application:

    target.files = name-for-remote-executable
    target.path = remote-deployment-dir
    INSTALLS += target

    With that the Deploy section under the Projects for my remote build config correctly shows these settings as "Files to deploy" and "Executable on device".

    The problem is that "Files to deploy" also lists all unit tests that have "testcase" added to CONFIG. Those have the remote path set to /my-local-QT-install-root/5.7/gcc_64/tests/. Thus the deployment step fails as QtCreator tries to copy the unit tests executable to this path on the remote target and that fails. Note that the unit test projects neither add anything to INSTALLS nor define any target.

    So how can I prevent the unit tests from been included into the "Files to deploy" by default? By experimenting I see that when I comment out "CONFIG += testcase", the case is removed from "Files to deploy". However, I need that in CONFIG to be able to run "make check".

    Any suggestions?

  • For now I worked around the problem using a "Custom Process Step" under Projects/Run/Deployment. It points to a shell script that transfers only the files that I need. It replaces "Upload files via sftp". This works but is not cross-platform and requires to add more instructions about project setup. It would be much better if I could disable interference of CONFIG += testcase with the deployment set.

  • This issue is still present, any new workaround?

Log in to reply