Notes |
|
(0032187)
|
don bright
|
2013-02-02 18:12
|
|
Actually now that I think about it is probably breaks CTEST_CUSTOM_PRE_TEST as well, although I haven't tested. |
|
|
(0032188)
|
Rolf Eike Beer
|
2013-02-03 03:58
|
|
I'm pretty sure it will.
Until now it would have not worked if the program passed was something like "c:/program files/...". As a workaround I would say use a script as post-command, although that may not really work if the command is composed from variables. |
|
|
(0032189)
|
don bright
|
2013-02-03 07:28
|
|
my question is can a script be made executable on all platforms?
a .py file for example... will it 'execute' under windows, linux, and mac, just by itself when passed to CTEST_CUSTOM_POST_TEST('posttest.py') ? how does it know which python executable it will be using?
we were using something like this '${PYTHON_EXECUTABLE} posttest.py ${CMAKE_CURRENT_BIN_DIR}'... but that is using an argument. |
|
|
(0033546)
|
Baptist BENOIST
|
2013-07-16 07:22
|
|
@Rolf Eike Beer:
I must understand correctly the reasons you made such a commit before pushing a reversal of it 6187876dea89618044e200808bcae75a18bd40 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6187876dea89618044e200808bcae75a18bd40 [^]
What exactly was the problem which forced you to make such a commit?
I think that a command such as C:/Dir with spaces/any.exe (per example) worked before your commit if quoted properly in its definition:
set (CTEST_CUSTOM_POST_TEST "\"C:/Dir with spaces/any.exe\" one arg")
As the documentation states http://cmake.org/Wiki/CMake/Testing_With_CTest#Customizing_CTest, [^] the properties CTEST_CUSTOM_POST_TEST, CTEST_CUSTOM_PRE_TEST, CTEST_CUSTOM_POST_MEMCHECK and CTEST_CUSTOM_PRE_MEMCHECK can be used to execute a complete command, not simply the path of an executable.
Considering this, the commit that I would like to revert should not have been coded and merged to the official repository because the functionality is no more working as expected.
@don bright:
Your workaround may be useful to me if I am wrong in my commit reversal attempt; thank you for this.
|
|
|
(0033548)
|
Baptist BENOIST
|
2013-07-16 08:14
|
|
|
|
(0033552)
|
Mathias Gaunard
|
2013-07-16 09:19
|
|
I think the commit in question tried to change the code so that the following code:
SET(CTEST_CUSTOM_POST_TEST "/path\\ with\\ spaces/lapack_testing.py -s -d TESTING")
Should be written like so instead:
SET(CTEST_CUSTOM_POST_TEST "/path with spaces/lapack_testing.py" -s -d TESTING)
Obviously this was done wrong, as even that doesn't work.
The suggested change, if implemented correctly, would also prevent from having several commands in CTEST_CUSTOM_POST_TEST. I think the person who did the change didn't fully understand how this property was supposed to be used.
Reverting to the old behaviour is the correct fix IMHO. For this property, the responsibility of escaping slashes lies with the user. To change this, we'd have to introduce COMMAND prefixes like execute_process. |
|
|
(0033558)
|
Baptist BENOIST
|
2013-07-16 12:09
|
|
@Mathias Gaunard: It's clearer now. This comfort my opinion on a reversal of the problematic commit.
Also, I totally agree with you about the COMMAND prefix already used in execute_process. To my mind, CTEST_CUSTOM_POST_TEST and similar properties should have been macros having the same behavior than execute_command. |
|
|
(0033578)
|
Rolf Eike Beer
|
2013-07-23 02:25
|
|
Would a list (separated by ";") work for you? So you would set the property to be "/some path/program;arg;other arg"? |
|
|
(0033579)
|
Mathias Gaunard
|
2013-07-23 07:57
|
|
Isn't
"/some path/program;arg;other arg"
just another way to write
"/some path/program" arg "other arg"
?
This still has the obvious issue that you cannot have multiple commands. |
|
|
(0033580)
|
Robert Maynard
|
2013-07-23 09:13
|
|
I believe the original behavior of being able to run a single command like "python pretty_print.py --color" should be valid. I think treating the full string as a single path is undesired behavior. |
|
|
(0033599)
|
Baptist BENOIST
|
2013-07-25 05:03
|
|
@Rolf: I do not agree with your proposal of using "/some path/program;arg;other arg" as it prevents from executing multiple commands.
Ultimately, and that how CMake worked before, such a command string should work:
"echo hello world>/path\\ with\\ spaces/file;echo done"
or on Windows (under the responsibility of the end-developer)
"echo hello world>\"C:/path with spaces/file\";echo done"
the following one should also be acceptable:
"echo hello world>/path\\ with\\ spaces/file" "echo done"
As previously said, the most convenient solution for me would be to have the exact same behavior than the execute_process macro which combines the best of both needs. Until such a change is not being released, I would prefer to keep the previous one by reverting the commit 6187876dea89618044e200808bcae75a18bd40.
@Mathias:
> Isn't
> "/some path/program;arg;other arg"
> just another way to write
> "/some path/program" arg "other arg"
> ?
Accordingly to the CMake syntax guidelines, yes it is : http://www.cmake.org/cmake/help/syntax.html [^] |
|
|
(0033621)
|
Rolf Eike Beer
|
2013-07-27 16:12
|
|
|
|
(0034660)
|
Robert Maynard
|
2013-12-02 08:51
|
|
Closing resolved issues that have not been updated in more than 4 months. |
|