Package: ocptv-ctam
Compliance Tool for Accelerator ManagementTheOCP Test & Validation Initiativeis a collaboration between datacenter hyperscalers having the goal of standardizing aspects of the hardware validation/diagnosis space, along with providing necessary tooling to enable both diagnostic developers and executors to leverage these interfaces.Specifically, theocp-diag-ctamtool provides acceptance testing for Accelerator Management in cloud data centers.This project is part ofOCPTVand exists under the sameMIT License Agreement.Getting StartedOptional: create pythonvirtual environmentand activate.python -m venv venv
source ./venv/bin/activateRunpython -m pip install -r pip-requirements.txtFor full documentation, from/docsdirectory, run./make htmlOpendocs/build/html/index.htmlfor full documentation including architecture and test case detailsTo run suite,cd ctam
python ctam.py -w ..\example_workspaceLogs will be created underexample_workspace\TestRunsTo list all test casescd ctam
python ctam.py -lTo run a specific test casecd ctam
python ctam.py -w ..\example_workspace -t <test case id>Logs will be created underexample_workspace\TestRunsTo run test cases of a specifc test groupcd ctam
python ctam.py -w ..\example_workspace -g <test group name>Logs will be created underexample_workspace\TestRunsTo run test cases with sequencecd ctam
python ctam.py -w ..\example_workspace -test_seq <test case name or id> <test case name or id>Logs will be created underexample_workspace\TestRunsTo run groups with sequencecd ctam
python ctam.py -w ..\example_workspace -group_seq <group name or id> <group name or id>Logs will be created underexample_workspace\TestRunsChoose test cases to run by using tags and specifying the tags to include/exclude in test_runner.jsonChoose test sequence in test_runner.json if you want to run it from test runner config.Log Files createdOCPTV Log file - All logs in OCPTV defined logging format.Test_Score_<>.json - All test cases result + Final score.Test_Report_<>.log - Tabulated report of test runTest_Info_<>.json - Optional log file used by test interfaces (for debug)RedfishCommandDetails/RedfishCommandDetails_<Test_ID>_ <Test_Name>_<>.json - Redfish Commands used & return values (for debug)Test Runner Knobsdebug_mode - True/False (for debug logs)console_log - True/False (for console logs)progress_bar - True/False (for progress bar idicator)Developer notesVS CodeVS Codeis not required for development, however it does have workspace configurations to assist in development.To useVS Code, open thectam.code-workspacefile.In lieu ofVS Codeusage, the following items should be configured for other editors or the developer should perform
steps manually to ensure the consistency of the code base.automatic file formatting using python black formatter on file save."--line-length", "120"Indent set to 4 spacesAuto docstring configured for sphinx, type 3 double quotes below python class or function and the documentation header is automatically stubbed out.Automatic mypy checking of codeSpell checkingUseful git extensionsUseful debugger configurations defined in launch.json, extensibleUseful Code snippets to jump start new test developmentSnippets for interfaces, test groups and test cases simplify new tests.easy replace of TODO in the snippet creates runnable test case quickly.Upcoming changesMore test casesLogging improvementsAbility to set test sequencePLDM validator, and auto creation of PLDM bundles with error injection.ContactFeel free to start a newdiscussion, or otherwise post anissue/request.An email contact is also available at:ocp-test-validation@OCP-All.groups.io