At the Rome meeting, it was discussed (apparently, I wasn't there that time) to have an AppVeyor config for tor. As I understand it (and please feel free to correct this ticket!), the idea is to have multiple CI systems running (which is a thing we already do!). For example, currently, we have Jenkins and we also have TravisCI for personal (Github-based) forks (as per legacy/trac#22636 (moved)): Jenkins tests (essentially) (Debian package-based) builds on master and known (supported) tor versions, while Travis tests anything any developer pushes (albeit only for GCC/Clang on Linux, because everything else is unsupported/slow).
We should setup an AppVeyor config for testing tor on Windows. Ideally, it should match the testing behaviour of our Jenkins/Travis builds, so that we don't get spurious errors on one system or another.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related.
Learn more.
Some comments/review I left in IRC, for the record:
At the end of the build, if it failed, there will be a test-suite.log file in the topmost build directory describing the failures, so probably we'll want to cat that to stdout.
Figuring out how to not use --disable-gcc-hardening.
Instead of make; make install; make test, we should just be able to do make test, I think?
We should do make check (if possible… it calls all kinds of perl/python/shell) instead of make test.
there is no need to --disable-gcc-hardening, removed
AppVeyor understands separate build and test phases, therefore make and make install are kept separate from make check
Few things I do not like about the current make check:
main test produces a lot of sub-tests that are reported as one in the summary (and to find details one needs test-suite.log or test.log file). Simple make test output was much more readable. This can be fixed by using a custom automake test driver.
Tinytest produces a messy output like:
geoip/load_file: [forking] FAIL ../src/test/test_geoip.c:409: Unable to load geoip from "/c/projects/appveyor/src/config/geoip" FAIL ../src/test/test_geoip.c:411: assert(0 OP_EQ rv): 0 vs -1 [load_file FAILED]
I hope it can be parsed somehow to be displayed in the AppVeyor's test output tab.
This is probably related to the MSYS64/MinGW build environment - C:\msys64\mingw32\bin\openssl version is something different than C:\msys64\usr\bin\openssl version. Swapping them in PATH does not help.
I believe the mismatch is due to using pacman to install openssl when it's already installed; I'll try not reinstalling it.
Update: It's because pacman is installing libevent, and its version of libevent wants openssl, and somehow it doesn't recognise that openssl is already installed. Also, there's no way to tell pacman which version of openssl to install, because Arch is a steaming pile of crap made by masochists who like everything to be maximally broken all the time. I'm going to try building libevent from git instead, and get rid of this pacman garbage entirely.
There's a bunch of fixes and a bit of a hack to add IRC notifications and other such things in my bug25549 branch. I ended up needed to build libevent from git, so I enabled caching of its build directory between builds (not sure if this works yet, as caching only happens on successful builds). Everything appears to be working, but there's still three tests which fail, which I've created new tickets for: crypto/openssl_version (legacy/trac#25942 (moved)), tortls/x509_cert_free (legacy/trac#25943 (moved)), and tortls/context_new (legacy/trac#25944 (moved)).
My branch includes @saper's patches, which I've reviewed. Please review my additions, thank you!
:charm.oftc.net NOTICE AUTH :*** Looking up your hostname...:charm.oftc.net NOTICE AUTH :*** Checking Ident:charm.oftc.net NOTICE AUTH :*** Couldn't look up your hostname:charm.oftc.net NOTICE AUTH :*** No Ident response:charm.oftc.net NOTICE appveyor-ci :*** Connected securely via TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384-256:charm.oftc.net 001 appveyor-ci :Welcome to the OFTC Internet Relay Chat Network appveyor-ciPRIVMSG #tor-ci :git://repo.or.cz/tor/appveyor.git 0master 5a3cbaf - Marcin Cieślak: tests: do not hardcode path for IRC notificationsERROR: Failed to send notification: Traceback (most recent call last): File "C:\projects\appveyor\scripts\test\appveyor-irc-notify.py", line 195, in <module> notify() File "C:\projects\appveyor\scripts\test\appveyor-irc-notify.py", line 188, in notify irc_sock.send('PRIVMSG #{} :{}\r\n'.format(channel, msg).encode())UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 81: ordinal not in range(128)
{{{
:charm.oftc.net NOTICE AUTH :*** Looking up your hostname...
:charm.oftc.net NOTICE AUTH :*** Checking Ident
:charm.oftc.net NOTICE AUTH :*** Couldn't look up your hostname
:charm.oftc.net NOTICE AUTH :*** No Ident response
:charm.oftc.net NOTICE appveyor-ci :*** Connected securely via TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384-256
:charm.oftc.net 001 appveyor-ci :Welcome to the OFTC Internet Relay Chat Network appveyor-ci
PRIVMSG #tor-ci :git://repo.or.cz/tor/appveyor.git 0master 5a3cbaf - Marcin Cieślak: tests: do not hardcode path for IRC notifications
ERROR: Failed to send notification:
Traceback (most recent call last):
File "C:\projects\appveyor\scripts\test\appveyor-irc-notify.py", line 195, in
notify()
File "C:\projects\appveyor\scripts\test\appveyor-irc-notify.py", line 188, in notify
irc_sock.send('PRIVMSG #{} :{}\r\n'.format(channel, msg).encode())
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 81: ordinal not in range(128)
}}}
Yeah… that script is a bit janky. The original (at least the one that I took) is here. It definitely doesn't handle UTF-8. :'( I'm sorry it messed up your name!
I have pushed some improvements for IRC to my branch on top of your changes. Now trying to fight openssl. Interestingly, without pacman running we still get OpenSSL from somewhere. Jumping into RDP to figure out from where exactly it is coming (looks like mingw has it preinstalled)
I have pushed some improvements for IRC to my branch on top of your changes. Now trying to fight openssl. Interestingly, without pacman running we still get OpenSSL from somewhere. Jumping into RDP to figure out from where exactly it is coming (looks like mingw has it preinstalled)
The Windows VMs that AppVeyor runs also already have OpenSSL 1.0.2l installed, so part of the issue might be that mingw has its own (newer) header installed somewhere?
I ended up needed to build libevent from git, so I enabled caching of its build directory between builds (not sure if this works yet, as caching only happens on successful builds).
Does that seem good? If so, I think the next step is to squash it down to a more manageable branch, clean it up a little, and get it reviewed again.
Thanks! It looks good at first glance. I might want to study it a bit more. Did you figure out how to fix legacy/trac#26076 (moved)? Or is it still (possibly) intermittently failing?
I agree that squashing it into more manageable commits might be a good idea (and easier to review).
Okay -- as a minimal branch, I propose appveyor_min_034.
It removes some stuff from the branches that might have been a good idea, but turned out not to be necessary for appveyor.
It is built by merging a branch appveyor_min_029 into master -- I think that branch would have potential on 0.2.9, but we would need to backport an array of various unit test fixes from master in order to get it working.
LGTM. I don't know what to do about legacy/trac#26076 (moved) for now. Perhaps we'll start to see a pattern emerge to the failures, or maybe we'll have to ignore that test on appveyor for now.