~townsend/compiz/fix-auto-vp-switch-0.9.10

« back to all changes in this revision

Viewing changes to compizconfig/compizconfig-python/tests/compiz_config_test.py

  • Committer: Sam Spilsbury
  • Date: 2012-10-16 13:53:20 UTC
  • mto: This revision was merged to the branch mainline in revision 3434.
  • Revision ID: sam.spilsbury@canonical.com-20121016135320-3zb8wy8u16eayb7m
Clean up the CMake code around the python modules and uninstalling
 - It isn't possible to build python extensions using distutils that
   link to things that we are building, because CMake provides no
   means for a custom command to depend on a library. Build them
   using CMake directly instead
 - Clean up the tests: the tests depended on having a working opengl
   and core plugin xml file and were also sensitive to xml data. Make
   a mock.xml and use that instead
 - Require ini for the compizconfig-python tests. They won't run without it
 - Fix the uninstall scripts. We were clobbering the uninstall target
   with the python uninstall targets, that is just plain wrong. Created
   a new cmake function to append custom uninstall scripts to the global
   uninstall script

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
arch = subprocess.Popen (["uname", "-p"], stdout=subprocess.PIPE).communicate ()[0][:-1]
6
6
 
7
7
os.environ["G_SLICE"] = "always-malloc"
8
 
os.environ["COMPIZ_METADATA_PATH"] = "generated/"
 
8
os.environ["COMPIZ_METADATA_PATH"] = "compizconfig/compizconfig-python/"
9
9
os.environ["COMPIZ_CONFIG_PROFILE"] = ""
10
10
os.environ["XDG_CONFIG_HOME"] = "compizconfig/libcompizconfig/config"
11
11
os.environ["LIBCOMPIZCONFIG_BACKEND_PATH"] = "compizconfig/libcompizconfig/backend/"
12
12
os.environ["XDG_DATA_DIRS"] = "generated/"
13
13
 
14
 
sys.path.insert (0, "compizconfig/compizconfig-python/build/lib.linux-%s-%s.%s/" % (arch, sys.version_info[0], sys.version_info[1]))
 
14
sys.path.insert (0, "compizconfig/compizconfig-python")
15
15
 
16
16
import unittest
17
17
import compizconfig