Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

[test_build] meta-iotqa: add qa tests for audio #288

Open
wants to merge 25 commits into
base: master
Choose a base branch
from

Conversation

nvelux
Copy link
Contributor

@nvelux nvelux commented Aug 11, 2017

Add test for audio python interface

@nvelux
Copy link
Contributor Author

nvelux commented Aug 11, 2017

please test.

@refkit-ci
Copy link

Can one of the admins verify this patch?

@okartau
Copy link
Contributor

okartau commented Aug 11, 2017

ok to test

@nvelux
Copy link
Contributor Author

nvelux commented Aug 14, 2017

can you share hw card and device number to record and playback ?

@nvelux
Copy link
Contributor Author

nvelux commented Aug 15, 2017

please test pulse audio recording and playback.

@mythi mythi requested a review from juimonen August 15, 2017 07:50
time.sleep(3)
self.assertEqual(status, 0, msg="Error not recorded: %s" % output)
# Stop pulseaudio daemon
(status, output) = self.target.run("pulseaudio -k")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know that parecord doesn't have time parameter to stop the recording, but maybe you could dig out or save the previously started parecord process id and kill thaq (instead of killing pulseaudio server)

(status, output) = self.target.run("pulseaudio -D")
self.assertEqual(status, 0, msg="Error pulseaudio not started: %s" % output)
# Checking recorded file present
(status, output) = self.target.run("ls /tmp/ |grep 'rec.wav'")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have to do the grep "rec.wav", could you just ls?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just confirming the recorded file present.

(status, output) = self.target.run("ls /tmp/ |grep 'rec.wav'")
self.assertEqual(status, 0, msg="Error file not found: %s" % output)
# Playing audio
(status, output) = self.target.run("paplay /tmp/rec.wav &")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you actually tried that you can record and play the audio with these commands (like in your own pc)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it's playing the audio.

self.assertEqual(status, 0, msg="Error not played: %s" % output)
# Audio running states checking
(status, output) = self.target.run("cat /proc/asound/card1/pcm3p/sub0/status |grep 'state: RUNNING'")
self.assertEqual(status, 0, msg="Error not running: %s" % output)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how portable the alsa card path here is...? You could do "pactl list sinks" and grep for "RUNNING" and so on.

@nvelux
Copy link
Contributor Author

nvelux commented Aug 16, 2017

corrected as per your suggestion , please test.

@nvelux
Copy link
Contributor Author

nvelux commented Aug 16, 2017

Apply proper time delay to copy sinks file, please test.

@nvelux
Copy link
Contributor Author

nvelux commented Aug 18, 2017

"paplay /tmp/rec.wav &" command is working here in own PC and state: RUNNING.
In CI testing, State: IDLE and not success , please can you check "paplay" command getting issue.

@nvelux
Copy link
Contributor Author

nvelux commented Aug 21, 2017

Script is running successfully as "State: RUNNING" in own PC here.
Please can you check getting issue as "State: IDEL" there in CI testing.

@nvelux
Copy link
Contributor Author

nvelux commented Aug 23, 2017

please can you check "paplay /tmp/rec.wav &" command issue ? it's running successfully in own PC, and state is RUNNING as well.

@epyeoh
Copy link
Contributor

epyeoh commented Aug 24, 2017

@nvelux why this test case was separated from oeqa.runtime.multimedia.audio.pulseaudio? Why not include this new test case into existing pulseaudio test?

@nvelux
Copy link
Contributor Author

nvelux commented Aug 24, 2017

it's included, please test.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants