diff --git a/cgroups/automated/Makefile b/cgroups/automated/Makefile index ec44e4b2b04fb04e8de7ee24dff4f5783fd8e34b..f0b36adf948415ae405c10f96dc0988e76cd9970 100644 --- a/cgroups/automated/Makefile +++ b/cgroups/automated/Makefile @@ -1,5 +1,8 @@ # vim: set ts=8 tw=80 : +LIBDIR = $(PREFIX)/lib/apertis-tests +DATADIR = $(LIBDIR) + progs := cgroup-memory-threshold-notifier random-reads include ../../global-config.mk @@ -15,5 +18,7 @@ get-deps: $(APT_GET) install cpuburn curl install: .INSTALL + $(INSTALL) Makefile $(DESTDIR)$(TESTDATADIR) + $(INSTALL) $(patsubst %,%.c,$(progs)) $(DESTDIR)$(TESTDATADIR) clean: .CLEAN diff --git a/cgroups/automated/run-test.sh b/cgroups/automated/run-test.sh index e07ac7aba88f696be7e300fef1694bb7250f46c9..de5a91366922160c9fcf6626301ec5d623df4344 100755 --- a/cgroups/automated/run-test.sh +++ b/cgroups/automated/run-test.sh @@ -6,6 +6,16 @@ set -e TESTDIR=$(cd $(dirname $0); pwd; cd - &>/dev/null) . "${TESTDIR}/config.sh" +# Allow running uninstalled with the installed binaries +if ! [ -e "$TESTLIBDIR/random-reads" ]; then + TESTLIBDIR=/usr/lib/apertis-tests/cgroups/automated +fi + +# Same (legacy path) +if ! [ -e "$TESTLIBDIR/random-reads" ]; then + TESTLIBDIR=/usr/lib/chaiwala-tests/cgroups/automated +fi + CGFS_PATH="/sys/fs/cgroup" MID_CG="middleware" APP_CG="applications" diff --git a/common/cgroups-resource-control.yaml b/common/cgroups-resource-control.yaml index 5a1d5246e8cafa6928553ca9489c5cff2c1ff418..4ee9ab6ea97f871b144c1a4c684c0f6c563f7b9c 100644 --- a/common/cgroups-resource-control.yaml +++ b/common/cgroups-resource-control.yaml @@ -12,9 +12,12 @@ metadata: install: deps: + - apertis-tests + - apertis-tests-bin - chaiwala-tests - cpuburn - curl + - python run: steps: diff --git a/debian/apertis-tests-bin.install b/debian/apertis-tests-bin.install index 97b8c56cdf91bc750e31c9c75ff1f69816bbf82b..63e3d2326be490cc1d1e7eeea708a501895c2769 100644 --- a/debian/apertis-tests-bin.install +++ b/debian/apertis-tests-bin.install @@ -1 +1,3 @@ +usr/lib/apertis-tests/cgroups/automated/cgroup-memory-threshold-notifier +usr/lib/apertis-tests/cgroups/automated/random-reads usr/lib/apertis-tests/networking/proxy-manual/libsoup-get diff --git a/debian/apertis-tests.install b/debian/apertis-tests.install index ad22ed0af6632b989675ddf525ef9fcac18a20be..8de105b95450809454e27e3f7ec11e62e5f32aa1 100644 --- a/debian/apertis-tests.install +++ b/debian/apertis-tests.install @@ -4,6 +4,10 @@ usr/lib/apertis-tests/apparmor/*.yaml usr/lib/apertis-tests/apparmor/automated usr/lib/apertis-tests/apparmor/folks usr/lib/apertis-tests/apparmor/run-aa-test +usr/lib/apertis-tests/cgroups/automated/README +usr/lib/apertis-tests/cgroups/automated/Makefile +usr/lib/apertis-tests/cgroups/automated/*.c +usr/lib/apertis-tests/cgroups/automated/*.sh usr/lib/apertis-tests/clutter usr/lib/apertis-tests/common usr/lib/apertis-tests/dbus diff --git a/debian/chaiwala-tests.links b/debian/chaiwala-tests.links index e6fb5aa89dc69ac8f5f52e9216cff09161ceecf9..b2ce6e22b6eb539e1082cfd2df4c8bf73487b83a 100644 --- a/debian/chaiwala-tests.links +++ b/debian/chaiwala-tests.links @@ -1,2 +1,3 @@ +usr/lib/apertis-tests/cgroups usr/lib/chaiwala-tests/cgroups usr/lib/apertis-tests/dbus/dos-match-rules usr/share/chaiwala-tests/dbus-dos-match-rules/manual usr/lib/apertis-tests/dbus/dos-reply-time usr/share/chaiwala-tests/dbus-dos-reply-time/manual diff --git a/debian/chaiwala-tests.maintscript b/debian/chaiwala-tests.maintscript index 8147ea0f1162912d3dd3897c63d72dd2b1fde04a..105f07dff64ff3a59bf339f02cd12ff2cd642818 100644 --- a/debian/chaiwala-tests.maintscript +++ b/debian/chaiwala-tests.maintscript @@ -1,2 +1,3 @@ +dir_to_symlink /usr/lib/chaiwala-tests/cgroups /usr/lib/apertis-tests/cgroups symlink_to_dir /usr/share/chaiwala-tests/dbus-dos-match-rules/manual /usr/lib/apertis-tests/dbus/dos-match-rules symlink_to_dir /usr/share/chaiwala-tests/dbus-dos-reply-time/manual /usr/lib/apertis-tests/dbus/dos-reply-time diff --git a/debian/control b/debian/control index d5900706e2c9b30d78e7b0f628a46eadf0f3b748..dd695ff7309f8f8b4d61e89f9e84f437476938c1 100644 --- a/debian/control +++ b/debian/control @@ -277,6 +277,7 @@ Package: chaiwala-tests Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, apertis-tests, + apertis-tests-bin, libglib2.0-bin, binutils, connman, python-dbus, python-gobject, gir1.2-gstreamer-1.0, gir1.2-gst-plugins-base-1.0,