[rocprofiler-compute] Enable running tests from installation only for TheRock setup (#2067)

* Enable running tests from installation only

* Use cmake option -DTEST_FROM_INSTALL=ON to enable running tests from installation folder only
    * It is not possible to run tests from build folder in this case
    * This option prevents changing working directory to source folder

* Fix SourceFileLoader to import rocprof-compute main module correctly

* Install sample executables in the test folder

* fix num_xcds_cli_output test

* Fix tests

* Skip autogen. config. test and add a TODO task for re-design of this
  test

* Add flexible import of source code in test_gpu_specs.py

* Update cmake to install tests/workloads folder when INSTALL_TESTS=ON

* Fix sys.argv[0] for tests

* fix live attach detach test
This commit is contained in:
vedithal-amd
2025-12-04 10:12:38 -05:00
committed by GitHub
orang tua 30161885e2
melakukan 7a2df64b59
6 mengubah file dengan 92 tambahan dan 66 penghapusan
@@ -26,16 +26,11 @@
import csv
import re
import subprocess
from importlib.machinery import SourceFileLoader
from pathlib import Path
import pytest
import test_utils
rocprof_compute = SourceFileLoader(
"rocprof-compute", "src/rocprof-compute"
).load_module()
config = {}
config["vseq"] = ["./tests/vsequential_access"]
config["vrand"] = ["./tests/vrandom_access"]