rockdaboot / mget

Multithreaded metalink/file/website downloader (like Wget) and C library
GNU Lesser General Public License v3.0
112 stars 19 forks source link

[Feature Request] Use automake's Test Harness for test suite #20

Closed darnir closed 10 years ago

darnir commented 10 years ago

Debugging the current test suite is difficult. I couldn't find any cumulative output nor any log files to find raw information when the tests failed. As a result, in order to find which tests fail, I had to run each file manually.

Instead, how about using the Parallel Test Harness provided in automake? It should make life much easier.

I'm not very well versed with autotools and Makefiles, but I can try to shift this to the test harness from automake if others agree.

Some help would be very appreciated however. Especially since I don't understand, at first glance quite a few of the macros used in tests/Makefile.am

rockdaboot commented 10 years ago

I thought I am using the parallel test harness... e.g. make check -j4 is working fine You find the logs in ./tests/.log

If you need valgrind support (beware, it is slow): ./configure --enable-valgrind-tests make check

What exactly don't you understand in tests/Makefile.am ? Maybe I should put some comments in there and remove my commented experimental stuff...

darnir commented 10 years ago

Oh. Let me check again then, because I didn't see many of the macros I specified when implementing the same in Wget. For example, LOG_COMPILER.

Also, the output doesn't seem to match. Although, now that I think about it, the problem could be the automake version. I'm used to using the latest one, but my office system is a Debian stable with automake 1.11.6. The test harness in automake has undergone substantial changes since.

I think I'll give it another shot after this revelation that I'm dealing with a Makefile compatible with a much older version of automake. If I'm still lost, I'll ask.

Although yes, comments are always good to have. :)

P.S.: Also, there is no tests/.log file generated on my machine.

rockdaboot commented 10 years ago

I just tested on a wheezy32 virtual machine, and yes - as you say - automake evolved. The output on wheezy32 is a mess while when working on Debian unstable is looks very well done.

I also had 4 tests failing (missing IDNA2008 and unistring support). Try again after: apt-get install libidn2-0 libidn2-0-dev libunistring0 libunistring-dev

darnir commented 10 years ago

Yes. Seems like they let a half-baked feature in the wild with automake 1.10 or was it 1.11?

I'll try these on my personal Arch system later. The Debian stable is a institute administered system. I can get the libraries installed, but it's much easier to just use my own system later.