def test_exts_list(self): """Test handling of list of extensions.""" os.environ['EASYBUILD_SOURCEPATH'] = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'easyconfigs') init_config() self.contents = '\n'.join([ 'name = "pi"', 'version = "3.14"', 'homepage = "http://example.com"', 'description = "test easyconfig"', 'toolchain = {"name": "dummy", "version": "dummy"}', 'exts_list = [', ' ("ext1", "ext_ver1", {', ' "source_tmpl": "gzip-1.4.eb",', # dummy source template to avoid downloading fail ' "source_urls": ["http://example.com/"]', ' }),', ' ("ext2", "ext_ver2", {', ' "source_tmpl": "gzip-1.4.eb",', # dummy source template to avoid downloading fail ' "source_urls": [("http://example.com", "suffix")],' ' "patches": ["toy-0.0.eb"],', # dummy patch to avoid downloading fail ' "checksums": [', ' "504c7036558938f997c1c269a01d7458",', # checksum for source (gzip-1.4.eb) ' "ddd5161154f5db67701525123129ff09",', # checksum for patch (toy-0.0.eb) ' ],', ' }),', ']', ]) self.prep() ec = EasyConfig(self.eb_file) eb = EasyBlock(ec) exts_sources = eb.fetch_extension_sources()
def test_exts_list(self): """Test handling of list of extensions.""" self.contents = '\n'.join([ 'name = "pi"', 'version = "3.14"', 'homepage = "http://example.com"', 'description = "test easyconfig"', 'toolchain = {"name": "dummy", "version": "dummy"}', 'exts_list = [', ' ("ext1", "ext_ver1", {', ' "source_tmpl": "gzip-1.4.eb",', # dummy source template to avoid downloading fail ' "source_urls": ["http://example.com/"]', ' }),', ' ("ext2", "ext_ver2", {', ' "source_tmpl": "gzip-1.4.eb",', # dummy source template to avoid downloading fail ' "source_urls": [("http://example.com", "suffix")],' ' "patches": ["toy-0.0.eb"],', # dummy patch to avoid downloading fail ' "checksums": [', ' "673085af5622393e543b9ea31f66c590",', # checksum for source (gzip-1.4.eb) ' "5e82b0e9faa5753545bb6da12d88d04b",', # checksum for patch () ' ],', ' }),', ']', ]) self.prep() eb = EasyBlock(self.eb_file) exts_sources = eb.fetch_extension_sources()
def test_exts_list(self): """Test handling of list of extensions.""" self.contents = '\n'.join([ 'name = "pi"', 'version = "3.14"', 'homepage = "http://google.com"', 'description = "test easyconfig"', 'toolchain = {"name": "dummy", "version": "dummy"}', 'exts_list = [', ' ("ext1", "ext_ver1", {', ' "source_tmpl": "gzip-1.4.eb",', # dummy source template to avoid downloading fail ' "source_urls": ["http://example.com/"]', ' }),', ' ("ext2", "ext_ver2", {', ' "source_tmpl": "gzip-1.4.eb",', # dummy source template to avoid downloading fail ' "source_urls": [("http://example.com", "suffix")],' ' }),', ']', ]) self.prep() eb = EasyBlock(self.eb_file) exts_sources = eb.fetch_extension_sources()
def test_exts_list(self): """Test handling of list of extensions.""" self.contents = '\n'.join([ 'name = "pi"', 'version = "3.14"', 'homepage = "http://google.com"', 'description = "test easyconfig"', 'toolchain = {"name": "dummy", "version": "dummy"}', 'exts_list = [', ' ("ext1", "ext_ver1", {', ' "source_tmpl": "gzip-1.4.eb",', # dummy source template to avoid downloading fail ' "source_urls": ["http://example.com/"]', ' }),', ' ("ext2", "ext_ver2", {', ' "source_tmpl": "gzip-1.4.eb",', # dummy source template to avoid downloading fail ' "source_urls": [("http://example.com", "suffix")],' ' }),', ']', ]) self.prep() eb = EasyBlock(self.eb_file) exts_sources = eb.fetch_extension_sources()