tipi-build/cli

`tipi . -t linux-cxx17 --test all` runs non-test executables

Closed this issue · 4 comments

When I run tipi . -t linux-cxx17 --test all I see executables run which aren't related to tests.

Repro here: https://github.com/matthew-dews/tipi-build-starter/tree/17d24ad137bd5298249707bd5f0743a6584af78d
where the "HelloTest" runs, as does "main" which is for the executable itself. The "main" executable always fails since it expects command line arguments.

Full output:

tipi@fda948a1a2dd /w/tipi-build-starter (main)> tipi . -t linux-cxx17 --test all
Mirroring : "tipi-build-starter"
⣾ Checking out - 16 of 16 (100.00%) done.
⣾ Checking out - 1 of 1 (100.00%) done.
⚙️ finding target mtime of 16 files
⣽ 16 files processed - 100.00%
⚙️ setting target mtime of 16 files
⣻ 16 files processed - 100.00%
⚙️ setting target mtime of 7 folders
✔ done
⏳ done.          
Found cache meta
 - Checking cache status for: boostorg/boost<564e2ac16907019696cdaba8a93e3588ec596062> ● correct version on disk
 - Checking cache status for: google/googletest<2dd1c131950043a8ad5ab0d2dda0e0970596586a> ● correct version on disk
google/googletest up-to-date check.
⏳ done.          
Writing build cache meta
scanning project...
⏳ done.          
convention build summary :
==========================

  tipi-build-starter library
  ====================

  .cpp files : "src/app/minigrep/minigrep_lib/minigrep.cpp" 

  executables
  ===========

    * src/app/minigrep/main
       + cpps : src/app/minigrep/main.cpp


e . /usr/local/share/.tipi/vF.w/929e88f-tipi-build-starter/src/app/minigrep/main.cpp
✔ [ok] CMake build recipes inferred by convention in "../929e88f-tipi-build-starter.b/a4d7881/recipe"
Compiling "." for linux-cxx17
⏳ ✔ [ok] built.        
Compiled executables:
▶ src/app/minigrep:
  ● main -> tipi run ./build/linux-cxx17/bin/src/app/minigrep/main
UpdateCTestConfiguration  from :/usr/local/share/.tipi/vF.w/929e88f-tipi-build-starter.b/a4d7881/bin/DartConfiguration.tcl
UpdateCTestConfiguration  from :/usr/local/share/.tipi/vF.w/929e88f-tipi-build-starter.b/a4d7881/bin/DartConfiguration.tcl
Test project /usr/local/share/.tipi/vF.w/929e88f-tipi-build-starter.b/a4d7881/bin
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 1
    Start 1: main

1: Test command: /usr/local/share/.tipi/vF.w/929e88f-tipi-build-starter.b/a4d7881/bin/src/app/minigrep/main
1: Test timeout computed to be: 10000000
test 2
    Start 2: HelloTest.BasicAssertions

2: Test command: /usr/local/share/.tipi/vF.w/929e88f-tipi-build-starter.b/a4d7881/bin/src/app/minigrep/minigrep_lib/test/minigrep_lib_test "--gtest_filter=HelloTest.BasicAssertions" "--gtest_also_run_disabled_tests"
2: Test timeout computed to be: 10000000
1: Error: Empty query not allowed.
1/2 Test #1: main .............................***Failed    0.00 sec
2: Running main() from /usr/local/share/.tipi/vF.w/9a3bc02-googletest/googletest/src/gtest_main.cc
2: Note: Google Test filter = HelloTest.BasicAssertions
2: [==========] Running 1 test from 1 test suite.
2: [----------] Global test environment set-up.
2: [----------] 1 test from HelloTest
2: [ RUN      ] HelloTest.BasicAssertions
2: [       OK ] HelloTest.BasicAssertions (0 ms)
2: [----------] 1 test from HelloTest (0 ms total)
2: 
2: [----------] Global test environment tear-down
2: [==========] 1 test from 1 test suite ran. (0 ms total)
2: [  PASSED  ] 1 test.
2/2 Test #2: HelloTest.BasicAssertions ........   Passed    0.00 sec

50% tests passed, 1 tests failed out of 2

Total Test time (real) =   0.00 sec

The following tests FAILED:
          1 - main (Failed)
Errors while running CTest
Output from these tests are in: /usr/local/share/.tipi/vF.w/929e88f-tipi-build-starter.b/a4d7881/bin/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.
● [err] failed.
● [err] Dynamic exception type: std::runtime_error
std::exception::what: CTest failed
● [err] Something went wrong, for help on your issue, we would enjoy getting your report at https://tipi.build/#contact
tipi@fda948a1a2dd /w/tipi-build-starter (main) [1]> 

Thank you for this, we indeed have got this regression recently, which started to include all executables as test, we are shipping a fixed tipi version ASAP.

In the meantime as workaround in your specific case you can add --exclude-test main to the cli

Our internal issue for this is nxxm/nxxm-src#1215, we will keep you informed as it get shipped.

Hi @matthew-dews , this is issue has been fixed in the last version. Please feel free to reopen if you don't see the expected results. 🙂

The version is available here : https://github.com/tipi-build/cli/releases/tag/v0.0.56

The update is possible via : tipi --force-upgrade