Add the libcgroup_systemd_idle_thread to the EXTRA_DIST list. This
makes it available during `make distcheck`.
Modifying the PATH environment variable when running sudo is not
allowed on some systems. Copy the libcgroup_systemd_idle_thread
to /bin to overcome this.
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
Reviewed-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
(cherry picked from commit
3f3e0dc1fdadfd9cd0de227c568fb90eea63d9a0)
if ENABLE_PYTHON
SUBDIRS += python
endif
+EXTRA_DIST = libcgroup_systemd_idle_thread
# generate parse.h from parse.y
AM_YFLAGS = -d
-n Libcg"$RANDOM"
RET2=$?
-pushd ../../src || cleanup $AUTOMAKE_HARD_ERROR
-PATH="$PATH:$(pwd)"
-export PATH
-popd || cleanup $AUTOMAKE_HARD_ERROR
+if [ -z "$srcdir" ]; then
+ # $srcdir is set by automake but will likely be empty when run by hand and
+ # that's fine
+ srcdir=""
+else
+ srcdir=$srcdir"/"
+fi
-sudo PATH="$PATH" PYTHONPATH="$PYTHONPATH" ./ftests.py -l 10 -s "sudo" \
+sudo cp $srcdir../../src/libcgroup_systemd_idle_thread /bin
+sudo PYTHONPATH="$PYTHONPATH" ./ftests.py -l 10 -s "sudo" \
-L "$START_DIR/ftests-nocontainer.py.sudo.log" --no-container -n Libcg"$RANDOM"
RET3=$?
+sudo rm /bin/libcgroup_systemd_idle_thread
if [ "$START_DIR" != "$SCRIPT_DIR" ]; then
rm -f "$START_DIR"/*.py