X-Git-Url: https://code.grnet.gr/git/ganeti-local/blobdiff_plain/e8c8cf1acd8385959611994ab1f343b08774d83e..dc7d923e222361ed176abd841f47f62900d4ac65:/autotools/testrunner diff --git a/autotools/testrunner b/autotools/testrunner index d933613..cc963c7 100755 --- a/autotools/testrunner +++ b/autotools/testrunner @@ -1,7 +1,7 @@ #!/bin/bash # -# Copyright (C) 2010 Google Inc. +# Copyright (C) 2010, 2011 Google Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -22,7 +22,19 @@ set -e filename=$1 +execasroot() { + local fname=$1 + shift + if [[ -z "$FAKEROOT" ]]; then + echo "WARNING: FAKEROOT variable not set, skipping $fname" >&2 + else + exec "$FAKEROOT" "$@" + fi +} + case "$filename" in + *-runasroot.py) execasroot $filename $PYTHON "$@" ;; *.py) exec $PYTHON "$@" ;; + *-runasroot) execasroot $filename "$@" ;; *) exec "$@" ;; esac