[asterisk-dev] non-root for Asterisk Test Suite?

Paul Belanger pabelanger at gmail.com
Fri Apr 9 20:43:17 CDT 2010


All,

I had a chance to download and try the test suite today; +1 for Asterisk
automation. But was a little surprised when I seen this warning:

---
You must run this script as root.

      *** PLEASE NOTE ***
Running this script will completely wipe out any remnants of
an existing Asterisk installation.  Please ensure you only run
this in a test environment.

EXISTING CONFIGURATION WILL BE LOST!
      *******************
---

So I looked into the source, and found where we check for root.  As a
test, I disabled the check and then ran the command:

$ DESTDIR=/tmp/asterisk-test ./runtests.py

everything was looking good, until I ran the first example test, it failed. I
check out it source, and found we hardcoded the path to Asterisk binaries. So,
I modified the source to accept ${DESTDIR}, reran the test, and it passed.

So, long story short: Do we _need_ to run the test-suite as root,
or are patches welcome to make it non-root dependent?

Thanks,
PB



More information about the asterisk-dev mailing list