Age | Commit message (Collapse) | Author |
|
In mumble-voip/mumble#3163 it was reported that a server that was
accessible via a CNAME was no longer being resolved correctly by
Mumble's connect dialog.
This commit adds CNAME to the ServerResolver test suite, so we're
sure that it is working.
|
|
|
|
Unfortunately QHostInfo::lookupHost is a static method, so we can’t
mock it. As a result, the test TestServerResolver is dependent on the
network. Travis builds could fail with network timeouts. Hence, we
increase the 5s timeout to 10s.
|
|
|
|
Qt 4 doesn't have QSignalSpy::wait().
This commit replaces calls to wait() with a similar construct
that works on Qt 4.
The implementation of QSignalSpy::wait() is quite simple:
It has its own QTestEventLoop and calls enterLoopMSecs()
on it. The return value of wait() is true if the count()
of the QSignalSpy changed since the last invocation.
Our construct is equivalent that that. Tests now pass on Qt 4.
|
|
IPv4 and IPv6.
The initial test implementation was written targetting systems
that have both IPv4 and IPv6 available.
Qt's resolver does not return IPv6 results on systems that cannot
access the IPv6 internet. Nor does it return IPv4 results for systems
that cannot access the IPv4 internet.
Because of this, we modfiy the test case to be a little more
accommodating.
|
|
|
|
This is meant to replace the QPair-based qpAddress type used in ConnectDialog.
|
|
hostname/port pair.
|
|
We're still getting test failures on the build farm:
FAIL! : TestTimer::resolution() Insufficient timer resolution.
Got >= 5 usec, expected < 5 usec resolution...
Loosen our requirements a bit to require a change at least
every 100 microseconds, instead of every 5 microseconds.
|
|
|
|
This allows the tests to compile and use the source files that are to be tested.
|
|
This commit drops the tests in TestTimer that depend on comparisons
to QTime to work.
In some environments, such as CI VMs/containers, we don't seem to get
the resolution we desire from QTime.
It's also worth noting that these tests were dormant in the repository
for a long time, until we hooked up 'make check'. So, they were quite
old, and assumptions made when the code was written might not hold up
any longer.
Fixes mumble-voip/mumble#3060
|
|
|
|
|
|
|
|
Previously, this test depended on the fact that QTime is/was a low
resolution timer, which is/may not always be the case.
This changes the test to only use the Timer class.
The test is re-written to run for 150 ms, to ensure that
we have enough samples to do a proper calculation. This
is also done to avoid fluctuations that could happen due
to context switches/overhead from other processes on the
test runner machine.
Since we don't compare to another timer anymore, we instead
explicitly test that the timer resolution is at least 5
microseconds. Currently, the Timer class doesn't spell out
its actual resolution, because its implementation varies
depending on platform.
|
|
|
|
For standard libraries that only provide float overloads for abs/std::abs,
this is necessary.
Also, IMHO, doing this instead of playing with fire using float casts and
whatnot seems to be the more sane approach.
|
|
individual test.
|
|
The murmur_pch.h file which most tests use -- either directly,
or indrectly -- depends on being able to include OpenSSL headers.
Some of our tests did not include(qmake/openssl.pri), which meant that
those tests would fail to build in CONFIG(no-pch), such as on macOS.
This commit works around that issue by depending on OpenSSL for all tests.
|
|
The string test for PacketDataStream uses the string
Bærtur -- but encoded as Latin1.
Keep the string -- it's as good as any -- but use UTF-8 instead,
to make clang happy.
Fixes mumble-voip/mumble#2978
|
|
|
|
This refactors a lot of the common code from each test file into
a test.pri file, which is then included by all of our tests.
|
|
CryptographicRandom.
|
|
builds.
|
|
cryptographic purposes.
|
|
purposes.
The class implements an API similar to OpenBSD's arc4random:
- A way to get a random uint32_t. (arc4random)
- A way to get a random uint32_t with an upper bound. (arc4random_uniform)
- A way to fill a buffer with random data. (arc4random_buf)
|
|
This makes 'jom check' pass on our win32-static buildenv with MSVC 2015.
|
|
|
|
|
|
|
|
Explicitly set QT = core in order to force Qt's QTEST_MAIN
to use a QCoreApplicaiton instead of a QApplication.
Also, while we're here, move from the deprecated
CONFIG += qtestlib
to
QT += testlib
|
|
This commits adds a 'make check' target to Mumble's build.
To enable tests, add CONFIG+=tests when configuring the
Mumble build.
It's all based on Qt's existing support for this.
To add a testcase, simply add CONFIG+=testcase to its .pro file.
Then, that test will automatically be built and run when 'make check'
is run.
This commit also adds the recent TestCryptographicHash test to the
test suite, as the -- for now -- only test.
|
|
We used to use QCryptographicHash, but Qt 4 doesn't support Sha256.
To remedy that, we've implemented this class on top of OpenSSL's EVP
system.
Besides being able to work on Qt 4, this class also means we can add
additional hash functions in the future, which are not necessarily
supported by Qt, such as BLAKE2.
|
|
This commit changes various pri and pro files to always prepend
the global build output directory (which can be either 'release'
or 'debug', depending on the current build configuration).
Otherwise, if a library that we build ourselves, such as -lspeex in
CONFIG+=bundled-speex, is also available in one of the other lib dirs,
we can't be sure that the one in our build output directory will be used.
This is a problem on FreeBSD, where we add /usr/local/lib
to the QMAKE_LIBDIR in compiler.pri. That directory might contain
its own -lspeex.
With this change, we now prefer libraries in our build output directory
to system libraries.
|
|
instead.
LIBPATH is deprecated in favor of QMAKE_LIBDIR.
|
|
|
|
* Move Icon creation script/program to the scripts folder.
It is definitely not a test.
* Introduce scripts/development folder for development scripts, in contrary to scripts/server for example.
|
|
|
|
* Adjusted the script which creates the icon file to use the simplified svg for smaller sizes
|
|
* Set version to 1.2.3 instead of 1.2.0 to prevent a crash of the benchmark when a user with avatar is already on the server.
As reported on http://wiki.natenom.name/mumble/benutzerhandbuch/murmur/benchmark
|
|
* Paths were missing from the include-path. With the celt and speex includepaths added it compiles now.
|
|
* Add descriptions to files in src/tests
* Minor formatting in OverlayTest.cpp
|
|
* Add program/file description
* Useful error on invalid number of arguments
* Code formatting
* Make varnames descriptive
|
|
* this was suggested by submitted patch 321.
This shouldn’t hurt, only increasing file-size a bit.
Although probably very rarely in use, the patch showed interest/usage of it.
|
|
- replace while(1) with while(true)
|
|
|
|
|
|
|