consoleText

download

20 Started by upstream project "cubes-eac" build number 7
originally caused by:
Started by an SCM change
Building on master in workspace /var/lib/jenkins/jobs/cubes-eac/workspace/TOXENV/py27
[py27] $ hg showconfig paths.default
[py27] $ hg pull --rev cd1fea4957e1e5556abb748d009097cb611e496d
pulling from http://hg.logilab.org/review/cubes/eac
searching for changes
adding changesets
adding manifests
adding file changes
added 5 changesets with 5 changes to 3 files
6 new obsolescence markers
(run 'hg update' to get a working copy)
[py27] $ hg update --clean --rev cd1fea4957e1e5556abb748d009097cb611e496d
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
[py27] $ hg --config extensions.purge= clean --all
[py27] $ hg log --rev . --template {node}
[py27] $ hg log --rev . --template {rev}
[py27] $ hg log --rev be578c04756e73065c8b86753c8b47e4c56e849c
changeset: 20:be578c04756e
user: Sylvain ThĂŠnault <sylvain.thenault@logilab.fr>
date: Fri Sep 16 11:50:43 2016 +0200
summary: [test] Fix import from six

[py27] $ hg log --template "<changeset node='{node}' author='{author|xmlescape}' rev='{rev}' date='{date}'><msg>{desc|xmlescape}</msg><added>{file_adds|stringify|xmlescape}</added><deleted>{file_dels|stringify|xmlescape}</deleted><files>{files|stringify|xmlescape}</files><parents>{parents}</parents></changeset>\n" --rev "ancestors('cd1fea4957e1e5556abb748d009097cb611e496d') and not ancestors(be578c04756e73065c8b86753c8b47e4c56e849c)" --encoding UTF-8 --encodingmode replace
[py27] $ /bin/bash -xe /tmp/hudson884169450160168683.sh
+ find . '(' -name 'pgdb*' -o -name 'tmpdb*' ')' -print0
+ xargs -0 rm -rf
[py27] $ /bin/bash -xe /tmp/hudson573610335803304580.sh
+ PATH=/usr/lib/postgresql/9.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
+ tox --recreate
GLOB sdist-make: /var/lib/jenkins/jobs/cubes-eac/workspace/TOXENV/py27/setup.py
py27 create: /var/lib/jenkins/jobs/cubes-eac/workspace/TOXENV/py27/.tox/py27
py27 installdeps: pytest, mock
py27 inst: /var/lib/jenkins/jobs/cubes-eac/workspace/TOXENV/py27/.tox/dist/cubicweb-eac-0.1.0.zip
py27 installed: You are using pip version 7.1.2, however version 8.1.2 is available.,You should consider upgrading via the 'pip install --upgrade pip' command.,beautifulsoup4==4.3.2,boto==2.34.0,bzr-etckeeper==0.0.0,cffi==0.8.6,characteristic==0.1.0,chardet==2.3.0,Cheetah==2.4.4,cloud-init==0.7.6,colorama==0.3.2,configobj==5.0.6,coverage==3.7.1,croniter==0.3.4,cryptography==0.6.1,cubicweb==3.23.1,cubicweb-addressbook==1.9.1,cubicweb-eac==0.1.0,cubicweb-geocoding==0.2.1,cubicweb-prov==0.2.0,cubicweb-skos==0.12.0,cwclientlib==0.4.1,Cython==0.21.1,decorator==3.4.0,docutils==0.12,ecdsa==0.11,euca2ools==3.1.0,GDAL==1.10.1,hg-evolve==5.4.1,html2text==2016.5.29,html5lib==0.999,isodate==0.5.0,Jinja2==2.7.3,joblib==0.8.3,jsonpatch==1.3,jsonpointer==1.0,linecache2==1.0.0,logilab-common==1.2.2,logilab-constraint==0.6.0,logilab-database==1.15.0,logilab-mtconverter==0.9.0,lxml==3.4.0,M2Crypto==0.21.1,Mako==1.0.0,Markdown==2.5.1,MarkupSafe==0.23,matplotlib==1.4.2,mccabe==0.2.1,mercurial==3.8.3,mock==1.0.1,msgpack-python==0.4.2,nose==1.3.4,numexpr==2.4,numpy==1.8.2,oauth==1.0.1,openpyxl==1.7.0,pandas==0.14.1,paramiko==1.15.1,passlib==1.6.5,pep8==1.5.7,Pillow==2.6.1,pluggy==0.3.1,ply==3.4,prettytable==0.7.2,psycopg2==2.5.4,py==1.4.31,pyasn1==0.1.7,pyasn1-modules==0.0.5,pycparser==2.10,pycrypto==2.6.1,Pygments==2.0.1,pyinotify==0.9.4,pyOpenSSL==0.14,pyparsing==2.0.3,pyserial==2.6,pysqlite==2.6.3,pytest==3.0.2,python-apt==0.9.3.12,python-augeas==0.4.1,python-dateutil==2.2,python-jenkins==0.2.1,python-ldap==2.4.10,python-yapps==2.1.1,python3-ldap==0.9.4.2,pytz==2012rc0,PyYAML==3.11,pyzmq==14.4.0,rdflib==4.1.2,requestbuilder==0.2.3,requests==2.4.3,roman==2.0.0,rql==0.34.0,rubber==1.1,salt==2015.5.3,scikit-learn==0.14.1,scipy==0.14.0,service-identity==1.0.0,Shapely==1.4.3,simplejson==3.6.5,SimpleTAL==4.1,six==1.8.0,SPARQLWrapper==1.6.0,Sphinx==1.2.3,statsmodels==0.4.2,tables==3.1.1,tox==2.3.1,traceback2==1.4.0,unittest2==1.1.0,urllib3==1.9.1,virtualenv==13.1.2,wheel==0.24.0,xlrd==0.9.2,xlwt==0.7.5,yams==0.44.0,Yapps==2.2.0,Yapps2==2.2.0
py27 runtests: PYTHONHASHSEED='1846499145'
py27 runtests: commands[0] | /var/lib/jenkins/jobs/cubes-eac/workspace/TOXENV/py27/.tox/py27/bin/python -m pytest test
============================= test session starts ==============================
platform linux2 -- Python 2.7.9, pytest-3.0.2, py-1.4.31, pluggy-0.3.1
rootdir: /var/lib/jenkins/jobs/cubes-eac/workspace/TOXENV/py27, inifile:
collected 28 items

test/test_dataimport.py ....FF..F
test/test_entities.py ........
test/test_schema.py ...
test/test_views.py ....F...

=================================== FAILURES ===================================
____________________ EACDataImportTC.test_FRAD033_EAC_00001 ____________________

self = <test_dataimport.EACDataImportTC testMethod=test_FRAD033_EAC_00001>

def test_FRAD033_EAC_00001(self):
fpath = self.datapath('FRAD033_EAC_00001_simplified.xml')
with self.admin_access.repo_cnx() as cnx:
# create a skos concept to ensure it's used instead of a ExternalUri
scheme = cnx.create_entity('ConceptScheme')
scheme.add_concept(u'environnement',
cwuri=u'http://data.culture.fr/thesaurus/page/ark:/67717/T1-1074')
cnx.commit()
> created, updated = eac_import(cnx, fpath)

test/test_dataimport.py:444:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/test_dataimport.py:58: in eac_import
raise_on_error=True)
.tox/py27/local/lib/python2.7/site-packages/cubicweb/server/session.py:188: in check_open
return func(cnx, *args, **kwargs)
.tox/py27/local/lib/python2.7/site-packages/cubicweb/server/session.py:939: in call_service
return service.call(**kwargs)
.tox/py27/share/cubicweb/cubes/eac/sobjects.py:41: in call
stream, import_log, store, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <cubes.eac.sobjects.EACImportService object at 0x7f1b21f41890>
stream = '/var/lib/jenkins/jobs/cubes-eac/workspace/TOXENV/py27/test/data/FRAD033_EAC_00001_simplified.xml'
import_log = <cubicweb.dataimport.importer.SimpleImportLog object at 0x7f1b21f41750>
store = <cubicweb.dataimport.stores.RQLObjectStore object at 0x7f1b21f41090>
kwargs = {'raise_on_error': True}
source = <system NativeSQLSource source 1 @0x7f1b2277fa90>
extid2eid = {'/dev/null': 1594, '1504cf9b-92b7-4bf9-92f7-b0b6b0286e2d': 1602, '15994bb4-b083-4514-a392-ec27d0cc6349': 1587, '1bf3a7a3-9ed0-4e98-a043-f3bfe5036c08': 1600, ...}
importer = <cubicweb.dataimport.importer.ExtEntitiesImporter object at 0x7f1b21ef1490>
generator = <cubes.eac.dataimport.EACCPFImporter object at 0x7f1b21ee6fd0>
extentities = <generator object handle_agent_kind at 0x7f1b21b58e10>

def import_eac_stream(self, stream, import_log, store, **kwargs):
source = self._cw.repo.system_source
# only consider the system source for EAC related entity types
extid2eid = cwuri2eid(self._cw, dataimport.ETYPES_ORDER_HINT, source_eid=source.eid)
# though concepts may come from any source
extid2eid.update(cwuri2eid(self._cw, ('Concept',)))
importer = ExtEntitiesImporter(self._cw.vreg.schema, store,
import_log=import_log,
extid2eid=extid2eid,
etypes_order_hint=dataimport.ETYPES_ORDER_HINT,
**kwargs)
generator = self.external_entities_generator(stream, import_log)
extentities = self.external_entities_stream(generator.external_entities(), extid2eid)
importer.import_entities(extentities)
> if extimporter.record is not None:
E NameError: global name 'extimporter' is not defined

.tox/py27/share/cubicweb/cubes/eac/sobjects.py:77: NameError
----------------------------- Captured stdout call -----------------------------
-> creating tables
-> inserting default user and default groups.
-> storing the schema in the database
-> database for instance data initialized.
____________________ EACDataImportTC.test_multiple_imports _____________________

self = <test_dataimport.EACDataImportTC testMethod=test_multiple_imports>

def test_multiple_imports(self):
def count_entity(cnx, etype):
return cnx.execute('Any COUNT(X) WHERE X is %s' % etype)[0][0]

with self.admin_access.repo_cnx() as cnx:
nb_records_before = count_entity(cnx, 'AuthorityRecord')
nb_agents_before = count_entity(cnx, 'Agent')
for fname in ('FRAD033_EAC_00001.xml', 'FRAD033_EAC_00003.xml',
'FRAD033_EAC_00071.xml'):
fpath = self.datapath(fname)
> created, updated = eac_import(cnx, fpath)

test/test_dataimport.py:571:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/test_dataimport.py:58: in eac_import
raise_on_error=True)
.tox/py27/local/lib/python2.7/site-packages/cubicweb/server/session.py:188: in check_open
return func(cnx, *args, **kwargs)
.tox/py27/local/lib/python2.7/site-packages/cubicweb/server/session.py:939: in call_service
return service.call(**kwargs)
.tox/py27/share/cubicweb/cubes/eac/sobjects.py:41: in call
stream, import_log, store, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <cubes.eac.sobjects.EACImportService object at 0x7f1b2204c5d0>
stream = '/var/lib/jenkins/jobs/cubes-eac/workspace/TOXENV/py27/test/data/FRAD033_EAC_00001.xml'
import_log = <cubicweb.dataimport.importer.SimpleImportLog object at 0x7f1b2204c8d0>
store = <cubicweb.dataimport.stores.RQLObjectStore object at 0x7f1b2203f5d0>
kwargs = {'raise_on_error': True}
source = <system NativeSQLSource source 1 @0x7f1b2277fa90>
extid2eid = {'0d18fae5-ac54-47e5-a60d-ecf635ce2d94': 1604, '25b69b0c-6f24-4495-9836-e1d80a526284': 1608, '3b86d75f-c5fe-48d8-9921-ebca21ebcc42': 1598, '4c1032bd-9c52-49eb-97ae-18585b7ae528': 1582, ...}
importer = <cubicweb.dataimport.importer.ExtEntitiesImporter object at 0x7f1b21f72310>
generator = <cubes.eac.dataimport.EACCPFImporter object at 0x7f1b21fdd750>
extentities = <generator object handle_agent_kind at 0x7f1b21da1730>

def import_eac_stream(self, stream, import_log, store, **kwargs):
source = self._cw.repo.system_source
# only consider the system source for EAC related entity types
extid2eid = cwuri2eid(self._cw, dataimport.ETYPES_ORDER_HINT, source_eid=source.eid)
# though concepts may come from any source
extid2eid.update(cwuri2eid(self._cw, ('Concept',)))
importer = ExtEntitiesImporter(self._cw.vreg.schema, store,
import_log=import_log,
extid2eid=extid2eid,
etypes_order_hint=dataimport.ETYPES_ORDER_HINT,
**kwargs)
generator = self.external_entities_generator(stream, import_log)
extentities = self.external_entities_stream(generator.external_entities(), extid2eid)
importer.import_entities(extentities)
> if extimporter.record is not None:
E NameError: global name 'extimporter' is not defined

.tox/py27/share/cubicweb/cubes/eac/sobjects.py:77: NameError
______________________ EACDataImportTC.test_unknown_kind _______________________

self = <test_dataimport.EACDataImportTC testMethod=test_unknown_kind>

def test_unknown_kind(self):
with self.admin_access.repo_cnx() as cnx:
> eac_import(cnx, self.datapath('custom_kind.xml'))

test/test_dataimport.py:579:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/test_dataimport.py:58: in eac_import
raise_on_error=True)
.tox/py27/local/lib/python2.7/site-packages/cubicweb/server/session.py:188: in check_open
return func(cnx, *args, **kwargs)
.tox/py27/local/lib/python2.7/site-packages/cubicweb/server/session.py:939: in call_service
return service.call(**kwargs)
.tox/py27/share/cubicweb/cubes/eac/sobjects.py:41: in call
stream, import_log, store, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <cubes.eac.sobjects.EACImportService object at 0x7f1b220ef0d0>
stream = '/var/lib/jenkins/jobs/cubes-eac/workspace/TOXENV/py27/test/data/custom_kind.xml'
import_log = <cubicweb.dataimport.importer.SimpleImportLog object at 0x7f1b220efa10>
store = <cubicweb.dataimport.stores.RQLObjectStore object at 0x7f1b220eff50>
kwargs = {'raise_on_error': True}
source = <system NativeSQLSource source 1 @0x7f1b2277fa90>
extid2eid = {'FRAD033_EAC_00001': 1581, 'agentkind/a custom kind': 1580, 'agentkind/authority': 1577, 'agentkind/family': 1578, ...}
importer = <cubicweb.dataimport.importer.ExtEntitiesImporter object at 0x7f1b220b4b50>
generator = <cubes.eac.dataimport.EACCPFImporter object at 0x7f1b220b47d0>
extentities = <generator object handle_agent_kind at 0x7f1b22d84e10>

def import_eac_stream(self, stream, import_log, store, **kwargs):
source = self._cw.repo.system_source
# only consider the system source for EAC related entity types
extid2eid = cwuri2eid(self._cw, dataimport.ETYPES_ORDER_HINT, source_eid=source.eid)
# though concepts may come from any source
extid2eid.update(cwuri2eid(self._cw, ('Concept',)))
importer = ExtEntitiesImporter(self._cw.vreg.schema, store,
import_log=import_log,
extid2eid=extid2eid,
etypes_order_hint=dataimport.ETYPES_ORDER_HINT,
**kwargs)
generator = self.external_entities_generator(stream, import_log)
extentities = self.external_entities_stream(generator.external_entities(), extid2eid)
importer.import_entities(extentities)
> if extimporter.record is not None:
E NameError: global name 'extimporter' is not defined

.tox/py27/share/cubicweb/cubes/eac/sobjects.py:77: NameError
__________________________ FuncViewsTC.test_import_ok __________________________

self = <test_views.FuncViewsTC testMethod=test_import_ok>

def test_import_ok(self):
regid = 'eac.import'
fname = 'FRAD033_EAC_00001_simplified.xml'
with self.admin_access.web_request() as req:
# simply test the form properly render and is well formed
self.view(regid, req=req, template=None)
fields = {'file': (fname, open(self.datapath(fname)))}
req.form = self.fake_form(regid, fields)
# now actually test the import
req.view(regid)
> req.find('Agent', name=u'Delphine Jamet').one()

test/test_views.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <empty resultset for 'Any X WHERE X is Agent, X name %(name)s'>, col = 0

def one(self, col=0):
"""Retrieve exactly one entity from the query.

If the result set is empty, raises :exc:`NoResultError`.
If the result set has more than one row, raises
:exc:`MultipleResultsError`.

:type col: int
:param col: The column localising the entity in the unique row

:return: the partially initialized `Entity` instance
"""
if len(self) == 1:
return self.get_entity(0, col)
elif len(self) == 0:
> raise NoResultError("No row was found for one()")
E NoResultError: No row was found for one()

.tox/py27/local/lib/python2.7/site-packages/cubicweb/rset.py:458: NoResultError
===================== 4 failed, 24 passed in 27.39 seconds =====================
ERROR: InvocationError: '/var/lib/jenkins/jobs/cubes-eac/workspace/TOXENV/py27/.tox/py27/bin/python -m pytest test'
___________________________________ summary ____________________________________
ERROR: py27: commands failed
Build step 'Execute shell' marked build as failure
[PostBuildScript] - Execution post build scripts.
[py27] $ /bin/bash -xe /tmp/hudson9086643142153697734.sh
+ /var/lib/jenkins/scripts/notify_forge_apycot.py cwo cubicweb-eac cd1fea4957e1 http://jenkins.logilab.fr/job/cubes-eac/TOXENV=py27/7/ --status failure
<br/>

log from execution
download