Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt Creator can't see tests in nested SUBDIRS project
Forum Updated to NodeBB v4.3 + New Features

Qt Creator can't see tests in nested SUBDIRS project

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
5 Posts 3 Posters 1.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    wrosecrans
    wrote on 23 Jun 2018, 17:07 last edited by
    #1

    I have a Qmake .pro project as the top level of a project, and it uses SUBDIRS to see the .pro files for the various components of the project that build either shared objects or an application executable. One of those subdirectories is for tests, and it has a .pro file that uses SUBDIRS to include all of my tests in the project tree. Which is neat, but Qt Creator can't see into the second level SUBDIRS project to make the tests show up in the Qt Creator UI as tests. Is there any way to fix that?

    If I make a test in the top level project, it shows up in the UI correctly. I just don't want to pollute the top level of the project with mostly tests such that the actual source is obscured when you are browsing it, and I don't want to wedge all of my tests for various components into a single test project that makes one test executable.

    A 1 Reply Last reply 23 Jun 2018, 18:58
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 23 Jun 2018, 18:56 last edited by
      #2

      Hi,

      If your hierarchy is all made of subdirs projects, you should see the tests properly.

      Can you show how your project is organised ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • W wrosecrans
        23 Jun 2018, 17:07

        I have a Qmake .pro project as the top level of a project, and it uses SUBDIRS to see the .pro files for the various components of the project that build either shared objects or an application executable. One of those subdirectories is for tests, and it has a .pro file that uses SUBDIRS to include all of my tests in the project tree. Which is neat, but Qt Creator can't see into the second level SUBDIRS project to make the tests show up in the Qt Creator UI as tests. Is there any way to fix that?

        If I make a test in the top level project, it shows up in the UI correctly. I just don't want to pollute the top level of the project with mostly tests such that the actual source is obscured when you are browsing it, and I don't want to wedge all of my tests for various components into a single test project that makes one test executable.

        A Offline
        A Offline
        aha_1980
        Lifetime Qt Champion
        wrote on 23 Jun 2018, 18:58 last edited by
        #3

        Hi @wrosecrans

        One of those subdirectories is for tests, and it has a .pro file that uses SUBDIRS to include all of my tests in the project tree.

        That is also the way Qt's and QtCreators sources are organized, and there is no problem resolving the nested structures for Creator.

        Which is neat, but Qt Creator can't see into the second level SUBDIRS project to make the tests show up in the Qt Creator UI as tests.

        It must depend on your setup, as it works in principle as said.

        • which test framework do you use? (QTest, GoogleTest)
        • can you show your .pro files?

        Regards

        Qt has to stay free or it will die.

        1 Reply Last reply
        0
        • W Offline
          W Offline
          wrosecrans
          wrote on 23 Jun 2018, 19:16 last edited by
          #4

          Gaaaaaah. So, I started trying to create a minimal example to show the behavior I was seeing, because my actual hierarchy of .pro and .pri files is too big and ugly to post fully, and as soon as I touched it to start making a clean example, the nested tests started showing up in the Qt Creator UI.

          It was using QTest rather than Google Test. I don't quite understand what I was doing wrong, but since I can't make a useful reproduction of what I had been seeing and the problem has gone away, you can just ignore me. :)

          A 1 Reply Last reply 24 Jun 2018, 04:52
          1
          • W wrosecrans
            23 Jun 2018, 19:16

            Gaaaaaah. So, I started trying to create a minimal example to show the behavior I was seeing, because my actual hierarchy of .pro and .pri files is too big and ugly to post fully, and as soon as I touched it to start making a clean example, the nested tests started showing up in the Qt Creator UI.

            It was using QTest rather than Google Test. I don't quite understand what I was doing wrong, but since I can't make a useful reproduction of what I had been seeing and the problem has gone away, you can just ignore me. :)

            A Offline
            A Offline
            aha_1980
            Lifetime Qt Champion
            wrote on 24 Jun 2018, 04:52 last edited by
            #5

            @wrosecrans glad you got it working.

            so please mark this topic as SOLVED.

            Qt has to stay free or it will die.

            1 Reply Last reply
            0

            1/5

            23 Jun 2018, 17:07

            • Login

            • Login or register to search.
            1 out of 5
            • First post
              1/5
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved