IRC logs for #buildstream for Monday, 2017-12-18

*** bochecha has quit IRC00:08
*** valentind has joined #buildstream08:17
*** bochecha has joined #buildstream09:09
*** bethw has joined #buildstream09:30
*** tiago has quit IRC09:42
*** tiago has joined #buildstream09:46
*** noisecell has joined #buildstream09:56
*** ssam2 has joined #buildstream10:17
*** tiagogomes has joined #buildstream10:59
*** tiago has quit IRC10:59
*** valentind has quit IRC12:22
*** bethw has quit IRC13:10
*** ssam2 has quit IRC13:46
*** mcatanzaro has joined #buildstream13:57
*** bethw has joined #buildstream14:05
*** bethw has quit IRC14:08
*** noah has joined #buildstream14:10
*** ssam2 has joined #buildstream14:19
*** noah has quit IRC14:21
*** bethw has joined #buildstream15:06
*** semanticdesign_ has joined #buildstream15:08
*** bethw has quit IRC15:10
*** bethw has joined #buildstream15:46
*** bethw has quit IRC16:12
*** noisecell has quit IRC16:50
* tlater can't get pytest to capture stdout to read command output17:02
ssam2you're using pytest to run a command ?17:04
tlaterYes, part of switching to integration tests17:05
ssam2why not use subprocess.check_call() ?17:07
tlaterI'd like to integrate with the testutils we currently have17:08
ssam2hmm, i guess then you only get the output at the end17:08
tlaterMain problem is that we switched over to using pytest internals17:08
ssam2that makes sense; but as far as I know those don't involve using pytest to call external programs ? or do they ?17:08
tlaterThey use click to call buildstream17:08
ssam2ah, right17:09
tlaterWhich then can be used to call `bst shell`17:09
ssam2so the issue is not with pytest, but with click.testing.CliRunner ?17:09
tlaterI'm not sure at this point17:09
ssam2ok17:09
tlaterBecause we individually capture stdout/stderr produced by that17:09
tlaterBecause it in turn doesn't support splitting those17:09
ssam2yeah17:09
tlaterSomehow the stdout gets lost, while stderr is preserved17:10
tlaterAnd pytest itself still finds the stdout that our wrapper should find17:10
ssam2ugh17:10
ssam2could be to do with pytest's stdout capturing17:10
ssam2try with `py.test --capture=no` ?17:10
ssam2that's not really a solution, but it if that works, we know what the problem is caused by ...17:11
tlaterDoesn't seem to be it17:11
tlaterStill the same symptoms17:12
ssam2ok17:12
ssam2i am suspicious of CliRunner to be honest, it looks pretty hacky17:12
* tlater is a bit lost, has even looked through the pytest source code for this and can't find anything that would look like it does this17:13
tlaterIt's possible that the CliRunner stuff redirects everything to and captures stdout or something, I suppose17:13
tlaterHm, I wonder how Cli.get_element_config works then, it should need stdout17:15
*** bethw has joined #buildstream17:31
*** bethw has quit IRC17:34
*** tiagogomes has quit IRC17:52
* tlater is very confused, the output seems to be correctly redirected in pytest for `bst show`, but not for `bst shell`17:54
ssam2could be to do with forking17:55
ssam2CliRunner itself doesn't fork a new process, it hacks up the actual test process into running the click main entry point17:56
ssam2after modifying sys.stdout and sys.stderr so it can capture them17:56
ssam2but that presumably doesn't modify the processes actual file descriptors17:56
ssam2so if the main process forks off a bwrap instance, i guess it won't capture the output of that17:57
tlaterYeah, we'd probably end up with a new sys.stdout17:57
ssam2well, for bwrap there's no such thing as sys.stdout17:57
ssam2just fd #217:57
tlaterOn the other hand, why does pytest still capture that output then?17:57
ssam2perhaps it overrides the actual file descriptors17:57
tlaterWe are using the same code for that now17:58
ssam2i don't understand what you mean by that17:58
tlaterWe import the pytest internals to capture stdout/stderr separately17:59
tlaterWhich means that we *also* override the actual file descriptors if pytest does so17:59
ssam2ah, i see18:00
ssam2i don't know then18:00
tlaterEugh, this will take some more debugging tomorrow then, I guess :|18:01
tlaterta for bouncing back ideas though, ssam2 :)18:01
*** mcatanzaro has quit IRC18:32
*** ssam2 has quit IRC19:01
*** valentind has joined #buildstream19:12
gitlab-br-botbuildstream: merge request (master->master: WIP: Documentation improvements) #183 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/18319:15
*** mcatanzaro has joined #buildstream20:50
*** mcatanzaro has quit IRC21:13
*** valentind has quit IRC23:07

Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!