Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Redirect the output of failing unit tests
Forum Updated to NodeBB v4.3 + New Features

Redirect the output of failing unit tests

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 158 Views 2 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.
  • M Offline
    M Offline
    marcoser
    wrote on last edited by
    #1

    The root problem is that I cannot see the output of the unit test on gitlab when it fails.

    I tried to redirect the output of the test to a file but without success.
    If I run the test from a windows cmd, I see all.
    If I run the test via Qt, I cannot see the output of the failing unit test.

    I even tried via a sh.exe

    add_test(NAME ${testName}
    	COMMAND "C:\\Program Files\\Git\\bin\\sh.exe" --login -c "${TEST_ENVIRONMENT_DIR}/runTest.sh ${TEST_ENVIRONMENT_DIR}/config.txt ${testName} 1> ${testName}.log 2>&1"
    	WORKING_DIRECTORY "${TEST_ENVIRONMENT_DIR}"
    )
    

    with runTest.sh:

    #!/bin/bash
    "C:\\Program Files (x86)\\OpenCppCoverage\\OpenCppCoverage.exe" --export_type=binary --config_file $1 $2
    

    and the output goes to the file but the only thing that is missing is... the output of the failing unit test.

    Does anyone have a suggestion on how to solve this problem?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Can you share your .gitlab-ci.yml file ?

      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

      • Login

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