e1261f20d8
* Adding python script for rocprofv3
* script update
* updating script
* Fixing script for counter collection tests
* Fixing Sanitizer issues
* Adding YAML input file support
* Fixing counter validation tests
* script modifications
* Adding missing LD_PRELOAD
* doc updates
* Adding test for yaml input
* updated yaml extension support in doc
* backward compatibility
* updating scripts
* Fixing git history rocprofv3- part1
* Fixing git history rocprofv3- part2
* Fixing rocprofv3 history final
* Rebasing PR 860 for json support
* Review comments: Parser updates
* Removed color encoding and rebasing again
* Addressing review comments
* removing globals
* Update rocprofv3.py
- update tests to conform to new argparse requirements
- added support for JSON
* Slight tweak to update_env for ROCP_OUTPUT_FORMAT
* Update rocprofv3.py
- Handle ROCPROF_PRELOAD
- Add --preload option
- Add --kernel-names option
* Update rocprofv3.py
- Fix update_env handling of prepend/append
- Tweak --preload argument
---------
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
[ROCm/rocprofiler-sdk commit: dc054eea76]
46 řádky
1008 B
Python
46 řádky
1008 B
Python
#!/usr/bin/env python3
|
|
|
|
import json
|
|
import pytest
|
|
import csv
|
|
|
|
from rocprofiler_sdk.pytest_utils.dotdict import dotdict
|
|
from rocprofiler_sdk.pytest_utils import collapse_dict_list
|
|
|
|
|
|
def pytest_addoption(parser):
|
|
parser.addoption(
|
|
"--agent-input",
|
|
action="store",
|
|
help="Path to agent info CSV file.",
|
|
)
|
|
parser.addoption(
|
|
"--counter-input",
|
|
action="store",
|
|
help="Path to counter collection CSV file.",
|
|
)
|
|
|
|
|
|
@pytest.fixture
|
|
def agent_info_input_data(request):
|
|
filename = request.config.getoption("--agent-input")
|
|
data = []
|
|
with open(filename, "r") as inp:
|
|
reader = csv.DictReader(inp)
|
|
for row in reader:
|
|
data.append(row)
|
|
|
|
return data
|
|
|
|
|
|
@pytest.fixture
|
|
def counter_input_data(request):
|
|
filename = request.config.getoption("--counter-input")
|
|
data = []
|
|
with open(filename, "r") as inp:
|
|
reader = csv.DictReader(inp)
|
|
for row in reader:
|
|
data.append(row)
|
|
|
|
return data
|