Allow testing against a dev 0compile checkout
authorThomas Leonard <talex5@gmail.com>
Tue, 5 Mar 2013 10:41:21 +0000 (5 10:41 +0000)
committerThomas Leonard <talex5@gmail.com>
Tue, 5 Mar 2013 10:41:21 +0000 (5 10:41 +0000)
0release.xml
tests/testrelease.py

index 4f39d0b..1299b19 100644 (file)
@@ -37,6 +37,7 @@
       </requires>
       <requires interface='http://0install.net/2006/interfaces/0compile.xml'>
         <version not-before='0.30'/>
+       <environment insert="0compile.xml" mode="replace" name="0COMPILE_FEED"/>
       </requires>
     </command>
     <requires interface="http://repo.roscidus.com/python/python">
index b1b00a9..88ec995 100755 (executable)
@@ -85,12 +85,17 @@ class TestRelease(unittest.TestCase):
                imp.reload(basedir)
                assert basedir.xdg_config_home == config_dir
 
-               # Register the local 0release as a feed so we test against that
+               # Register the local 0release/0compile feeds so we can test against those
                self.config = load_config()
+
                iface = self.config.iface_cache.get_interface("http://0install.net/2007/interfaces/0release.xml")
                iface.extra_feeds = [model.Feed(release_feed, arch = None, user_override = True)]
                writer.save_interface(iface)
        
+               iface = self.config.iface_cache.get_interface("http://0install.net/2006/interfaces/0compile.xml")
+               iface.extra_feeds = [model.Feed(os.environ["0COMPILE_FEED"], arch = None, user_override = True)]
+               writer.save_interface(iface)
+
        def tearDown(self):
                os.chdir(mydir)
                ro_rmtree(self.tmp)