0
私はctest設定を持っており、プロジェクト用に構築したすべての実行ファイルでうまく動作します。問題は、システムコマンドでいくつかのテストを追加したいということです。ソリューションのプログラムとは何の関係もなく、ctestで実行できません。その後ctestは単純なコマンドでは実行できません
add_test(NAME toto_test COMMAND echo bla bla bla)
私はcTESTを実行したとき、私はエラー
Start 1: toto_test
Could not find executable echo
Looked in the following places:
echo
echo.exe
Release/echo
Release/echo.exe
Release/echo
Release/echo.exe
Unable to find executable: echo
1/10 Test #1: toto_test ........................***Not Run 0.00 sec
The following tests FAILED:
1 - toto_test (Not Run)
Errors while running CTest
を持って、私が実行します。
は、私はそれだけで が echoコマンドを実行し、以下のように簡単なテストを追加しました冗長オプションでctestを取得すると、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: toto_test
Could not find executable echo
Looked in the following places:
echo
echo.exe
Release/echo
Release/echo.exe
Release/echo
Release/echo.exe
1: Test command: "bla" "bla" "bla"
Unable to find executable: echo
1/1 Test #1: toto_test ........................***Not Run 0.00 sec
0% tests passed, 1 tests failed out of 1
Total Test time (real) = 0.02 sec
The following tests FAILED:
1 - toto_test (Not Run)
Errors while running CTest
誰でもできるお願いします。 ありがとうございました
あなたは 'FIND_PROGRAM()'や '$ {CMAKE_COMMANDを試してみてください} -E echo'それははるかに移植性が高くなります –