Commit df69e0a0 authored by Bernardo Dal Seno's avatar Bernardo Dal Seno

Fix failure in distcheck and coverage tests

autotools/testrunner was missing in distcheck.  Now some changes from
70041061 have been reverted, and testrunner
is not built anymore.  coverage now uses fakeroot when needed.
Signed-off-by: default avatarBernardo Dal Seno <bdalseno@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 96a7481d
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
/autotools/missing /autotools/missing
/autotools/py-compile /autotools/py-compile
/autotools/replace_vars.sed /autotools/replace_vars.sed
/autotools/testrunner
/config.log /config.log
/config.status /config.status
/configure /configure
......
...@@ -137,7 +137,6 @@ CLEANFILES = \ ...@@ -137,7 +137,6 @@ CLEANFILES = \
$(PYTHON_BOOTSTRAP) \ $(PYTHON_BOOTSTRAP) \
epydoc.conf \ epydoc.conf \
autotools/replace_vars.sed \ autotools/replace_vars.sed \
autotools/testrunner \
daemons/daemon-util \ daemons/daemon-util \
daemons/ganeti-cleaner \ daemons/ganeti-cleaner \
devel/upload \ devel/upload \
...@@ -441,7 +440,6 @@ docpng = $(patsubst %.dot,%.png,$(docdot)) ...@@ -441,7 +440,6 @@ docpng = $(patsubst %.dot,%.png,$(docdot))
# Things to build but not to install (add it to EXTRA_DIST if it should be # Things to build but not to install (add it to EXTRA_DIST if it should be
# distributed) # distributed)
noinst_DATA = \ noinst_DATA = \
autotools/testrunner \
devel/upload \ devel/upload \
doc/html \ doc/html \
$(BUILT_EXAMPLES) \ $(BUILT_EXAMPLES) \
...@@ -578,7 +576,7 @@ EXTRA_DIST = \ ...@@ -578,7 +576,7 @@ EXTRA_DIST = \
autotools/convert-constants \ autotools/convert-constants \
autotools/docpp \ autotools/docpp \
autotools/gen-coverage \ autotools/gen-coverage \
autotools/testrunner.in \ autotools/testrunner \
$(RUN_IN_TEMPDIR) \ $(RUN_IN_TEMPDIR) \
daemons/daemon-util.in \ daemons/daemon-util.in \
daemons/ganeti-cleaner.in \ daemons/ganeti-cleaner.in \
...@@ -775,7 +773,8 @@ TESTS = $(dist_TESTS) $(nodist_TESTS) ...@@ -775,7 +773,8 @@ TESTS = $(dist_TESTS) $(nodist_TESTS)
# Environment for all tests # Environment for all tests
PLAIN_TESTS_ENVIRONMENT = \ PLAIN_TESTS_ENVIRONMENT = \
PYTHONPATH=. TOP_SRCDIR=$(abs_top_srcdir) PYTHON=$(PYTHON) $(RUN_IN_TEMPDIR) PYTHONPATH=. TOP_SRCDIR=$(abs_top_srcdir) PYTHON=$(PYTHON) \
FAKEROOT=$(FAKEROOT_PATH) $(RUN_IN_TEMPDIR)
# Environment for tests run by automake # Environment for tests run by automake
TESTS_ENVIRONMENT = \ TESTS_ENVIRONMENT = \
...@@ -854,10 +853,6 @@ tools/kvm-ifup: tools/kvm-ifup.in $(REPLACE_VARS_SED) ...@@ -854,10 +853,6 @@ tools/kvm-ifup: tools/kvm-ifup.in $(REPLACE_VARS_SED)
sed -f $(REPLACE_VARS_SED) < $< > $@ sed -f $(REPLACE_VARS_SED) < $< > $@
chmod +x $@ chmod +x $@
autotools/testrunner: autotools/testrunner.in $(REPLACE_VARS_SED)
sed -f $(REPLACE_VARS_SED) < $< > $@
chmod u+x $@
devel/upload: devel/upload.in $(REPLACE_VARS_SED) devel/upload: devel/upload.in $(REPLACE_VARS_SED)
sed -f $(REPLACE_VARS_SED) < $< > $@ sed -f $(REPLACE_VARS_SED) < $< > $@
chmod u+x $@ chmod u+x $@
...@@ -1068,7 +1063,6 @@ $(REPLACE_VARS_SED): Makefile ...@@ -1068,7 +1063,6 @@ $(REPLACE_VARS_SED): Makefile
echo 's#@GNTMASTERDGROUP@#$(MASTERD_GROUP)#g'; \ echo 's#@GNTMASTERDGROUP@#$(MASTERD_GROUP)#g'; \
echo 's#@GNTDAEMONSGROUP@#$(DAEMONS_GROUP)#g'; \ echo 's#@GNTDAEMONSGROUP@#$(DAEMONS_GROUP)#g'; \
echo 's#@CUSTOM_ENABLE_CONFD@#$(ENABLE_CONFD)#g'; \ echo 's#@CUSTOM_ENABLE_CONFD@#$(ENABLE_CONFD)#g'; \
echo 's#@FAKEROOT@#$(FAKEROOT_PATH)#g'; \
} > $@ } > $@
# Using deferred evaluation # Using deferred evaluation
......
#!/bin/bash #!/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 # 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 # it under the terms of the GNU General Public License as published by
...@@ -34,7 +34,16 @@ omit="--omit=$omit" ...@@ -34,7 +34,16 @@ omit="--omit=$omit"
$COVERAGE erase $COVERAGE erase
for script; do for script; do
$COVERAGE run --branch --append $script if [[ "$script" == *-runasroot.py ]]; then
if [[ -z "$FAKEROOT" ]]; then
echo "FAKEROOT variable not set and needed for $script" >&2
exit 1
fi
cmdprefix="$FAKEROOT"
else
cmdprefix=
fi
$cmdprefix $COVERAGE run --branch --append $script
done done
echo "Writing text report to $TEXT_COVERAGE ..." >&2 echo "Writing text report to $TEXT_COVERAGE ..." >&2
......
...@@ -20,13 +20,11 @@ ...@@ -20,13 +20,11 @@
set -e set -e
FAKEROOT='@FAKEROOT@'
filename=$1 filename=$1
execasroot() { execasroot() {
if [[ -z "$FAKEROOT" ]]; then if [[ -z "$FAKEROOT" ]]; then
echo "'fakeroot' not found at configure time" >&2 echo "FAKEROOT variable not set" >&2
exit 1 exit 1
fi fi
exec "$FAKEROOT" "$@" exec "$FAKEROOT" "$@"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment