Closes T404
Details
- Reviewers
ardumont - Group Reviewers
Reviewers - Maniphest Tasks
- T404: Debian packaging update
- Commits
- rDSTOC5c0979e2422c: Change test attribute in order to skip some tests
rDSTOC53fbe53cf5e8: Update debian package dependencies
R65:53fbe53cf5e8: Update debian package dependencies
R65:5c0979e2422c: Change test attribute in order to skip some tests
rDSTO5c0979e2422c: Change test attribute in order to skip some tests
rDSTO53fbe53cf5e8: Update debian package dependencies
Diff Detail
- Repository
- rDSTO Storage manager
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
The build don't work, because there is an error in the tests during the packaging (see P76), however, the tests are fine when launched normally.
setup.py | ||
---|---|---|
24 | Beware the tab here. In emacs, you can add something like in P77 to clean up tabs, empty spaces, etc... before saving. |
It's good for me.
Now we need to understand why the tests fail only in packaging situation.
(mmm i forgot to submit this 2 days ago...)
I just give it another try and it seems that tests were fine. However, I got an error with the chroot updating.
+------------------------------------------------------------------------------+ | Update chroot | +------------------------------------------------------------------------------+ Ign http://httpredir.debian.org jessie InRelease Hit http://httpredir.debian.org jessie Release.gpg Hit http://httpredir.debian.org jessie Release Hit http://httpredir.debian.org jessie/main Sources Hit http://httpredir.debian.org jessie/main amd64 Packages Hit http://httpredir.debian.org jessie/main Translation-en E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem. E: apt-get update failed
Of course, I can't run the dpkg configuration.
So taking a stab at it this morning, I have a pseudo solution which is basically just don't run them.
Just so you know, the command executed by the packaging is declared in the /debian/rules file in the override_dh_auto_test target.
The command is:
python3 -m nose swh -sva '!db'
Options:
-s does not capture stdout
-v verbose option
-a with attribute (here !db)
If you execute it outside the packaging step it works (as you already knew).
So looking for how our current equivalent tests (storage does have an api) do it and they don't
Look at test_storage, it declares an upper AbstractTestStorage (which has the attribute db so the tests are not ran).
And we have 2 classes TestStorage (local storage) and TestRemoteStorage (remote storage) which inherit from AbstractTestStorage.
I'd suggest (for later) that we either rename the attribute from 'db' to 'slow' or better yet we create a new one 'slow' that we also exclude from tests triggered during packaging.
So to exclude those problematic tests, just replace @attr('!db') by @attr('db') in test_objstorage_api.
Of course, it's a temporary solution until we find the time to address it correctly.
But for now, it will do.
I just give it another try and ...
Yes, it's because i tried what i told you (on your machine) and i did not revert the code.
Try a git status and you'll see the modification.
I intended to revert it before you came.
But, of course, another problem side-tracked me...
Your disk space went full...
TL; DR I'm looking into it.
TL; DR I'm looking into it.
Following the man sbuild, i found nothing about how to do such thing (dpkg --configure -a).
Looking at schroot, which seems to be the basis of sbuild, i found a way to enter the chroot and fix.
dpkg --configure -a # fails about missing deps apt-get install -f # fix missing deps
But this was volatile, meaning, as soon as the chroot session is closed, the modifications are lost.
Thus back to square 1 (make-package still fails for stable with the same error message you mentioned).
I did not find how to make the results persistent.
So as a quick resort, i removed the chroot for stable and builds a new one (following our intranet doc).
Trying a new build works for unstable and stable:
... Source-Version: 0.0.37.dev19-1~bpo8~swh+1 Space: 7456 Status: successful Version: 0.0.37.dev19-1~bpo8~swh+1 -------------------------------------------------------------------------------- Finished at 20160519-1154 Build needed 00:01:54, 7456k disc space qcampos@grand-palais:~/documents/swh-environment$
So, all this proves you are now able to build swh-storage package! Victory!
Can you please give it a try on your end?
Thanks
Can you please give it a try on your end?
Did you have any luck with it?
Don't forget to update this diff with the @attr('db') updated.
Cheers,
Can you please give it a try on your end?
Did you have any luck with it?
Don't forget to update this diff with the @attr('db') updated.
Cheers,
- Update debian package dependencies
- Change test attribute in order to skip some tests
Make-package works for me as well !
I just updated the diff with a woking attribute for now.