]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
python api_test: Drop use of @LXCPATH@
authorStéphane Graber <stgraber@ubuntu.com>
Fri, 1 Mar 2013 16:12:20 +0000 (11:12 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Fri, 1 Mar 2013 18:56:04 +0000 (13:56 -0500)
The python api test script was using @LXCPATH@ for one of its checks.
Now that the lxcpath is exposed by the lxc python module directly, this
can be dropped and api_test.py can now become a simple python file without
needing pre-processing by autoconf.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
.gitignore
configure.ac
src/python-lxc/examples/api_test.py [moved from src/python-lxc/examples/api_test.py.in with 98% similarity]

index e5bc5053df724f9fed90b3156dbd61e957e9d8dd..bef5cd1d180e2f7f64102abd9e8edebd3b45614d 100644 (file)
@@ -66,7 +66,6 @@ src/lxc/lxc-wait
 src/lxc/legacy/lxc-ls
 
 src/python-lxc/build/
-src/python-lxc/examples/api_test.py
 src/python-lxc/lxc/__init__.py
 src/python-lxc/lxc/__pycache__/
 
index 88959ff841f36389077208a44f66b0e17c8d2612..792aae860abb351ec78a2bf6b06d75c95c37296d 100644 (file)
@@ -384,7 +384,6 @@ AC_CONFIG_FILES([
 
        src/python-lxc/Makefile
        src/python-lxc/lxc/__init__.py
-       src/python-lxc/examples/api_test.py
 
        src/lua-lxc/Makefile
 
similarity index 98%
rename from src/python-lxc/examples/api_test.py.in
rename to src/python-lxc/examples/api_test.py
index 7711291eed9b535d299d034bbccdc36363ca6a82..367bb7ab99ba09e0dc7a31eaccee5b9fb219a014 100644 (file)
@@ -30,7 +30,6 @@ import uuid
 import sys
 
 # Some constants
-LXC_PATH_LIB = "@LXCPATH@"
 LXC_TEMPLATE = "ubuntu"
 
 # Let's pick a random name, avoiding clashes
@@ -43,7 +42,7 @@ container = lxc.Container(CONTAINER_NAME)
 
 # A few basic checks of the current state
 assert(container.config_file_name == "%s/%s/config" %
-       (LXC_PATH_LIB, CONTAINER_NAME))
+       (lxc.default_config_path, CONTAINER_NAME))
 assert(not container.defined)
 assert(container.init_pid == -1)
 assert(container.name == CONTAINER_NAME)