This makes test-timeline get the default stage so there is at least one
stage instantiated. Without any stages the master clock will never run
which was causing this test to fail.
The master clock now works fine whether or not there are any stages,
so in the timeline conformance tests don't need to set up their
own times.
Set CLUTTER_VBLANK=none for the conformance tests, which in addition
to removing an test-environment dependency, will result in the ticking
for timeline tests being throttled to the default frame rate.
http://bugzilla.openedhand.com/show_bug.cgi?id=1637
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Instead of calculating a delta in the master clock, and passing that
into each timeline, make each timeline individually responsible for
remembering the last time and computing the delta.
This:
- Fixes a problem where we could spin infinitely processing
timeline-only frames with < 1msec differences.
- Makes timelines consistently start timing on the first frame;
instead of doing different things for the first started timeline
and other timelines.
- Improves accuracy of elapsed time computations by avoiding
accumulating microsecond => millisecond truncation errors.
http://bugzilla.openedhand.com/show_bug.cgi?id=1637
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Timelines no longer work in terms of a frame rate and a number of
frames but instead just have a duration in milliseconds. This better
matches the working of the master clock where if any timelines are
running it will redraw as fast as possible rather than limiting to the
lowest rated timeline.
Most applications will just create animations and expect them to
finish in a certain amount of time without caring about how many
frames are drawn. If a frame is going to be drawn it might as well
update all of the animations to some fraction of the total animation
rather than rounding to the nearest whole frame.
The 'frame_num' parameter of the new-frame signal is now 'msecs' which
is a number of milliseconds progressed along the
timeline. Applications should use clutter_timeline_get_progress
instead of the frame number.
Markers can now only be attached at a time value. The position is
stored in milliseconds rather than at a frame number.
test-timeline-smoothness and test-timeline-dup-frames have been
removed because they no longer make sense.
The units in the Timeline test suite just rely on the timeline
being a timeout automatically advanced by the main loop. This
is not the case anymore, since the merge of the master-clock.
To make the test units work again we need to "emulate" the master
clock without effectively having a stage to redraw; we do this
by creating a frame source and manually advancing the timelines
we create for test purposes, using the advance_msecs() "protected"
method.
* tests/conform/test-label-cache.c:
* tests/conform/test-pick.c:
* tests/conform/test-timeline.c: Show all the output messages only
if the test was done with the verbose flag turned on.
* tests/interactive/test-main.c: Do not use the (gpointer*) cast,
but use a temporary gpointer instead.
* tests/conform/wrapper.sh:
* tests/conform/test-conform-main.c:
* tests/conform/test-timeline.c:
Adds Neil's updates to test-timeline.c so it now works with the new unit
testing infrastructure.
Also some fixes to ensure wrappers get setup correctly for the timeline
tests.
* tests/interactive/test-main.c:
cast the symbol return pointer as (gpointer *) to avoid warning
* tests/conform/test-pick.c:
g_assert that the test passes, instead of using exit()
* test/conform/ADDING_NEW_TESTS:
Fixes a silly typo
framework
* configure.ac:
* tests/*:
The tests have been reorganised into different categories: conformance,
interactive and micro benchmarks.
- conformance tests can be run as part of automated tests
- interactive tests are basically all the existing tests
- micro benchmarks focus on a single performance metric
I converted the timeline tests to conformance tests and also added some
tests from Neil Roberts and Ebassi.
Note: currently only the conformance tests use the glib test APIs,
though the micro benchmarks should too.
The other change is to make the unit tests link into monolithic binaries
which makes the build time for unit tests considerably faster. To deal
with the extra complexity this adds to debugging individual tests I
have added some sugar to the makefiles so all the tests can be run
directly via a symlink and when an individual test is run this way,
then a note is printed to the terminal explaining exactly how that test
may be debugged using GDB.
There is a convenience make rule: 'make test-report', that will run all
the conformance tests and hopefully even open the results in your web
browser. It skips some of the slower timeline tests, but you can run
those using 'make full-report'