How to use sudo in CTest

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

How to use sudo in CTest

CMake mailing list
I have a suite of CTests that install and test our product on Ubuntu.

The installer requires sudo to run. I have been running the whole suite
as sudo, which is not a great idea.

So I have toyed with trying to run just the installer with sudo, but no
luck so far.

I configured sudo to run without asking for a password and that runs fine.

But these CTest COMMANDS do not:

add_test(NAME install COMMAND sudo ./vainstall aParameter )

add_test(NAME install COMMAND "sudo ./vainstall aParameter" )

What am I doing wrong?

Thanks in advance.

Donald [|]
A bad day in [] is better than a good day in {}.

This email has been checked for viruses by Avast antivirus software.


Powered by

Please keep messages on-topic and check the CMake FAQ at:

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support:
CMake Consulting:
CMake Training Courses:

Visit other Kitware open-source projects at

Follow this link to subscribe/unsubscribe: