-
Notifications
You must be signed in to change notification settings - Fork 32
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
Test rules #379
Test rules #379
Conversation
Added a test for CQWW to show the idea. And fixed build for Ubuntu 20. |
Very good and helpful. Was just thinking about a way to test global rule handling here myself but missed time to implement it. (My idea was to apply 'makelogline' with some given 'struct qso' sets, re-parse the line and compare the resulting structs.) For your solution here are some points to think about:
But anyway a good start to sort the problem out. |
Just checked. A minimal logcfg.dat requires the following entries set:
|
Thanks for the feedback. Added check for pexpect. I have considered other options like using plain expect or adding a special test mode to TLF executable, but both have some drawbacks (installing tcl or not using the same code that the user does). Having symlinks resolved in distribution tar is fine, as it is a read-only copy anyway. Will reduce logging and do some clean-up after the tests (#381). |
Check for Python3 is too strict for Ubuntu 20, will rework it. |
'pexpect' should be fine. As we will use python anyway for #347 it seems a good choice.
Yes, that should be no problems. It is also not much overhead with regards to the package size. |
If the are no issues then this could be merged. |
Very well. Just doing it. And Thanks |
To cover cases like #377 and also future contributed rules I propose to add tests for specific contest rules.
For each contest to be covered one has to set up a minimal logcfg+rule+log in a subdir of
test/rules
. The test starts in that directory TLF and expects that no changes happen to the log file. This ensures that score and mults are evaluated correctly.First had to allow tests without referencing an object file.
Then the workflow has been improved to supply a valid datadir and to dump actual test failures.