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

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 @@
/autotools/missing
/autotools/py-compile
/autotools/replace_vars.sed
/autotools/testrunner
/config.log
/config.status
/configure
......
......@@ -137,7 +137,6 @@ CLEANFILES = \
$(PYTHON_BOOTSTRAP) \
epydoc.conf \
autotools/replace_vars.sed \
autotools/testrunner \
daemons/daemon-util \
daemons/ganeti-cleaner \
devel/upload \
......@@ -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
# distributed)
noinst_DATA = \
autotools/testrunner \
devel/upload \
doc/html \
$(BUILT_EXAMPLES) \
......@@ -578,7 +576,7 @@ EXTRA_DIST = \
autotools/convert-constants \
autotools/docpp \
autotools/gen-coverage \
autotools/testrunner.in \
autotools/testrunner \
$(RUN_IN_TEMPDIR) \
daemons/daemon-util.in \
daemons/ganeti-cleaner.in \
......@@ -775,7 +773,8 @@ TESTS = $(dist_TESTS) $(nodist_TESTS)
# Environment for all tests
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
TESTS_ENVIRONMENT = \
......@@ -854,10 +853,6 @@ tools/kvm-ifup: tools/kvm-ifup.in $(REPLACE_VARS_SED)
sed -f $(REPLACE_VARS_SED) < $< > $@
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)
sed -f $(REPLACE_VARS_SED) < $< > $@
chmod u+x $@
......@@ -1068,7 +1063,6 @@ $(REPLACE_VARS_SED): Makefile
echo 's#@GNTMASTERDGROUP@#$(MASTERD_GROUP)#g'; \
echo 's#@GNTDAEMONSGROUP@#$(DAEMONS_GROUP)#g'; \
echo 's#@CUSTOM_ENABLE_CONFD@#$(ENABLE_CONFD)#g'; \
echo 's#@FAKEROOT@#$(FAKEROOT_PATH)#g'; \
} > $@
# Using deferred evaluation
......
#!/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
......@@ -34,7 +34,16 @@ omit="--omit=$omit"
$COVERAGE erase
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
echo "Writing text report to $TEXT_COVERAGE ..." >&2
......
......@@ -20,13 +20,11 @@
set -e
FAKEROOT='@FAKEROOT@'
filename=$1
execasroot() {
if [[ -z "$FAKEROOT" ]]; then
echo "'fakeroot' not found at configure time" >&2
echo "FAKEROOT variable not set" >&2
exit 1
fi
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