-
Notifications
You must be signed in to change notification settings - Fork 37.7k
[RPC-Tests] add simple way to run rpc test over QT clients #7068
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
args = [ binary, "-datadir="+datadir, "-server", "-keypool=1", "-discover=0", "-rest" ] | ||
if os.getenv("QT", ""): | ||
args[0] = "bitcoin-qt" | ||
args.append("-server") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding -server
twice here? See changed line 219. Thanks @instagibbs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
219 I think you mean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. There was one to many. Fixed.
343e26c
to
72f2722
Compare
@@ -113,6 +113,9 @@ def main(self): | |||
self.add_options(parser) | |||
(self.options, self.args) = parser.parse_args() | |||
|
|||
if os.getenv("QT", ""): | |||
self.options.noshutdown = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to do this? This will hinder executing QT=1 ./qa/pull-tester/rpc-tests.py
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd also prefer passing noshutdown, if desired, as an explicit option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason why I added the noshutdown=True is, because i think running a RPC test with the UI needs post-run user based verification (does the GUI looks like expected?). As long as there is no automatic screenshot creating (and maybe auto-comparing) I think the noshutdown flag is appropriate.
The QT=1
env flag is a helper IMO. It's not really necessary because one could also pass the path to bitcoin-qt in the BITCOIND
env var.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the noshutdown flag is appropriate.
Still, you could just pass it via the command line. On the other hand, there is no way to disable it, right now when using QT=
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. There is no -shutdown
to override it the other way. I still think it's better not to conflate "want to use GUI" and "don't want to shutdown".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Agreed. This is a point.
Fixed.
utACK. Any idea why it's slower? |
1457207
to
ffe8fa6
Compare
@gmaxwell: I haven't analyzed why they are slower, but i assume it's because of the whole GUI/QT overhead. |
Maybe I should give some directions where this could go to: |
With e.g. wallet tests with lots of transactions it's bound to be slower because the UI is doing more in that case, it keeps and maintains its own table of transactions to to do things like sort, as well as draw the screen when core's locks are contended. |
utACK ffe8fa6 |
Needs rebase |
ffe8fa6
to
979698c
Compare
Rebased and reduced. There are only two changes now:
Tests over QT clients can be run like |
Awesome, utACK |
979698c [RPC-Tests] add option to run rpc test over QT clients (Jonas Schnelli)
Would be nice to have |
Doesn't this simply work?
|
Fixed by #7209 |
Github-Pull: bitcoin#7068 Rebased-From: 979698c
Github-Pull: bitcoin#7068 Rebased-From: 979698c
Github-Pull: bitcoin#7068 Rebased-From: 979698c
Use env variable QT=1.
Example:
QT=1 ./qa/rpc-tests/wallet.py --srcdir=src/
The RPC test will be executed over GUI clients.
It pretty cool to visually watch the RPC test slowly gets executed.
Much slower then
bitcoind
; aims to help testing and improving UI situations.