allow regression to run from pycharm by using sudo with passwd file. you also need to suid root zfs and zpool

This commit is contained in:
Edwin Eefting
2021-04-15 13:56:24 +02:00
parent db6523f3c0
commit a920744b1e
5 changed files with 6 additions and 6 deletions

View File

@ -58,7 +58,8 @@ def redirect_stderr(target):
def shelltest(cmd):
"""execute and print result as nice copypastable string for unit tests (adds extra newlines on top/bottom)"""
ret=(subprocess.check_output(cmd , shell=True).decode('utf-8'))
ret=(subprocess.check_output("SUDO_ASKPASS=./password.sh sudo -A "+cmd , shell=True).decode('utf-8'))
print("######### result of: {}".format(cmd))
print(ret)
print("#########")