Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-19672

AutotestRunner properties are ignored

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • Qt Creator 4.6.0-beta1
    • Test Integration
    • None
    • OSX 10.12.6, Qt Creator 4.5.82.

    Description

      I have a QBS file like this,

      import qbs
      
      Project {
          minimumQbsVersion: "1.7.1"
          qbsSearchPaths: ["qbs", "."]
      
          references: [
              "googletest.qbs"
          ]
      
          Application {
              consoleApplication: true
      
              Depends {
                  name: "myweirdenvironmentmodule"
              }
              Depends {
                  name: "googletest"
              }
      
              type: ["application", "autotest"]
      
              files: [
                  "main.cpp",
              ]
      
          }
      
          AutotestRunner {
              arguments: ["test"]
              environment: ["TEST=1"]
          }
      }
      

      `myweirdenvironmentmodule` is a module that sets a load of environment variables I need. Anyway when I set the program to just print its arguments and environment and then exit. Unfortunately I can't find any way at all in Qt Creator to see this output.

      Fortunately if you don't run any tests there is a an error ("the program didn't print any expected output" or something) and the error shows you the command line that is run and the environment. It seems that it totally ignores the `test` argument and `TEST=1` env var.

      I can't work out why this is - I tried editing AutotestRunner.qbs in the application bundle to add a `console.warn()` message but either it isn't run, or is ignored or perhaps there is a compiled cache somewhere of that QBS file that isn't updated.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              cstenger Christian Stenger
              timmmm Tim
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes