-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gh #247 Python update (Need to test)
- Loading branch information
1 parent
28dc451
commit d04a29b
Showing
10 changed files
with
275 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
host/tests/L3_TestCases/dsVideoDevice/dsVideoDevice_L3_Runall_Sink.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
#!/usr/bin/env python3 | ||
#** ***************************************************************************** | ||
# * | ||
# * If not stated otherwise in this file or this component's LICENSE file the | ||
# * following copyright and licenses apply: | ||
# * | ||
# * Copyright 2024 RDK Management | ||
# * | ||
# * Licensed under the Apache License, Version 2.0 (the "License"); | ||
# * you may not use this file except in compliance with the License. | ||
# * You may obtain a copy of the License at | ||
# * | ||
# * | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# * | ||
# * Unless required by applicable law or agreed to in writing, software | ||
# * distributed under the License is distributed on an "AS IS" BASIS, | ||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# * See the License for the specific language governing permissions and | ||
# * limitations under the License. | ||
# * | ||
#* ****************************************************************************** | ||
|
||
import os | ||
import sys | ||
import importlib | ||
from pathlib import Path | ||
|
||
dir_path = os.path.dirname(os.path.realpath(__file__)) | ||
sys.path.append(os.path.join(dir_path)) | ||
sys.path.append(os.path.join(dir_path, "../../")) | ||
sys.path.append(os.path.join(dir_path, "../../raft")) | ||
|
||
from raft.framework.core.logModule import logModule | ||
|
||
def Runall_L3(): | ||
skipTests = [] | ||
# Summery log for all the tests | ||
dsVideoDeviceSummerLog = logModule("dsVideoDeviceSummerLog_Sink", level=logModule.INFO) | ||
|
||
testDirectory = Path(dir_path) | ||
|
||
# Find all test modules in the directory | ||
test_modules = sorted(testDirectory.glob("dsVideoDevice_test*.py")) | ||
|
||
# Run each test by dynamically importing and instantiating | ||
for test_module_path in test_modules: | ||
# Construct module name from file name, excluding .py extension | ||
module_name = test_module_path.stem | ||
skip = False | ||
for skipTest in skipTests: | ||
if skipTest in module_name: | ||
skip = True | ||
break | ||
if skip: | ||
continue | ||
try: | ||
# Dynamically import the module | ||
module = importlib.import_module(module_name) | ||
|
||
# Dynamically access the test class from the module | ||
# Assuming each test file has only one class named the same as the module | ||
test_class = getattr(module, module_name) | ||
|
||
# Instantiate and run the test | ||
test_instance = test_class(dsVideoDeviceSummerLog) | ||
test_instance.run(False) | ||
|
||
except (ImportError, AttributeError) as e: | ||
dsVideoDeviceSummerLog.error(f"Failed to import {module_name}: {e}") | ||
|
||
if __name__ == '__main__': | ||
Runall_L3() |
74 changes: 74 additions & 0 deletions
74
host/tests/L3_TestCases/dsVideoDevice/dsVideoDevice_L3_Runall_Source.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
#!/usr/bin/env python3 | ||
#** ***************************************************************************** | ||
# * | ||
# * If not stated otherwise in this file or this component's LICENSE file the | ||
# * following copyright and licenses apply: | ||
# * | ||
# * Copyright 2024 RDK Management | ||
# * | ||
# * Licensed under the Apache License, Version 2.0 (the "License"); | ||
# * you may not use this file except in compliance with the License. | ||
# * You may obtain a copy of the License at | ||
# * | ||
# * | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# * | ||
# * Unless required by applicable law or agreed to in writing, software | ||
# * distributed under the License is distributed on an "AS IS" BASIS, | ||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# * See the License for the specific language governing permissions and | ||
# * limitations under the License. | ||
# * | ||
#* ****************************************************************************** | ||
|
||
import os | ||
import sys | ||
import importlib | ||
from pathlib import Path | ||
|
||
dir_path = os.path.dirname(os.path.realpath(__file__)) | ||
sys.path.append(os.path.join(dir_path)) | ||
sys.path.append(os.path.join(dir_path, "../../")) | ||
sys.path.append(os.path.join(dir_path, "../../raft")) | ||
|
||
from raft.framework.core.logModule import logModule | ||
|
||
def Runall_L3(): | ||
skipTests = ["test1", "test3", "test4"] | ||
|
||
# Summery log for all the tests | ||
dsVideoDeviceSummerLog = logModule("dsVideoDeviceSummerLog_Source", level=logModule.INFO) | ||
|
||
testDirectory = Path(dir_path) | ||
|
||
# Find all test modules in the directory | ||
test_modules = sorted(testDirectory.glob("dsVideoDevice_test*.py")) | ||
|
||
# Run each test by dynamically importing and instantiating | ||
for test_module_path in test_modules: | ||
# Construct module name from file name, excluding .py extension | ||
module_name = test_module_path.stem | ||
skip = False | ||
for skipTest in skipTests: | ||
if skipTest in module_name: | ||
skip = True | ||
break | ||
if skip: | ||
continue | ||
try: | ||
# Dynamically import the module | ||
module = importlib.import_module(module_name) | ||
|
||
# Dynamically access the test class from the module | ||
# Assuming each test file has only one class named the same as the module | ||
test_class = getattr(module, module_name) | ||
|
||
# Instantiate and run the test | ||
test_instance = test_class(dsVideoDeviceSummerLog) | ||
test_instance.run(False) | ||
|
||
except (ImportError, AttributeError) as e: | ||
dsVideoDeviceSummerLog.error(f"Failed to import {module_name}: {e}") | ||
|
||
if __name__ == '__main__': | ||
Runall_L3() |
90 changes: 47 additions & 43 deletions
90
host/tests/L3_TestCases/dsVideoDevice/dsVideoDevice_L3_testSetup.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,59 @@ | ||
# this file is generated by the testing suites, when a new test is modified, this configuration file will be filled out and updated. | ||
#location: https://github.com/rdkcentral/rdk-halif-test-device_settings/tree/3.1.2/assets/ | ||
#** ***************************************************************************** | ||
# * | ||
# * If not stated otherwise in this file or this component's LICENSE file the | ||
# * following copyright and licenses apply: | ||
# * | ||
# * Copyright 2024 RDK Management | ||
# * | ||
# * Licensed under the Apache License, Version 2.0 (the "License"); | ||
# * you may not use this file except in compliance with the License. | ||
# * You may obtain a copy of the License at | ||
# * | ||
# * | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# * | ||
# * Unless required by applicable law or agreed to in writing, software | ||
# * distributed under the License is distributed on an "AS IS" BASIS, | ||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# * See the License for the specific language governing permissions and | ||
# * limitations under the License. | ||
# * | ||
#* ****************************************************************************** | ||
|
||
dsVideoDevice: # Prefix must always exist | ||
dsVideoDevice: | ||
description: "dsVideoDevice Device Settings test setup" | ||
assets: | ||
device: | ||
defaults: &defaults | ||
artifacts: | ||
- "<URL Path>/dsVideoDevice//bin/hal_test" | ||
- "<URL Path>/dsVideoDevice//bin/libut_control.so" | ||
- "<URL Path>/dsVideoDevice/profiles/sink/Sink_4K_VideoDevice.yaml" | ||
- "<URL Path>/dsVideoDevice/bin/run.sh" | ||
execute: | ||
- "chmod +x <Path on Device>/dsVideodevice/hal_test" | ||
- "chmod +x <Path on Device>/dsVideodevice/run.sh" | ||
- "ln -s /usr/lib/libds-hal.so <Path on Device>/dsVideodevice/libdshal.so" | ||
streams: | ||
test1_FrameratePrePostChangeCallBack_Verify: | ||
<<: *defaults | ||
streams: | ||
- "<URL Path>/streams/scrolling_text_fast_3840x2160_23.98fps.mp4" | ||
- "<URL Path>/streams/scrolling_text_fast_3840x2160_24fps.mp4" | ||
- "<URL Path>/streams/scrolling_text_fast_3840x2160_25fps.mp4" | ||
- "<URL Path>/streams/scrolling_text_fast_3840x2160_29.97fps.mp4" | ||
- "<URL Path>/streams/scrolling_text_fast_3840x2160_30fps.mp4" | ||
- "<URL Path>/streams/scrolling_text_fast_3840x2160_50fps.mp4" | ||
- "<URL Path>/streams/scrolling_text_fast_3840x2160_59.94fps.mp4" | ||
- "<URL Path>/streams/scrolling_text_fast_3840x2160_60fps.mp4" | ||
- "/streams/scrolling_text_fast_3840x2160_23.98fps.mp4" | ||
- "/streams/scrolling_text_fast_3840x2160_24fps.mp4" | ||
- "/streams/scrolling_text_fast_3840x2160_25fps.mp4" | ||
- "/streams/scrolling_text_fast_3840x2160_29.97fps.mp4" | ||
- "/streams/scrolling_text_fast_3840x2160_30fps.mp4" | ||
- "/streams/scrolling_text_fast_3840x2160_50fps.mp4" | ||
- "/streams/scrolling_text_fast_3840x2160_59.94fps.mp4" | ||
- "/streams/scrolling_text_fast_3840x2160_60fps.mp4" | ||
test2_ZoomMode: | ||
<<: *defaults | ||
streams: | ||
- "<URL Path>/streams/scrolling_text_fast_1920x1080_60fps.mp4" | ||
- "/streams/scrolling_text_fast_1920x1080_60fps.mp4" | ||
test3_SetDisplayFramerate: | ||
<<: *defaults | ||
streams: | ||
- "<URL Path>/streams/scrolling_text_fast_3840x2160_23.98fps.mp4" | ||
- "<URL Path>/streams/scrolling_text_fast_3840x2160_24fps.mp4" | ||
- "<URL Path>/streams/scrolling_text_fast_3840x2160_25fps.mp4" | ||
- "<URL Path>/streams/scrolling_text_fast_3840x2160_29.97fps.mp4" | ||
- "<URL Path>/streams/scrolling_text_fast_3840x2160_30fps.mp4" | ||
- "<URL Path>/streams/scrolling_text_fast_3840x2160_50fps.mp4" | ||
- "<URL Path>/streams/scrolling_text_fast_3840x2160_59.94fps.mp4" | ||
- "<URL Path>/streams/scrolling_text_fast_3840x2160_60fps.mp4" | ||
- "/streams/scrolling_text_fast_3840x2160_23.98fps.mp4" | ||
- "/streams/scrolling_text_fast_3840x2160_24fps.mp4" | ||
- "/streams/scrolling_text_fast_3840x2160_25fps.mp4" | ||
- "/streams/scrolling_text_fast_3840x2160_29.97fps.mp4" | ||
- "/streams/scrolling_text_fast_3840x2160_30fps.mp4" | ||
- "/streams/scrolling_text_fast_3840x2160_50fps.mp4" | ||
- "/streams/scrolling_text_fast_3840x2160_59.94fps.mp4" | ||
- "/streams/scrolling_text_fast_3840x2160_60fps.mp4" | ||
test4_FRFMode: | ||
<<: *defaults | ||
streams: | ||
- "<URL Path>/streams/scrolling_text_fast_3840x2160_23.98fps.mp4" | ||
- "<URL Path>/streams/scrolling_text_fast_3840x2160_24fps.mp4" | ||
- "<URL Path>/streams/scrolling_text_fast_3840x2160_25fps.mp4" | ||
- "<URL Path>/streams/scrolling_text_fast_3840x2160_29.97fps.mp4" | ||
- "<URL Path>/streams/scrolling_text_fast_3840x2160_30fps.mp4" | ||
- "<URL Path>/streams/scrolling_text_fast_3840x2160_50fps.mp4" | ||
- "<URL Path>/streams/scrolling_text_fast_3840x2160_59.94fps.mp4" | ||
- "<URL Path>/streams/scrolling_text_fast_3840x2160_60fps.mp4" | ||
- "/streams/scrolling_text_fast_3840x2160_23.98fps.mp4" | ||
- "/streams/scrolling_text_fast_3840x2160_24fps.mp4" | ||
- "/streams/scrolling_text_fast_3840x2160_25fps.mp4" | ||
- "/streams/scrolling_text_fast_3840x2160_29.97fps.mp4" | ||
- "/streams/scrolling_text_fast_3840x2160_30fps.mp4" | ||
- "/streams/scrolling_text_fast_3840x2160_50fps.mp4" | ||
- "/streams/scrolling_text_fast_3840x2160_59.94fps.mp4" | ||
- "/streams/scrolling_text_fast_3840x2160_60fps.mp4" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.