def test__localinstall_not_absolutely_necessary(self): fs = FileSystem(path=self.rootpath()) source = fs.rootdirectory().add(name='source', entry=Directory()) build = fs.rootdirectory().add(name='build', entry=Directory()) source.add( name=const.CONFIX2_PKG, entry=File(lines=[ "PACKAGE_NAME('test_localinstall_not_absolutely_necessary')", "PACKAGE_VERSION('1.2.3')" ])) source.add(name=const.CONFIX2_DIR, entry=File()) source.add(name='file.idl', entry=File()) package = LocalPackage(rootdirectory=source, setups=[ AutoBoilerplate(), CMake(library_dependencies=False), IDLSetup() ]) package.boil(external_nodes=[]) package.output() fs.sync() commands.cmake(packageroot=source.abspath(), builddir=build.abspath(), args=[]) commands.make(builddir=build.abspath(), args=[]) scan.rescan_dir(build) self.failUnless(build.find(['confix-include', 'file.idl'])) pass
def test__publicinstall_flat(self): fs = FileSystem(path=self.rootpath()) source = fs.rootdirectory().add(name='source', entry=Directory()) build = fs.rootdirectory().add(name='build', entry=Directory()) install = fs.rootdirectory().add(name='install', entry=Directory()) source.add(name=const.CONFIX2_PKG, entry=File(lines=[ "PACKAGE_NAME('test_publicinstall_flat')", "PACKAGE_VERSION('1.2.3')" ])) source.add(name=const.CONFIX2_DIR, entry=File()) source.add(name='file.idl', entry=File()) package = LocalPackage(rootdirectory=source, setups=[ AutoBoilerplate(), CMake(library_dependencies=False), IDLSetup() ]) package.boil(external_nodes=[]) package.output() fs.sync() commands.cmake( packageroot=source.abspath(), builddir=build.abspath(), args=['-DCMAKE_INSTALL_PREFIX=' + '/'.join(install.abspath())]) commands.make(builddir=build.abspath(), args=['install']) scan.rescan_dir(install) self.failUnless(install.find(['include', 'file.idl'])) pass
def test__publicinstall_subdir(self): fs = FileSystem(path=self.rootpath()) source = fs.rootdirectory().add(name='source', entry=Directory()) build = fs.rootdirectory().add(name='build', entry=Directory()) install = fs.rootdirectory().add(name='install', entry=Directory()) source.add(name=const.CONFIX2_PKG, entry=File(lines=[ "PACKAGE_NAME('test_publicinstall_subdir')", "PACKAGE_VERSION('1.2.3')" ])) source.add(name=const.CONFIX2_DIR, entry=File()) source.add(name='file.idl', entry=File(lines=[ 'module A {', 'module B {', '}; // /module', '}; // /module', ])) package = LocalPackage(rootdirectory=source, setups=[ AutoBoilerplate(), Automake(use_libtool=False, library_dependencies=False), IDLSetup() ]) package.boil(external_nodes=[]) package.output() fs.sync() bootstrap.bootstrap(packageroot=source.abspath(), path=None, use_kde_hack=False, argv0=sys.argv[0]) configure.configure(packageroot=source.abspath(), builddir=build.abspath(), prefix=install.abspath(), readonly_prefixes=[]) make.make(builddir=build.abspath(), args=['install']) scan.rescan_dir(install) self.failUnless(install.find(['include', 'A', 'B', 'file.idl'])) pass
def test__localinstall_not_absolutely_necessary(self): fs = FileSystem(path=self.rootpath()) source = fs.rootdirectory().add(name='source', entry=Directory()) build = fs.rootdirectory().add(name='build', entry=Directory()) source.add( name=const.CONFIX2_PKG, entry=File(lines=[ "PACKAGE_NAME('test_localinstall_not_absolutely_necessary')", "PACKAGE_VERSION('1.2.3')" ])) source.add(name=const.CONFIX2_DIR, entry=File()) source.add(name='file.idl', entry=File()) package = LocalPackage(rootdirectory=source, setups=[ AutoBoilerplate(), Automake(use_libtool=False, library_dependencies=False), IDLSetup() ]) package.boil(external_nodes=[]) package.output() fs.sync() bootstrap.bootstrap(packageroot=source.abspath(), path=None, use_kde_hack=False, argv0=sys.argv[0]) configure.configure(packageroot=source.abspath(), builddir=build.abspath(), prefix='/dev/null'.split(os.sep), readonly_prefixes=[]) make.make(builddir=build.abspath(), args=[]) scan.rescan_dir(build) self.failUnless(build.find(['confix-include', 'file.idl'])) pass