MSVC Console Environment in CTest

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

MSVC Console Environment in CTest

Dixon, Shane
I have a CTest script that I'd like to run nightly on a Windows XP machine.  If I run it from the "Visual Studio 2008 Command Prompt", it works fine.  If I run from a "Scheduled Task", it balks and says it can't find "cl", so obviously the CTEST_ENVIRONMENT is wrong.

Before I start disecting these vcvars32.bat script that sets all the environment, has someone else already converted that .bat script that sets the environment into something that I can use in Ctest?  Is there a better way to setup the Scheduled Task so that I don't have to set up the environment in the first place?


--
Shane Dixon
Linux Engineer
Atmel Corporation

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: MSVC Console Environment in CTest

Clinton Stimpson

I just make a .bat file for the task scheduler that calls Visual Studio's .bat
file for setting up the environment, then calls ctest.

Clint

On Thursday 15 October 2009 11:45:09 am Dixon, Shane wrote:

> I have a CTest script that I'd like to run nightly on a Windows XP machine.
>  If I run it from the "Visual Studio 2008 Command Prompt", it works fine.
> If I run from a "Scheduled Task", it balks and says it can't find "cl", so
> obviously the CTEST_ENVIRONMENT is wrong.
>
> Before I start disecting these vcvars32.bat script that sets all the
> environment, has someone else already converted that .bat script that sets
> the environment into something that I can use in Ctest?  Is there a better
> way to setup the Scheduled Task so that I don't have to set up the
> environment in the first place?
>
>
> --
> Shane Dixon
> Linux Engineer
> Atmel Corporation
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: MSVC Console Environment in CTest

David Cole
In reply to this post by Dixon, Shane
Have the scheduled task call a batch file of your creation (driver.bat)

Have driver.bat call vcvars32.bat and then ctest -S your script like this:

startlocal
call "C:\Program Files\full\path\to\vcvars32.bat"
"C:\Program Files\CMake 2.6\bin\ctest.exe" -S "C:\full\path\to\script.cmake"
endlocal

startlocal/endlocal are used to push/pop environment changes so you can isolate env changes...


HTH,
David


On Thu, Oct 15, 2009 at 1:45 PM, Dixon, Shane <[hidden email]> wrote:
I have a CTest script that I'd like to run nightly on a Windows XP machine.  If I run it from the "Visual Studio 2008 Command Prompt", it works fine.  If I run from a "Scheduled Task", it balks and says it can't find "cl", so obviously the CTEST_ENVIRONMENT is wrong.

Before I start disecting these vcvars32.bat script that sets all the environment, has someone else already converted that .bat script that sets the environment into something that I can use in Ctest?  Is there a better way to setup the Scheduled Task so that I don't have to set up the environment in the first place?


--
Shane Dixon
Linux Engineer
Atmel Corporation

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: MSVC Console Environment in CTest

Dixon, Shane
That did the trick.  Thank you both!

--
Shane Dixon
Linux Engineer
Atmel Corporation

 


From: David Cole [mailto:[hidden email]]
Sent: Thursday, October 15, 2009 12:22 PM
To: Dixon, Shane
Cc: [hidden email]
Subject: Re: [CMake] MSVC Console Environment in CTest

Have the scheduled task call a batch file of your creation (driver.bat)

Have driver.bat call vcvars32.bat and then ctest -S your script like this:

startlocal
call "C:\Program Files\full\path\to\vcvars32.bat"
"C:\Program Files\CMake 2.6\bin\ctest.exe" -S "C:\full\path\to\script.cmake"
endlocal

startlocal/endlocal are used to push/pop environment changes so you can isolate env changes...


HTH,
David


On Thu, Oct 15, 2009 at 1:45 PM, Dixon, Shane <[hidden email]> wrote:
I have a CTest script that I'd like to run nightly on a Windows XP machine.  If I run it from the "Visual Studio 2008 Command Prompt", it works fine.  If I run from a "Scheduled Task", it balks and says it can't find "cl", so obviously the CTEST_ENVIRONMENT is wrong.

Before I start disecting these vcvars32.bat script that sets all the environment, has someone else already converted that .bat script that sets the environment into something that I can use in Ctest?  Is there a better way to setup the Scheduled Task so that I don't have to set up the environment in the first place?


--
Shane Dixon
Linux Engineer
Atmel Corporation

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Loading...