How to force run tests as non-root?

Sergey Fedorov vital.had at
Sun Feb 25 06:21:26 UTC 2024

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/bin/cmake -E cmake_progress_start

make: Leaving directory

--->  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

On Sat, Feb 24, 2024 at 2:28 PM Joshua Root <jmr at> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the macports-dev mailing list