For some reason sudo is not allowed. For example, I try using *system "sudo -u svacchanda ./VidaliaTestSuite"* (just for the sake of testing, since it works when running manually), but get:
[100%] Built target VidaliaTestSuite make[1]: Leaving directory `/opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_security_Vidalia/Vidalia/work/build' /opt/local/bin/cmake -E cmake_progress_start /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_security_Vidalia/Vidalia/work/build/CMakeFiles 0 make: Leaving directory `/opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_security_Vidalia/Vidalia/work/build' ---> Testing Vidalia sh: /usr/bin/sudo: Operation not permitted Command failed: sudo -u svacchanda ./VidaliaTestSuite Exit code: 126 I tried a few other ways of adding *sudo -u* via the portfile, and get the same error. P. S. Both cmake 1.0 and cmake 1.1 fail identically with regard to running tests. On Sat, Feb 24, 2024 at 2:28 PM Joshua Root <j...@macports.org> wrote: > On 24/2/2024 17:27, Sergey Fedorov wrote: > > If Macports is running as root, but tests require non-root user, how to > > do that? > > There is no test.asroot no, apparently. > > All the usual ways you can run something as another user when you are > root. You could prefix your build.cmd with 'sudo -u $macportsuser' for > example. > > - Josh >