aws-samples / aws-panorama-samples

This repository has samples that demonstrate various aspects of AWS Panorama device and the Panorama SDK
https://docs.aws.amazon.com/panorama/
MIT No Attribution
82 stars 58 forks source link

Allow running Test Utility by function call. #37

Closed shimomut closed 2 years ago

shimomut commented 2 years ago

Description of changes:

This is a small improvement to allow running the Test Utility not only by running panorama_test_utility_run.py but by importing it and calling a function. It is useful when application developers want to run unit-tests within a single testing framework.

sample usage:

import panorama_test_utility_run

panorama_test_utility_run.test_utility_run_main([
    "--app-name", "people_counter_app",
    "--code-package-name", "PEOPLE_COUNTER_CODE",
    "--model-package-name", "SSD_MODEL",
    "--camera-node-name", "abstract_rtsp_media_sourceabstract_rtsp_media_source",
    "--model-node-name", "model_node", 
    "--model-file-basename", "./models/ssd_512_resnet50_v1_voc", 
    "--video-file", "../common/test_utility/videos/TownCentreXVID.avi", 
    "--py-file", "./people_counter_app/packages/357984623133-PEOPLE_COUNTER_CODE-1.0/src/app.py"
])

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.