[BuildStream] Testing interactive BuildStream operations



Hi all,

Testing interactive BuildStream operations has been a long-standing issue - see
https://gitlab.com/BuildStream/buildstream/issues/592. I got interested in this
again after we had some issues with interactive aspects lately. For example,
see https://gitlab.com/BuildStream/buildstream/issues/1176 and
https://gitlab.com/BuildStream/buildstream/issues/1185.

I started looking at pexpect (https://pexpect.readthedocs.io) again, and managed
to get a basic prototype working relatively easily. I have created a WIP merge
request at https://gitlab.com/BuildStream/buildstream/merge_requests/1706.

This patch only adds tests for interactive `bst init` and `bst build` failures.
Obviously, that's not all the cases we'd ideally cover, but it's a start.

I'd invite you to have a look at the above merge request, and see if the
approach seems fine. Also, if you are aware of other ways of testing similar
behavior, I'd be very interested to hear about those as well.

While I'm generally happy with how the patch turned out, debugging `pexpect`
errors can certainly be tricky. If we decide to give it a shot, we should also
look into providing some nice abstractions for interacting with it, in a way
that makes debugging a bit more human friendly.

Let me know what you think.

Thanks!
Chandan


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]