From 10edbcd8ca1efb88bd89a45f78b31ef8a5772026 Mon Sep 17 00:00:00 2001 From: Mihaela Sendrea Date: Mon, 14 Apr 2014 15:26:19 +0200 Subject: lxc: Add ptest support Install lxc test suite and run it as ptest. Signed-off-by: Mihaela Sendrea Signed-off-by: Bruce Ashfield --- recipes-containers/lxc/files/run-ptest | 4 ++++ recipes-containers/lxc/files/runtest.patch | 32 ++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 recipes-containers/lxc/files/run-ptest create mode 100644 recipes-containers/lxc/files/runtest.patch (limited to 'recipes-containers/lxc/files') diff --git a/recipes-containers/lxc/files/run-ptest b/recipes-containers/lxc/files/run-ptest new file mode 100644 index 00000000..23a6256b --- /dev/null +++ b/recipes-containers/lxc/files/run-ptest @@ -0,0 +1,4 @@ +#!/bin/sh + +make -C src/tests -k check-TESTS + diff --git a/recipes-containers/lxc/files/runtest.patch b/recipes-containers/lxc/files/runtest.patch new file mode 100644 index 00000000..e4e034b2 --- /dev/null +++ b/recipes-containers/lxc/files/runtest.patch @@ -0,0 +1,32 @@ +Add install-ptest rule. + +Signed-off-by: Mihaela Sendrea +Upstream-status: Pending + +diff -uNr a/src/tests/Makefile.am b/src/tests/Makefile.am +--- a/src/tests/Makefile.am 2014-04-07 16:25:59.246238815 +0300 ++++ b/src/tests/Makefile.am 2014-04-10 18:09:43.195772467 +0300 +@@ -54,6 +54,23 @@ + + endif + ++TESTS = lxc-test-containertests lxc-test-locktests \ ++ lxc-test-getkeys lxc-test-lxcpath lxc-test-cgpath lxc-test-console \ ++ lxc-test-snapshot lxc-test-concurrent lxc-test-may-control \ ++ lxc-test-reboot lxc-test-list lxc-test-attach lxc-test-device-add-remove ++ ++buildtest-TESTS: $(TESTS) ++ ++install-ptest: ++ install -d $(TEST_DIR) ++ install -D ../lxc/liblxc.so $(TEST_DIR)/../lxc/liblxc.so ++ install -D ../../config/test-driver $(TEST_DIR)/../../config/test-driver ++ cp Makefile $(TEST_DIR) ++ @(for file in $(TESTS); do install $$file $(TEST_DIR); done;) ++ sed -i 's|^Makefile:|_Makefile:|' $(TEST_DIR)/Makefile ++ sed -i 's|^all-am:|_all-am:|' $(TEST_DIR)/Makefile ++ sed -i -e 's|^\(.*\.log:\) \(.*EXEEXT.*\)|\1|g' $(TEST_DIR)/Makefile ++ + EXTRA_DIST = \ + cgpath.c \ + clonetest.c \ -- cgit v1.2.3-54-g00ecf