diff tests/CMakeLists.txt @ 0:6ce4443e7545

Add the draft of an API to collect statistics on LXC
author Louis Opter <kalessin@kalessin.fr>
date Wed, 29 Dec 2010 23:28:14 +0100
parents
children 50215911acb3
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/CMakeLists.txt	Wed Dec 29 23:28:14 2010 +0100
@@ -0,0 +1,22 @@
+# This is fairly limited for now, this will require more work to test all cases
+# like:
+# - cgroups are not mounted;
+# - there is no containers running.
+
+MACRO(ADD_LXCSTATS_TEST TEST)
+    ADD_EXECUTABLE(test_${TEST} ${TEST}.c)
+    TARGET_LINK_LIBRARIES(test_${TEST} lxcstats)
+    ADD_TEST(${TEST} test_${TEST})
+ENDMACRO(ADD_LXCSTATS_TEST TEST)
+
+SET(TESTS
+    close
+    open
+    read_file
+    read_big_file
+    span_containers
+   )
+
+FOREACH(I ${TESTS})
+    ADD_LXCSTATS_TEST(${I})
+ENDFOREACH(I ${TESTS})