Closed Bug 946618 Opened 11 years ago Closed 11 years ago

Land some native tests for cubeb

Categories

(Core :: Audio/Video, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: padenot, Assigned: padenot)

References

Details

Attachments

(5 files, 3 obsolete files)

Now that mozWriteAudio and friends are mostly gone, we don't have any tests to check if cubeb is working properly (as playing a video will fallback on system clock if the stream init fails, and automation does not report the sound output by the speakers). Cubeb has some tests in its repo, it would be useful to have them running in tbpl.
Assignee: nobody → paul
Attached patch Add native tests for cubeb. r= (obsolete) — Splinter Review
So, I finally got around to doing this. This basically takes the tests that are in the github repo, and hook them to the test infrastructure. The cppunittest framework apparently only works with cpp files, so I made minimal changes to the tests themselves, and renamed them to *.cpp instead of *.c. The tests can be run by doing: > ./mach cppunittest or > ./mach cppunittest obj-x86_64-unknown-linux-gnu/media/libcubeb/tests/test_sanity to run only one, for example. I think they should show up on tbpl, but I haven't tried yet. Not requesting review yet because I haven't tested all platforms yet (only Linux), and I want to add more tests.
Attached patch Add native tests for cubeb. r= (obsolete) — Splinter Review
Attachment #8383043 - Flags: review?(mh+mozilla)
Attachment #8383043 - Flags: review?(kinetik)
This is just the cubeb update.
Attachment #8383048 - Flags: review?(kinetik)
Attachment #8378890 - Attachment is obsolete: true
And now without forgetting to `hg add`.
Attachment #8383050 - Flags: review?(kinetik)
Attachment #8383048 - Attachment is obsolete: true
Attachment #8383048 - Flags: review?(kinetik)
Comment on attachment 8383050 [details] [diff] [review] Update cubeb to pick up new tests. r= update.sh needs to be updated to pick up the new files.
Attachment #8383050 - Flags: review?(kinetik) → review+
Comment on attachment 8383043 [details] [diff] [review] Add native tests for cubeb. r= Oh, you updated update.sh here. Cool.
Attachment #8383043 - Flags: review?(kinetik) → review+
Comment on attachment 8383043 [details] [diff] [review] Add native tests for cubeb. r= Review of attachment 8383043 [details] [diff] [review]: ----------------------------------------------------------------- ::: media/libcubeb/tests/Makefile.in @@ +5,5 @@ > + > +ifeq ($(OS_ARCH),WINNT) > + # On windows, the WASAPI backend needs the resampler we have in > + # /media/libspeex_resampler, so we can't get away with just linking cubeb's .o > + LIBS = $(DEPTH)/layout/media/$(LIB_PREFIX)gkmedias.$(LIB_SUFFIX) \ Please use EXPAND_LIBNAME_PATH @@ +10,5 @@ > + $(NULL) > +else > + # Otherwise, we can just grab all the compiled .o and compile against that, > + # linking the appriopriate libraries. > + LIBS = ../src/*.o Not great. Especially in the light of changes to come. Try adding a LIBRARY_NAME to media/cubeb/src/moz.build, and link against that lib.
Attachment #8383043 - Flags: review?(mh+mozilla) → review-
This seems to work, and is indeed nicer.
Attachment #8383713 - Flags: review?(mh+mozilla)
Attachment #8383043 - Attachment is obsolete: true
Attachment #8383713 - Flags: review?(mh+mozilla) → review+
Hrm, try does not run cppunit on Android, and of course there are problems.
This disable some tests, for example, it makes the test skip floating point tests on platform that don't support floating point audio, and skip timing test on platform where we don't honor latency request.
Attachment #8393473 - Flags: review?(kinetik)
This sometime segfault when trying to get the engine, and I rather land this than let it sit in my queue for too long. We still have some kind of smoke test in test_audio.c, so that's kind of okay.
This is green all the time with this change, and break 20% of the time without. This looks like a regression in WASAPI introduced in 7, fixed in 8.
Attachment #8393476 - Flags: review?(kinetik)
Attachment #8393475 - Flags: review?(kinetik)
With all those patches applied, try looks good.
Attachment #8393473 - Flags: review?(kinetik) → review+
Attachment #8393475 - Flags: review?(kinetik) → review+
Attachment #8393476 - Flags: review?(kinetik) → review+
Depends on: 949166
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: