Advertisement
Guest User

Untitled

a guest
Jul 1st, 2019
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.07 KB | None | 0 0
  1. alexandrufazakas@ct-lt-892:~/Documents/buildstream$ tox -- --no-cov tests/frontend/show.py::test_exceed_max_recursion_depth
  2. /usr/lib/python3.5/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
  3. warnings.warn(msg)
  4. py35 develop-inst-noop: /home/alexandrufazakas/Documents/buildstream
  5. py35 installed: apipkg==1.5,arpy==1.1.1,astroid==2.1.0,atomicwrites==1.3.0,attrs==18.2.0,-e git+https://gitlab.com/AlexFazakas/buildstream@8a1986936bdff60f3ca2f0ab7d705b87518eb51c#egg=BuildStream,Click==7.0,coverage==4.4,Cython==0.29.7,execnet==1.5.0,grpcio==1.17.1,isort==4.3.9,Jinja2==2.10,lazy-object-proxy==1.3.1,MarkupSafe==1.1.0,mccabe==0.6.1,more-itertools==6.0.0,pathlib2==2.3.3,pluggy==0.9.0,pluginbase==0.7,protobuf==3.6.1,psutil==5.4.8,py==1.8.0,pycodestyle==2.5.0,pyftpdlib==1.5.4,pylint==2.2.2,pyroaring==0.2.6,pytest==4.3.0,pytest-cov==2.6.1,pytest-datafiles==2.0,pytest-env==0.6.2,pytest-forked==1.0.2,pytest-timeout==1.3.3,pytest-xdist==1.26.1,ruamel.yaml==0.15.51,six==1.12.0,typed-ast==1.3.1,ujson==1.35,wrapt==1.11.1
  6. py35 run-test-pre: PYTHONHASHSEED='2133998693'
  7. py35 run-test: commands[0] | pytest --basetemp /home/alexandrufazakas/Documents/buildstream/.tox/py35/tmp --cov=buildstream --cov-config .coveragerc --no-cov tests/frontend/show.py::test_exceed_max_recursion_depth
  8. ========================================== test session starts ==========================================
  9. platform linux -- Python 3.5.3, pytest-4.3.0, py-1.8.0, pluggy-0.9.0 -- /home/alexandrufazakas/Documents/buildstream/.tox/py35/bin/python
  10. cachedir: .tox/py35/.pytest_cache
  11. rootdir: /home/alexandrufazakas/Documents/buildstream, inifile: setup.cfg
  12. plugins: xdist-1.26.1, timeout-1.3.3, forked-1.0.2, env-0.6.2, datafiles-2.0, cov-2.6.1
  13. collected 3 items
  14.  
  15. tests/frontend/show.py::test_exceed_max_recursion_depth[100] FAILED [ 33%]
  16. tests/frontend/show.py::test_exceed_max_recursion_depth[500] FAILED [ 66%]
  17. tests/frontend/show.py::test_exceed_max_recursion_depth[1200] FAILED [100%]
  18.  
  19. =============================================== FAILURES ================================================
  20. _________________________________ test_exceed_max_recursion_depth[100] __________________________________
  21.  
  22. cli = <buildstream.testing.runcli.Cli object at 0x7fceabbf6438>
  23. tmpdir = local('/home/alexandrufazakas/Documents/buildstream/.tox/py35/tmp/test_exceed_max_recursion_dept0')
  24. dependency_depth = 100
  25.  
  26. @pytest.mark.parametrize("dependency_depth", [100, 500, 1200])
  27. def test_exceed_max_recursion_depth(cli, tmpdir, dependency_depth):
  28. project_name = "recursion-test"
  29. path = str(tmpdir)
  30. project_path = os.path.join(path, project_name)
  31.  
  32. def setup_test():
  33. """
  34. Creates a bst project with dependencydepth + 1 elements, each of which
  35. depends of the previous element to be created. Each element created
  36. is of type import and has an empty source file.
  37. """
  38. os.mkdir(project_path)
  39.  
  40. result = cli.run(project=project_path, silent=True,
  41. args=['init', '--project-name', project_name])
  42. result.assert_success()
  43.  
  44. sourcefiles_path = os.path.join(project_path, "files")
  45. os.mkdir(sourcefiles_path)
  46.  
  47. element_path = os.path.join(project_path, "elements")
  48. for i in range(0, dependency_depth + 1):
  49. element = {
  50. 'kind': 'import',
  51. 'sources': [{'kind': 'local',
  52. 'path': 'files/source{}'.format(str(i))}],
  53. 'depends': ['element{}.bst'.format(str(i - 1))]
  54. }
  55. if i == 0:
  56. del element['depends']
  57. _yaml.dump(element, os.path.join(element_path, "element{}.bst".format(str(i))))
  58.  
  59. source = os.path.join(sourcefiles_path, "source{}".format(str(i)))
  60. open(source, 'x').close()
  61. assert os.path.exists(source)
  62.  
  63. > setup_test()
  64.  
  65. tests/frontend/show.py:429:
  66. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  67. tests/frontend/show.py:408: in setup_test
  68. result.assert_success()
  69. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  70.  
  71. self = <buildstream.testing.runcli.Result object at 0x7fceab7f9828>, fail_message = ''
  72.  
  73. def assert_success(self, fail_message=''):
  74. > assert self.exit_code == 0, fail_message
  75. E AssertionError
  76.  
  77. src/buildstream/testing/runcli.py:115: AssertionError
  78. ----------------------------------------- Captured stdout call ------------------------------------------
  79. BuildStream exited with code -1 for invocation:
  80. bst --no-colors --no-verbose --config /home/alexandrufazakas/Documents/buildstream/.tox/py35/tmp/test_exceed_max_recursion_dept0/cache/buildstream.conf --directory /home/alexandrufazakas/Documents/buildstream/.tox/py35/tmp/test_exceed_max_recursion_dept0/recursion-test init --project-name recursion-test
  81. ----------------------------------------- Captured stderr call ------------------------------------------
  82. Traceback (most recent call last):
  83. File "/home/alexandrufazakas/Documents/buildstream/src/buildstream/testing/runcli.py", line 394, in _invoke
  84. cli_object.main(args=args or (), prog_name=cli_object.name)
  85. File "/home/alexandrufazakas/Documents/buildstream/src/buildstream/_frontend/cli.py", line 195, in override_main
  86. standalone_mode=standalone_mode, **extra)
  87. File "/home/alexandrufazakas/Documents/buildstream/.tox/py35/lib/python3.5/site-packages/click/core.py", line 717, in main
  88. rv = self.invoke(ctx)
  89. File "/home/alexandrufazakas/Documents/buildstream/.tox/py35/lib/python3.5/site-packages/click/core.py", line 1137, in invoke
  90. return _process_result(sub_ctx.command.invoke(sub_ctx))
  91. File "/home/alexandrufazakas/Documents/buildstream/.tox/py35/lib/python3.5/site-packages/click/core.py", line 956, in invoke
  92. return ctx.invoke(self.callback, **ctx.params)
  93. File "/home/alexandrufazakas/Documents/buildstream/.tox/py35/lib/python3.5/site-packages/click/core.py", line 555, in invoke
  94. return callback(*args, **kwargs)
  95. File "/home/alexandrufazakas/Documents/buildstream/.tox/py35/lib/python3.5/site-packages/click/decorators.py", line 27, in new_func
  96. return f(get_current_context().obj, *args, **kwargs)
  97. File "/home/alexandrufazakas/Documents/buildstream/src/buildstream/_frontend/cli.py", line 326, in init
  98. app.init_project(project_name, format_version, element_path, force, target_directory)
  99. File "/home/alexandrufazakas/Documents/buildstream/src/buildstream/_frontend/app.py", line 324, in init_project
  100. detail_dir = os.path.join(os.path.abspath(self._main_options['directory']), target_directory)
  101. File "/home/alexandrufazakas/Documents/buildstream/.tox/py35/lib/python3.5/posixpath.py", line 89, in join
  102. genericpath._check_arg_types('join', a, *p)
  103. File "/home/alexandrufazakas/Documents/buildstream/.tox/py35/lib/python3.5/genericpath.py", line 143, in _check_arg_types
  104. (funcname, s.__class__.__name__)) from None
  105. TypeError: join() argument must be str or bytes, not 'NoneType'
  106. _________________________________ test_exceed_max_recursion_depth[500] __________________________________
  107.  
  108. cli = <buildstream.testing.runcli.Cli object at 0x7fceab7b5390>
  109. tmpdir = local('/home/alexandrufazakas/Documents/buildstream/.tox/py35/tmp/test_exceed_max_recursion_dept1')
  110. dependency_depth = 500
  111.  
  112. @pytest.mark.parametrize("dependency_depth", [100, 500, 1200])
  113. def test_exceed_max_recursion_depth(cli, tmpdir, dependency_depth):
  114. project_name = "recursion-test"
  115. path = str(tmpdir)
  116. project_path = os.path.join(path, project_name)
  117.  
  118. def setup_test():
  119. """
  120. Creates a bst project with dependencydepth + 1 elements, each of which
  121. depends of the previous element to be created. Each element created
  122. is of type import and has an empty source file.
  123. """
  124. os.mkdir(project_path)
  125.  
  126. result = cli.run(project=project_path, silent=True,
  127. args=['init', '--project-name', project_name])
  128. result.assert_success()
  129.  
  130. sourcefiles_path = os.path.join(project_path, "files")
  131. os.mkdir(sourcefiles_path)
  132.  
  133. element_path = os.path.join(project_path, "elements")
  134. for i in range(0, dependency_depth + 1):
  135. element = {
  136. 'kind': 'import',
  137. 'sources': [{'kind': 'local',
  138. 'path': 'files/source{}'.format(str(i))}],
  139. 'depends': ['element{}.bst'.format(str(i - 1))]
  140. }
  141. if i == 0:
  142. del element['depends']
  143. _yaml.dump(element, os.path.join(element_path, "element{}.bst".format(str(i))))
  144.  
  145. source = os.path.join(sourcefiles_path, "source{}".format(str(i)))
  146. open(source, 'x').close()
  147. assert os.path.exists(source)
  148.  
  149. > setup_test()
  150.  
  151. tests/frontend/show.py:429:
  152. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  153. tests/frontend/show.py:408: in setup_test
  154. result.assert_success()
  155. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  156.  
  157. self = <buildstream.testing.runcli.Result object at 0x7fceab7b5d30>, fail_message = ''
  158.  
  159. def assert_success(self, fail_message=''):
  160. > assert self.exit_code == 0, fail_message
  161. E AssertionError
  162.  
  163. src/buildstream/testing/runcli.py:115: AssertionError
  164. ----------------------------------------- Captured stdout call ------------------------------------------
  165. BuildStream exited with code -1 for invocation:
  166. bst --no-colors --no-verbose --config /home/alexandrufazakas/Documents/buildstream/.tox/py35/tmp/test_exceed_max_recursion_dept1/cache/buildstream.conf --directory /home/alexandrufazakas/Documents/buildstream/.tox/py35/tmp/test_exceed_max_recursion_dept1/recursion-test init --project-name recursion-test
  167. ----------------------------------------- Captured stderr call ------------------------------------------
  168. Traceback (most recent call last):
  169. File "/home/alexandrufazakas/Documents/buildstream/src/buildstream/testing/runcli.py", line 394, in _invoke
  170. cli_object.main(args=args or (), prog_name=cli_object.name)
  171. File "/home/alexandrufazakas/Documents/buildstream/src/buildstream/_frontend/cli.py", line 195, in override_main
  172. standalone_mode=standalone_mode, **extra)
  173. File "/home/alexandrufazakas/Documents/buildstream/.tox/py35/lib/python3.5/site-packages/click/core.py", line 717, in main
  174. rv = self.invoke(ctx)
  175. File "/home/alexandrufazakas/Documents/buildstream/.tox/py35/lib/python3.5/site-packages/click/core.py", line 1137, in invoke
  176. return _process_result(sub_ctx.command.invoke(sub_ctx))
  177. File "/home/alexandrufazakas/Documents/buildstream/.tox/py35/lib/python3.5/site-packages/click/core.py", line 956, in invoke
  178. return ctx.invoke(self.callback, **ctx.params)
  179. File "/home/alexandrufazakas/Documents/buildstream/.tox/py35/lib/python3.5/site-packages/click/core.py", line 555, in invoke
  180. return callback(*args, **kwargs)
  181. File "/home/alexandrufazakas/Documents/buildstream/.tox/py35/lib/python3.5/site-packages/click/decorators.py", line 27, in new_func
  182. return f(get_current_context().obj, *args, **kwargs)
  183. File "/home/alexandrufazakas/Documents/buildstream/src/buildstream/_frontend/cli.py", line 326, in init
  184. app.init_project(project_name, format_version, element_path, force, target_directory)
  185. File "/home/alexandrufazakas/Documents/buildstream/src/buildstream/_frontend/app.py", line 324, in init_project
  186. detail_dir = os.path.join(os.path.abspath(self._main_options['directory']), target_directory)
  187. File "/home/alexandrufazakas/Documents/buildstream/.tox/py35/lib/python3.5/posixpath.py", line 89, in join
  188. genericpath._check_arg_types('join', a, *p)
  189. File "/home/alexandrufazakas/Documents/buildstream/.tox/py35/lib/python3.5/genericpath.py", line 143, in _check_arg_types
  190. (funcname, s.__class__.__name__)) from None
  191. TypeError: join() argument must be str or bytes, not 'NoneType'
  192. _________________________________ test_exceed_max_recursion_depth[1200] _________________________________
  193.  
  194. cli = <buildstream.testing.runcli.Cli object at 0x7fceab7855f8>
  195. tmpdir = local('/home/alexandrufazakas/Documents/buildstream/.tox/py35/tmp/test_exceed_max_recursion_dept2')
  196. dependency_depth = 1200
  197.  
  198. @pytest.mark.parametrize("dependency_depth", [100, 500, 1200])
  199. def test_exceed_max_recursion_depth(cli, tmpdir, dependency_depth):
  200. project_name = "recursion-test"
  201. path = str(tmpdir)
  202. project_path = os.path.join(path, project_name)
  203.  
  204. def setup_test():
  205. """
  206. Creates a bst project with dependencydepth + 1 elements, each of which
  207. depends of the previous element to be created. Each element created
  208. is of type import and has an empty source file.
  209. """
  210. os.mkdir(project_path)
  211.  
  212. result = cli.run(project=project_path, silent=True,
  213. args=['init', '--project-name', project_name])
  214. result.assert_success()
  215.  
  216. sourcefiles_path = os.path.join(project_path, "files")
  217. os.mkdir(sourcefiles_path)
  218.  
  219. element_path = os.path.join(project_path, "elements")
  220. for i in range(0, dependency_depth + 1):
  221. element = {
  222. 'kind': 'import',
  223. 'sources': [{'kind': 'local',
  224. 'path': 'files/source{}'.format(str(i))}],
  225. 'depends': ['element{}.bst'.format(str(i - 1))]
  226. }
  227. if i == 0:
  228. del element['depends']
  229. _yaml.dump(element, os.path.join(element_path, "element{}.bst".format(str(i))))
  230.  
  231. source = os.path.join(sourcefiles_path, "source{}".format(str(i)))
  232. open(source, 'x').close()
  233. assert os.path.exists(source)
  234.  
  235. > setup_test()
  236.  
  237. tests/frontend/show.py:429:
  238. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  239. tests/frontend/show.py:408: in setup_test
  240. result.assert_success()
  241. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  242.  
  243. self = <buildstream.testing.runcli.Result object at 0x7fceab785400>, fail_message = ''
  244.  
  245. def assert_success(self, fail_message=''):
  246. > assert self.exit_code == 0, fail_message
  247. E AssertionError
  248.  
  249. src/buildstream/testing/runcli.py:115: AssertionError
  250. ----------------------------------------- Captured stdout call ------------------------------------------
  251. BuildStream exited with code -1 for invocation:
  252. bst --no-colors --no-verbose --config /home/alexandrufazakas/Documents/buildstream/.tox/py35/tmp/test_exceed_max_recursion_dept2/cache/buildstream.conf --directory /home/alexandrufazakas/Documents/buildstream/.tox/py35/tmp/test_exceed_max_recursion_dept2/recursion-test init --project-name recursion-test
  253. ----------------------------------------- Captured stderr call ------------------------------------------
  254. Traceback (most recent call last):
  255. File "/home/alexandrufazakas/Documents/buildstream/src/buildstream/testing/runcli.py", line 394, in _invoke
  256. cli_object.main(args=args or (), prog_name=cli_object.name)
  257. File "/home/alexandrufazakas/Documents/buildstream/src/buildstream/_frontend/cli.py", line 195, in override_main
  258. standalone_mode=standalone_mode, **extra)
  259. File "/home/alexandrufazakas/Documents/buildstream/.tox/py35/lib/python3.5/site-packages/click/core.py", line 717, in main
  260. rv = self.invoke(ctx)
  261. File "/home/alexandrufazakas/Documents/buildstream/.tox/py35/lib/python3.5/site-packages/click/core.py", line 1137, in invoke
  262. return _process_result(sub_ctx.command.invoke(sub_ctx))
  263. File "/home/alexandrufazakas/Documents/buildstream/.tox/py35/lib/python3.5/site-packages/click/core.py", line 956, in invoke
  264. return ctx.invoke(self.callback, **ctx.params)
  265. File "/home/alexandrufazakas/Documents/buildstream/.tox/py35/lib/python3.5/site-packages/click/core.py", line 555, in invoke
  266. return callback(*args, **kwargs)
  267. File "/home/alexandrufazakas/Documents/buildstream/.tox/py35/lib/python3.5/site-packages/click/decorators.py", line 27, in new_func
  268. return f(get_current_context().obj, *args, **kwargs)
  269. File "/home/alexandrufazakas/Documents/buildstream/src/buildstream/_frontend/cli.py", line 326, in init
  270. app.init_project(project_name, format_version, element_path, force, target_directory)
  271. File "/home/alexandrufazakas/Documents/buildstream/src/buildstream/_frontend/app.py", line 324, in init_project
  272. detail_dir = os.path.join(os.path.abspath(self._main_options['directory']), target_directory)
  273. File "/home/alexandrufazakas/Documents/buildstream/.tox/py35/lib/python3.5/posixpath.py", line 89, in join
  274. genericpath._check_arg_types('join', a, *p)
  275. File "/home/alexandrufazakas/Documents/buildstream/.tox/py35/lib/python3.5/genericpath.py", line 143, in _check_arg_types
  276. (funcname, s.__class__.__name__)) from None
  277. TypeError: join() argument must be str or bytes, not 'NoneType'
  278. WARNING: Coverage disabled via --no-cov switch!
  279. ======================================= slowest 20 test durations =======================================
  280. 0.04s call tests/frontend/show.py::test_exceed_max_recursion_depth[100]
  281.  
  282. (0.00 durations hidden. Use -vv to show these durations.)
  283. =========================================== warnings summary ============================================
  284. .tox/py35/lib/python3.5/site-packages/pytest_cov/plugin.py:253
  285. /home/alexandrufazakas/Documents/buildstream/.tox/py35/lib/python3.5/site-packages/pytest_cov/plugin.py:253: PytestWarning: Coverage disabled via --no-cov switch!
  286. warnings.warn(pytest.PytestWarning(message))
  287.  
  288. -- Docs: https://docs.pytest.org/en/latest/warnings.html
  289. ================================= 3 failed, 1 warnings in 0.22 seconds ==================================
  290. ERROR: InvocationError for command /home/alexandrufazakas/Documents/buildstream/.tox/py35/bin/pytest --basetemp .tox/py35/tmp --cov=buildstream --cov-config .coveragerc --no-cov tests/frontend/show.py::test_exceed_max_recursion_depth (exited with code 1)
  291. py36 create: /home/alexandrufazakas/Documents/buildstream/.tox/py36
  292. SKIPPED: InterpreterNotFound: python3.6
  293. py37 create: /home/alexandrufazakas/Documents/buildstream/.tox/py37
  294. SKIPPED: InterpreterNotFound: python3.7
  295. ________________________________________________ summary ________________________________________________
  296. ERROR: py35: commands failed
  297. SKIPPED: py36: InterpreterNotFound: python3.6
  298. SKIPPED: py37: InterpreterNotFound: python3.7
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement