diff --git a/projects/rocprofiler-sdk/.github/workflows/code_coverage.yml b/projects/rocprofiler-sdk/.github/workflows/code_coverage.yml new file mode 100644 index 0000000000..cdb4512b9f --- /dev/null +++ b/projects/rocprofiler-sdk/.github/workflows/code_coverage.yml @@ -0,0 +1,332 @@ +name: Code Coverage + +permissions: + contents: read + pull-requests: write + +on: + workflow_dispatch: + push: + branches: [ amd-staging, amd-mainline ] + paths-ignore: + - '*.md' + - '**/README.md' + - 'source/docs/**' + - 'CODEOWNERS' + pull_request: + paths-ignore: + - '*.md' + - '**/README.md' + - 'source/docs/**' + - 'CODEOWNERS' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + # TODO(jrmadsen): replace LD_RUNPATH_FLAG, GPU_TARGETS, etc. with internal handling in cmake + ROCM_PATH: "/opt/rocm" + GPU_TARGETS: "gfx900 gfx906 gfx908 gfx90a gfx940 gfx941 gfx942 gfx950 gfx1030 gfx1100 gfx1101 gfx1102 gfx1201" + PATH: "/usr/bin:$PATH" + ## No tests should be excluded here except for extreme emergencies; tests should only be disabled in CMake + ## A task should be assigned directly to fix the issue + ## Scratch memory tests need to be fixed for ROCm 7.0 release + navi3_EXCLUDE_TESTS_REGEX: "" + vega20_EXCLUDE_TESTS_REGEX: "" + mi200_EXCLUDE_TESTS_REGEX: "" + mi300_EXCLUDE_TESTS_REGEX: "" + mi300a_EXCLUDE_TESTS_REGEX: "" + mi325_EXCLUDE_TESTS_REGEX: "" + mi3xx_EXCLUDE_TESTS_REGEX: "" + navi4_EXCLUDE_TESTS_REGEX: "" + navi3_EXCLUDE_LABEL_REGEX: "" + vega20_EXCLUDE_LABEL_REGEX: "" + mi200_EXCLUDE_LABEL_REGEX: "" + mi300_EXCLUDE_LABEL_REGEX: "" + mi300a_EXCLUDE_LABEL_REGEX: "" + mi325_EXCLUDE_LABEL_REGEX: "" + mi3xx_EXCLUDE_LABEL_REGEX: "" + navi4_EXCLUDE_LABEL_REGEX: "" + GLOBAL_CMAKE_OPTIONS: "" + +jobs: + code-coverage: + if: ${{ contains(github.event_name, 'pull_request') }} + strategy: + # fail-fast: false + matrix: + runner: ['rocprof-azure'] + os: ['ubuntu-22.04'] + build-type: ['Release'] + + runs-on: ${{ matrix.runner }}-emu-runner-set + + # define this for containers + env: + GIT_DISCOVERY_ACROSS_FILESYSTEM: 1 + GCC_COMPILER_VERSION: 11 + ROCPROFILER_PC_SAMPLING_BETA_ENABLED: 1 + + steps: + - uses: actions/checkout@v4 + with: + submodules: true + + - name: Load Existing XML Code Coverage + if: github.event_name == 'pull_request' + id: load-coverage + uses: actions/cache@v4 + with: + key: ${{ github.event.pull_request.base.sha }}-codecov + path: .codecov/** + + - name: Copy Existing XML Code Coverage + if: github.event_name == 'pull_request' + shell: bash + run: | + if [ -d .codecov ]; then cp -r .codecov .codecov.ref; fi + + - name: Configure Env + shell: bash + run: | + echo "${PATH}:/usr/local/bin:${HOME}/.local/bin" >> $GITHUB_PATH + echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib:${HOME}/.local/lib" >> $GITHUB_ENV + + - name: Install requirements + timeout-minutes: 10 + shell: bash + run: | + git config --global --add safe.directory '*' + apt-get update + apt-get install -y build-essential cmake python3-pip gcovr wkhtmltopdf xvfb xfonts-base xfonts-75dpi xfonts-100dpi xfonts-utils xfonts-encodings libfontconfig libdw-dev libsqlite3-dev + python3 -m pip install -U --user -r requirements.txt + rm -rf /opt/rocm/lib/*rocprofiler-sdk* /opt/rocm/lib/cmake/*rocprofiler-sdk* /opt/rocm/share/*rocprofiler-sdk* /opt/rocm/libexec/*rocprofiler-sdk* + + - name: Sync gcov with compilers + timeout-minutes: 10 + shell: bash + run: + apt-get install -y gcc-${{ env.GCC_COMPILER_VERSION }} g++-${{ env.GCC_COMPILER_VERSION }} && + update-alternatives + --install /usr/bin/gcc gcc /usr/bin/gcc-${{ env.GCC_COMPILER_VERSION }} 500 + --slave /usr/bin/g++ g++ /usr/bin/g++-${{ env.GCC_COMPILER_VERSION }} + --slave /usr/bin/gcov gcov /usr/bin/gcov-${{ env.GCC_COMPILER_VERSION }} + + - name: List Files + shell: bash + run: | + echo "PATH: ${PATH}" + echo "LD_LIBRARY_PATH: ${LD_LIBRARY_PATH}" + which-realpath() { echo -e "\n$1 resolves to $(realpath $(which $1))"; echo "$($(which $1) --version &> /dev/stdout | head -n 1)"; } + for i in python3 git cmake ctest gcc g++ gcov; do which-realpath $i; done + cat /opt/rocm/.info/version + ls -la + + - name: Enable PC Sampling + if: ${{ contains(matrix.runner, 'mi200') || contains(matrix.runner, 'mi300a') }} + shell: bash + run: | + echo 'ROCPROFILER_PC_SAMPLING_BETA_ENABLED=1' >> $GITHUB_ENV + + - name: Configure, Build, and Test (Total Code Coverage) + timeout-minutes: 30 + shell: bash + run: + python3 ./source/scripts/run-ci.py -B build + --name ${{ github.repository }}-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.runner }}-codecov + --build-jobs 16 + --site ${RUNNER_HOSTNAME} + --gpu-targets ${{ env.GPU_TARGETS }} + --coverage all + --run-attempt ${{ github.run_attempt }} + -- + -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} + -DPython3_EXECUTABLE=$(which python3) + ${{ env.GLOBAL_CMAKE_OPTIONS }} + -- + -LE "${${{ matrix.runner }}_EXCLUDE_LABEL_REGEX}" + -E "${${{ matrix.runner }}_EXCLUDE_TESTS_REGEX}" + + - name: Configure, Build, and Test (Tests Code Coverage) + timeout-minutes: 30 + shell: bash + run: + find build -type f | egrep '\.gcda$' | xargs rm && + python3 ./source/scripts/run-ci.py -B build + --name ${{ github.repository }}-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.runner }}-codecov-tests + --build-jobs 16 + --site ${RUNNER_HOSTNAME} + --gpu-targets ${{ env.GPU_TARGETS }} + --coverage tests + --run-attempt ${{ github.run_attempt }} + -- + -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} + -DPython3_EXECUTABLE=$(which python3) + ${{ env.GLOBAL_CMAKE_OPTIONS }} + -- + -LE "${${{ matrix.runner }}_EXCLUDE_LABEL_REGEX}" + -E "${${{ matrix.runner }}_EXCLUDE_TESTS_REGEX}" + + - name: Configure, Build, and Test (Samples Code Coverage) + timeout-minutes: 30 + shell: bash + run: + find build -type f | egrep '\.gcda$' | xargs rm && + python3 ./source/scripts/run-ci.py -B build + --name ${{ github.repository }}-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.runner }}-codecov-samples + --build-jobs 16 + --site ${RUNNER_HOSTNAME} + --gpu-targets ${{ env.GPU_TARGETS }} + --coverage samples + --run-attempt ${{ github.run_attempt }} + -- + -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} + -DPython3_EXECUTABLE=$(which python3) + ${{ env.GLOBAL_CMAKE_OPTIONS }} + -- + -LE "${${{ matrix.runner }}_EXCLUDE_LABEL_REGEX}" + -E "${${{ matrix.runner }}_EXCLUDE_TESTS_REGEX}" + + - name: Save XML Code Coverage + id: save-coverage + uses: actions/cache/save@v4 + with: + key: ${{ github.sha }}-codecov + path: | + .codecov/*.xml + + - id: generatereport + name: Generate Code Coverage Comment + if: github.event_name == 'pull_request' + timeout-minutes: 5 + shell: bash + run: | + echo "PWD: ${PWD}" + ls -la + + for i in "all" "tests" "samples"; do + wkhtmltoimage --enable-local-file-access --quality 70 .codecov/${i}.html .codecov/${i}.png + done + ls -la .codecov + which -a git + git --version + + ./source/scripts/upload-image-to-github.py --bot --token ${{ secrets.TOKEN }} --files .codecov/{all,tests,samples}.png --output-dir .codecov --name pr-${{ github.event.pull_request.number }} + + echo -e "\n${PWD}:" + ls -la . + + echo -e "\n.codecov:" + ls -la .codecov + + get-base-md-contents() { cat .codecov/${1}.png.md; } + get-full-md-contents() { cat .codecov/${1}.png.md .codecov/${1}.md; } + cat << EOF > .codecov/report.md + # Code Coverage Report + + ## Tests Only + $(get-base-md-contents tests) + + ## Samples Only + $(get-base-md-contents samples) + + ## Tests + Samples + $(get-base-md-contents all) + + + EOF + + echo 'CODECOVERAGE_REPORT< $GITHUB_OUTPUT + cat .codecov/report.md >> $GITHUB_OUTPUT + echo 'EOF' >> $GITHUB_OUTPUT + + - name: Write Code Coverage Comment + if: github.event_name == 'pull_request' + timeout-minutes: 5 + uses: actions/github-script@v6 + env: + COMMENT_BODY: | +
+

Code Coverage Report

+ + + ${{ steps.generatereport.outputs.CODECOVERAGE_REPORT }} +
+ with: + github-token: ${{ secrets.TOKEN }} + script: | + const commentIdentifier = ''; // Used to identify codecov comment + const commentBody = process.env.COMMENT_BODY; + + // Fetch existing comments + const { data: comments } = await github.rest.issues.listComments({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.pull_request.number, + }); + + // Check for an existing comment + const existingComment = comments.find(comment => comment.body.includes(commentIdentifier)); + + if (existingComment) { + // Update the existing comment + await github.rest.issues.updateComment({ + owner: context.repo.owner, + repo: context.repo.repo, + comment_id: existingComment.id, + body: commentBody, + }); + core.info(`Updated comment with ID: ${existingComment.id}`); + } else { + // Create a new comment + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.pull_request.number, + body: commentBody, + }); + core.info('Created a new comment.'); + } + + - name: Archive Code Coverage Data + if: ${{ github.event_name == 'workflow_dispatch' }} + uses: actions/upload-artifact@v4 + with: + name: code-coverage-details + path: | + ${{github.workspace}}/.codecov/* + + - name: Verify Test Labels + timeout-minutes: 5 + shell: bash + run: | + pushd build + # + # if following fails, there is a test that does not have + # a label identifying it as sample or test (unit or integration). + # Recommended labels are: + # - samples + # - unittests + # - integration-tests + # + ctest -N -LE 'samples|tests' -E "${${{ matrix.runner }}_EXCLUDE_TESTS_REGEX}" -O ctest.mislabeled.log + grep 'Total Tests: 0' ctest.mislabeled.log + # + # if following fails, then there is overlap between the labels. + # A test cannot both be a sample and (unit/integration) test. + # + ctest -N -O ctest.all.log + ctest -N -O ctest.samples.log -L samples + ctest -N -O ctest.tests.log -L tests + NUM_ALL=$(grep 'Total Tests:' ctest.all.log | awk '{print $NF}') + NUM_SAMPLE=$(grep 'Total Tests:' ctest.samples.log | awk '{print $NF}') + NUM_TEST=$(grep 'Total Tests:' ctest.tests.log | awk '{print $NF}') + NUM_SUM=$((${NUM_SAMPLE} + ${NUM_TEST})) + echo "Total tests: ${NUM_ALL}" + echo "Total labeled tests: ${NUM_SUM}" + if [ ${NUM_ALL} != ${NUM_SUM} ]; then + echo "Test label overlap" + exit 1 + fi + popd diff --git a/projects/rocprofiler-sdk/.github/workflows/continuous_integration.yml b/projects/rocprofiler-sdk/.github/workflows/continuous_integration.yml index 5832408763..7591d73d07 100644 --- a/projects/rocprofiler-sdk/.github/workflows/continuous_integration.yml +++ b/projects/rocprofiler-sdk/.github/workflows/continuous_integration.yml @@ -28,22 +28,22 @@ env: ## No tests should be excluded here except for extreme emergencies; tests should only be disabled in CMake ## A task should be assigned directly to fix the issue ## Scratch memory tests need to be fixed for ROCm 7.0 release - navi3_EXCLUDE_TESTS_REGEX: "scratch-memory" - vega20_EXCLUDE_TESTS_REGEX: "scratch-memory" - mi200_EXCLUDE_TESTS_REGEX: "scratch-memory" - mi300_EXCLUDE_TESTS_REGEX: "counter-collection-buffer|scratch-memory" - mi300a_EXCLUDE_TESTS_REGEX: "scratch-memory" - mi325_EXCLUDE_TESTS_REGEX: "counter-collection-buffer|scratch-memory" - mi3xx_EXCLUDE_TESTS_REGEX: "counter-collection-buffer|scratch-memory" - navi4_EXCLUDE_TESTS_REGEX: "scratch-memory" - navi3_EXCLUDE_LABEL_REGEX: "^(pc-sampling)$" - vega20_EXCLUDE_LABEL_REGEX: "^(pc-sampling)$" - mi200_EXCLUDE_LABEL_REGEX: "^(stochastic)$" - mi300_EXCLUDE_LABEL_REGEX: "^(pc-sampling)$" + navi3_EXCLUDE_TESTS_REGEX: "" + vega20_EXCLUDE_TESTS_REGEX: "" + mi200_EXCLUDE_TESTS_REGEX: "" + mi300_EXCLUDE_TESTS_REGEX: "" + mi300a_EXCLUDE_TESTS_REGEX: "" + mi325_EXCLUDE_TESTS_REGEX: "" + mi3xx_EXCLUDE_TESTS_REGEX: "" + navi4_EXCLUDE_TESTS_REGEX: "" + navi3_EXCLUDE_LABEL_REGEX: "" + vega20_EXCLUDE_LABEL_REGEX: "" + mi200_EXCLUDE_LABEL_REGEX: "" + mi300_EXCLUDE_LABEL_REGEX: "" mi300a_EXCLUDE_LABEL_REGEX: "" - mi325_EXCLUDE_LABEL_REGEX: "^(pc-sampling)$" - mi3xx_EXCLUDE_LABEL_REGEX: "^(pc-sampling)$" - navi4_EXCLUDE_LABEL_REGEX: "^(pc-sampling)$" + mi325_EXCLUDE_LABEL_REGEX: "" + mi3xx_EXCLUDE_LABEL_REGEX: "" + navi4_EXCLUDE_LABEL_REGEX: "" GLOBAL_CMAKE_OPTIONS: "" jobs: @@ -251,293 +251,6 @@ jobs: -LE "${${{ matrix.runner }}_EXCLUDE_LABEL_REGEX}" -E "${${{ matrix.runner }}_EXCLUDE_TESTS_REGEX}" - code-coverage: - if: ${{ contains(github.event_name, 'pull_request') }} - strategy: - # fail-fast: false - matrix: - runner: ['mi300a'] - os: ['ubuntu-22.04'] - build-type: ['Release'] - - runs-on: ${{ matrix.runner }}-emu-runner-set - - # define this for containers - env: - GIT_DISCOVERY_ACROSS_FILESYSTEM: 1 - GCC_COMPILER_VERSION: 11 - ROCPROFILER_PC_SAMPLING_BETA_ENABLED: 1 - - steps: - - name: Patch Git - timeout-minutes: 25 - run: | - apt-get update - apt-get install -y software-properties-common - add-apt-repository -y ppa:git-core/ppa - apt-get update - apt-get install -y git - - - uses: actions/checkout@v4 - - - name: Load Existing XML Code Coverage - if: github.event_name == 'pull_request' - id: load-coverage - uses: actions/cache@v4 - with: - key: ${{ github.event.pull_request.base.sha }}-codecov - path: .codecov/** - - - name: Copy Existing XML Code Coverage - if: github.event_name == 'pull_request' - shell: bash - run: | - if [ -d .codecov ]; then cp -r .codecov .codecov.ref; fi - - - name: Configure Env - shell: bash - run: | - echo "${PATH}:/usr/local/bin:${HOME}/.local/bin" >> $GITHUB_PATH - echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib:${HOME}/.local/lib" >> $GITHUB_ENV - - - name: Install requirements - timeout-minutes: 10 - shell: bash - run: | - git config --global --add safe.directory '*' - apt-get update - apt-get install -y build-essential cmake python3-pip gcovr wkhtmltopdf xvfb xfonts-base xfonts-75dpi xfonts-100dpi xfonts-utils xfonts-encodings libfontconfig libdw-dev libsqlite3-dev - python3 -m pip install -U --user -r requirements.txt - rm -rf /opt/rocm/lib/*rocprofiler-sdk* /opt/rocm/lib/cmake/*rocprofiler-sdk* /opt/rocm/share/*rocprofiler-sdk* /opt/rocm/libexec/*rocprofiler-sdk* - - - name: Sync gcov with compilers - timeout-minutes: 10 - shell: bash - run: - apt-get install -y gcc-${{ env.GCC_COMPILER_VERSION }} g++-${{ env.GCC_COMPILER_VERSION }} && - update-alternatives - --install /usr/bin/gcc gcc /usr/bin/gcc-${{ env.GCC_COMPILER_VERSION }} 500 - --slave /usr/bin/g++ g++ /usr/bin/g++-${{ env.GCC_COMPILER_VERSION }} - --slave /usr/bin/gcov gcov /usr/bin/gcov-${{ env.GCC_COMPILER_VERSION }} - - - name: List Files - shell: bash - run: | - echo "PATH: ${PATH}" - echo "LD_LIBRARY_PATH: ${LD_LIBRARY_PATH}" - which-realpath() { echo -e "\n$1 resolves to $(realpath $(which $1))"; echo "$($(which $1) --version &> /dev/stdout | head -n 1)"; } - for i in python3 git cmake ctest gcc g++ gcov; do which-realpath $i; done - cat /opt/rocm/.info/version - ls -la - - - name: Enable PC Sampling - if: ${{ contains(matrix.runner, 'mi200') || contains(matrix.runner, 'mi300a') }} - shell: bash - run: | - echo 'ROCPROFILER_PC_SAMPLING_BETA_ENABLED=1' >> $GITHUB_ENV - - - name: Configure, Build, and Test (Total Code Coverage) - timeout-minutes: 30 - shell: bash - run: - python3 ./source/scripts/run-ci.py -B build - --name ${{ github.repository }}-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.runner }}-codecov - --build-jobs 16 - --site ${RUNNER_HOSTNAME} - --gpu-targets ${{ env.GPU_TARGETS }} - --coverage all - --run-attempt ${{ github.run_attempt }} - -- - -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} - -DPython3_EXECUTABLE=$(which python3) - ${{ env.GLOBAL_CMAKE_OPTIONS }} - -- - -LE "${${{ matrix.runner }}_EXCLUDE_LABEL_REGEX}" - -E "${${{ matrix.runner }}_EXCLUDE_TESTS_REGEX}" - - - name: Configure, Build, and Test (Tests Code Coverage) - timeout-minutes: 30 - shell: bash - run: - find build -type f | egrep '\.gcda$' | xargs rm && - python3 ./source/scripts/run-ci.py -B build - --name ${{ github.repository }}-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.runner }}-codecov-tests - --build-jobs 16 - --site ${RUNNER_HOSTNAME} - --gpu-targets ${{ env.GPU_TARGETS }} - --coverage tests - --run-attempt ${{ github.run_attempt }} - -- - -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} - -DPython3_EXECUTABLE=$(which python3) - ${{ env.GLOBAL_CMAKE_OPTIONS }} - -- - -LE "${${{ matrix.runner }}_EXCLUDE_LABEL_REGEX}" - -E "${${{ matrix.runner }}_EXCLUDE_TESTS_REGEX}" - - - name: Configure, Build, and Test (Samples Code Coverage) - timeout-minutes: 30 - shell: bash - run: - find build -type f | egrep '\.gcda$' | xargs rm && - python3 ./source/scripts/run-ci.py -B build - --name ${{ github.repository }}-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.runner }}-codecov-samples - --build-jobs 16 - --site ${RUNNER_HOSTNAME} - --gpu-targets ${{ env.GPU_TARGETS }} - --coverage samples - --run-attempt ${{ github.run_attempt }} - -- - -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} - -DPython3_EXECUTABLE=$(which python3) - ${{ env.GLOBAL_CMAKE_OPTIONS }} - -- - -LE "${${{ matrix.runner }}_EXCLUDE_LABEL_REGEX}" - -E "${${{ matrix.runner }}_EXCLUDE_TESTS_REGEX}" - - - name: Save XML Code Coverage - id: save-coverage - uses: actions/cache/save@v4 - with: - key: ${{ github.sha }}-codecov - path: | - .codecov/*.xml - - - id: generatereport - name: Generate Code Coverage Comment - if: github.event_name == 'pull_request' - timeout-minutes: 5 - shell: bash - run: | - echo "PWD: ${PWD}" - ls -la - - for i in "all" "tests" "samples"; do - wkhtmltoimage --enable-local-file-access --quality 70 .codecov/${i}.html .codecov/${i}.png - done - ls -la .codecov - which -a git - git --version - - ./source/scripts/upload-image-to-github.py --bot --token ${{ secrets.TOKEN }} --files .codecov/{all,tests,samples}.png --output-dir .codecov --name pr-${{ github.event.pull_request.number }} - - echo -e "\n${PWD}:" - ls -la . - - echo -e "\n.codecov:" - ls -la .codecov - - get-base-md-contents() { cat .codecov/${1}.png.md; } - get-full-md-contents() { cat .codecov/${1}.png.md .codecov/${1}.md; } - cat << EOF > .codecov/report.md - # Code Coverage Report - - ## Tests Only - $(get-base-md-contents tests) - - ## Samples Only - $(get-base-md-contents samples) - - ## Tests + Samples - $(get-base-md-contents all) - - - EOF - - echo 'CODECOVERAGE_REPORT< $GITHUB_OUTPUT - cat .codecov/report.md >> $GITHUB_OUTPUT - echo 'EOF' >> $GITHUB_OUTPUT - - - name: Write Code Coverage Comment - if: github.event_name == 'pull_request' - timeout-minutes: 5 - uses: actions/github-script@v6 - env: - COMMENT_BODY: | -
-

Code Coverage Report

- - - ${{ steps.generatereport.outputs.CODECOVERAGE_REPORT }} -
- with: - github-token: ${{ secrets.TOKEN }} - script: | - const commentIdentifier = ''; // Used to identify codecov comment - const commentBody = process.env.COMMENT_BODY; - - // Fetch existing comments - const { data: comments } = await github.rest.issues.listComments({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.payload.pull_request.number, - }); - - // Check for an existing comment - const existingComment = comments.find(comment => comment.body.includes(commentIdentifier)); - - if (existingComment) { - // Update the existing comment - await github.rest.issues.updateComment({ - owner: context.repo.owner, - repo: context.repo.repo, - comment_id: existingComment.id, - body: commentBody, - }); - core.info(`Updated comment with ID: ${existingComment.id}`); - } else { - // Create a new comment - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.payload.pull_request.number, - body: commentBody, - }); - core.info('Created a new comment.'); - } - - - name: Archive Code Coverage Data - if: ${{ github.event_name == 'workflow_dispatch' }} - uses: actions/upload-artifact@v4 - with: - name: code-coverage-details - path: | - ${{github.workspace}}/.codecov/* - - - name: Verify Test Labels - timeout-minutes: 5 - shell: bash - run: | - pushd build - # - # if following fails, there is a test that does not have - # a label identifying it as sample or test (unit or integration). - # Recommended labels are: - # - samples - # - unittests - # - integration-tests - # - ctest -N -LE 'samples|tests' -E "${${{ matrix.runner }}_EXCLUDE_TESTS_REGEX}" -O ctest.mislabeled.log - grep 'Total Tests: 0' ctest.mislabeled.log - # - # if following fails, then there is overlap between the labels. - # A test cannot both be a sample and (unit/integration) test. - # - ctest -N -O ctest.all.log - ctest -N -O ctest.samples.log -L samples - ctest -N -O ctest.tests.log -L tests - NUM_ALL=$(grep 'Total Tests:' ctest.all.log | awk '{print $NF}') - NUM_SAMPLE=$(grep 'Total Tests:' ctest.samples.log | awk '{print $NF}') - NUM_TEST=$(grep 'Total Tests:' ctest.tests.log | awk '{print $NF}') - NUM_SUM=$((${NUM_SAMPLE} + ${NUM_TEST})) - echo "Total tests: ${NUM_ALL}" - echo "Total labeled tests: ${NUM_SUM}" - if [ ${NUM_ALL} != ${NUM_SUM} ]; then - echo "Test label overlap" - exit 1 - fi - popd - sanitizers: strategy: fail-fast: false diff --git a/projects/rocprofiler-sdk/cmake/rocprofiler_options.cmake b/projects/rocprofiler-sdk/cmake/rocprofiler_options.cmake index cbc17a961d..08d1032635 100644 --- a/projects/rocprofiler-sdk/cmake/rocprofiler_options.cmake +++ b/projects/rocprofiler-sdk/cmake/rocprofiler_options.cmake @@ -156,5 +156,9 @@ include(rocprofiler_memcheck) # default FAIL_REGULAR_EXPRESSION for tests set(ROCPROFILER_DEFAULT_FAIL_REGEX - "threw an exception|Permission denied|Could not create logging file|failed with error code" + "threw an exception|Permission denied|Could not create logging file|failed with error code|Subprocess aborted" CACHE INTERNAL "Default FAIL_REGULAR_EXPRESSION for tests" FORCE) + +# this should be defaulted to OFF by ROCm 7.0.1 or 7.1 this should only used to disable +# sample tests in extreme circumstances +option(ROCPROFILER_DISABLE_UNSTABLE_CTESTS "Disable unstable tests" ON) diff --git a/projects/rocprofiler-sdk/samples/CMakeLists.txt b/projects/rocprofiler-sdk/samples/CMakeLists.txt index fcf1270e8a..b2f2e9633a 100644 --- a/projects/rocprofiler-sdk/samples/CMakeLists.txt +++ b/projects/rocprofiler-sdk/samples/CMakeLists.txt @@ -21,6 +21,10 @@ include(GNUInstallDirs) # always use lib instead of lib64 set(CMAKE_INSTALL_LIBDIR "lib") +# this should be defaulted to OFF by ROCm 7.0.1 or 7.1 this should only used to disable +# sample tests in extreme circumstances +option(ROCPROFILER_DISABLE_UNSTABLE_CTESTS "Disable unstable tests" ON) + enable_testing() include(CTest) diff --git a/projects/rocprofiler-sdk/samples/common/CMakeLists.txt b/projects/rocprofiler-sdk/samples/common/CMakeLists.txt index 12e61616fb..a8f8a1977b 100644 --- a/projects/rocprofiler-sdk/samples/common/CMakeLists.txt +++ b/projects/rocprofiler-sdk/samples/common/CMakeLists.txt @@ -9,7 +9,7 @@ find_package(libdw REQUIRED) # default FAIL_REGULAR_EXPRESSION for tests set(ROCPROFILER_DEFAULT_FAIL_REGEX - "threw an exception|Permission denied|Could not create logging file|failed with error code" + "threw an exception|Permission denied|Could not create logging file|failed with error code|Subprocess aborted" CACHE INTERNAL "Default FAIL_REGULAR_EXPRESSION for tests") # build flags diff --git a/projects/rocprofiler-sdk/samples/counter_collection/CMakeLists.txt b/projects/rocprofiler-sdk/samples/counter_collection/CMakeLists.txt index 3f124e0bd2..8eb1af1efd 100644 --- a/projects/rocprofiler-sdk/samples/counter_collection/CMakeLists.txt +++ b/projects/rocprofiler-sdk/samples/counter_collection/CMakeLists.txt @@ -55,9 +55,16 @@ add_test(NAME counter-collection-buffer COMMAND $sa_flags & SA_SIGINFO) == SA_SIGINFO && - _chained.action->sa_sigaction) + _chained.action->sa_sigaction && + _chained.action->sa_sigaction != &rocprofv3_error_signal_handler) { - ROCP_TRACE << fmt::format( + ROCP_WARNING << fmt::format( "[PPID={}][PID={}][TID={}][{}] rocprofv3 found chained signal handler for " "{}... executing chained sigaction (SIGINFO)", this_ppid, @@ -2861,7 +2865,7 @@ rocprofv3_error_signal_handler(int signo, siginfo_t* info, void* ucontext) _chained.action->sa_handler && _chained.action->sa_sigaction != &rocprofv3_error_signal_handler) { - ROCP_TRACE << fmt::format( + ROCP_WARNING << fmt::format( "[PPID={}][PID={}][TID={}][{}] rocprofv3 found chained signal handler for " "{}... executing chained sigaction (HANDLER)", this_ppid, @@ -2876,7 +2880,7 @@ rocprofv3_error_signal_handler(int signo, siginfo_t* info, void* ucontext) { if(_chained.handler) { - ROCP_TRACE << fmt::format( + ROCP_WARNING << fmt::format( "[PPID={}][PID={}][TID={}][{}] rocprofv3 found chained signal handler for " "{}... executing chained handler", this_ppid, diff --git a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/counters/tests/CMakeLists.txt b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/counters/tests/CMakeLists.txt index fefca834b8..66fd9efa5b 100644 --- a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/counters/tests/CMakeLists.txt +++ b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/counters/tests/CMakeLists.txt @@ -96,6 +96,12 @@ set_tests_properties( "Running non-intercept test(.*)could not be locked for profiling due to lack of permissions.*" ) +# unstable counter collection test: Generates HW exception leading to GPU hang or memory +# access fault +set_tests_properties( + device_counting_service_test.sync_counters device_counting_service_test.async_counters + PROPERTIES DISABLED "${ROCPROFILER_DISABLE_UNSTABLE_CTESTS}") + set(ROCPROFILER_LIB_CONSUMER_TEST_SOURCES consumer_test.cpp) add_executable(consumer-test) diff --git a/projects/rocprofiler-sdk/source/scripts/thread-sanitizer-suppr.txt b/projects/rocprofiler-sdk/source/scripts/thread-sanitizer-suppr.txt index 83d4dcd368..0a235d7f6d 100644 --- a/projects/rocprofiler-sdk/source/scripts/thread-sanitizer-suppr.txt +++ b/projects/rocprofiler-sdk/source/scripts/thread-sanitizer-suppr.txt @@ -34,3 +34,6 @@ mutex:source/lib/common/synchronized.hpp # signal-unsafe function called from signal handler signal:rocprofv3_error_signal_handler + +# data race within perfetto internals +race:perfetto::internal:: diff --git a/projects/rocprofiler-sdk/tests/CMakeLists.txt b/projects/rocprofiler-sdk/tests/CMakeLists.txt index 988379f596..dcdc3f410e 100644 --- a/projects/rocprofiler-sdk/tests/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/CMakeLists.txt @@ -26,6 +26,10 @@ set(CMAKE_HIP_STANDARD 17) set(CMAKE_HIP_EXTENSIONS OFF) set(CMAKE_HIP_STANDARD_REQUIRED ON) +# this should be defaulted to OFF by ROCm 7.0.1 or 7.1 this should only used to disable +# tests in extreme circumstances +option(ROCPROFILER_DISABLE_UNSTABLE_CTESTS "Disable unstable tests" ON) + enable_testing() include(CTest) diff --git a/projects/rocprofiler-sdk/tests/bin/reproducible-runtime/reproducible-runtime.cpp b/projects/rocprofiler-sdk/tests/bin/reproducible-runtime/reproducible-runtime.cpp index e3003688b7..df003f72ec 100644 --- a/projects/rocprofiler-sdk/tests/bin/reproducible-runtime/reproducible-runtime.cpp +++ b/projects/rocprofiler-sdk/tests/bin/reproducible-runtime/reproducible-runtime.cpp @@ -59,7 +59,7 @@ namespace using auto_lock_t = std::unique_lock; auto print_lock = std::mutex{}; double nruntime = 500.0; // ms -uint32_t nspin = 128 * 10000; +uint32_t nspin = 128 * 5000; size_t nthreads = 2; void diff --git a/projects/rocprofiler-sdk/tests/common/CMakeLists.txt b/projects/rocprofiler-sdk/tests/common/CMakeLists.txt index 0694811f88..7e3c26b1d9 100644 --- a/projects/rocprofiler-sdk/tests/common/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/common/CMakeLists.txt @@ -9,7 +9,7 @@ set(FETCHCONTENT_BASE_DIR ${PROJECT_BINARY_DIR}/external) # default FAIL_REGULAR_EXPRESSION for tests set(ROCPROFILER_DEFAULT_FAIL_REGEX - "threw an exception|Permission denied|Could not create logging file|failed with error code" + "threw an exception|Permission denied|Could not create logging file|failed with error code|Subprocess aborted" CACHE INTERNAL "Default FAIL_REGULAR_EXPRESSION for tests") set(DEFAULT_GPU_TARGETS diff --git a/projects/rocprofiler-sdk/tests/counter-collection/CMakeLists.txt b/projects/rocprofiler-sdk/tests/counter-collection/CMakeLists.txt index eedcf18445..6e1f9c434b 100644 --- a/projects/rocprofiler-sdk/tests/counter-collection/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/counter-collection/CMakeLists.txt @@ -25,9 +25,18 @@ add_test(NAME test-counter-collection-execute COMMAND $ set_tests_properties( test-counter-collection-execute - PROPERTIES TIMEOUT 45 LABELS "integration-tests" ENVIRONMENT - "${counter-collection-env}" FAIL_REGULAR_EXPRESSION - "${ROCPROFILER_DEFAULT_FAIL_REGEX}") + PROPERTIES TIMEOUT + 45 + LABELS + "integration-tests" + ENVIRONMENT + "${counter-collection-env}" + FAIL_REGULAR_EXPRESSION + "${ROCPROFILER_DEFAULT_FAIL_REGEX}" + DISABLED + "${ROCPROFILER_DISABLE_UNSTABLE_CTESTS}" + FIXTURES_SETUP + test-counter-collection) # copy to binary directory rocprofiler_configure_pytest_files(COPY validate.py conftest.py CONFIG pytest.ini) @@ -38,6 +47,15 @@ add_test(NAME test-counter-collection-validate set_tests_properties( test-counter-collection-validate - PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS - test-counter-collection-execute FAIL_REGULAR_EXPRESSION - "${ROCPROFILER_DEFAULT_FAIL_REGEX}") + PROPERTIES TIMEOUT + 45 + LABELS + "integration-tests" + DEPENDS + test-counter-collection-execute + FAIL_REGULAR_EXPRESSION + "${ROCPROFILER_DEFAULT_FAIL_REGEX}" + DISABLED + "${ROCPROFILER_DISABLE_UNSTABLE_CTESTS}" + FIXTURES_REQUIRED + test-counter-collection) diff --git a/projects/rocprofiler-sdk/tests/kernel-tracing/CMakeLists.txt b/projects/rocprofiler-sdk/tests/kernel-tracing/CMakeLists.txt index 5363702bad..4703725e19 100644 --- a/projects/rocprofiler-sdk/tests/kernel-tracing/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/kernel-tracing/CMakeLists.txt @@ -32,8 +32,16 @@ set(kernel-tracing-env set_tests_properties( test-kernel-tracing-execute - PROPERTIES TIMEOUT 100 LABELS "integration-tests" ENVIRONMENT "${kernel-tracing-env}" - FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}") + PROPERTIES TIMEOUT + 100 + LABELS + "integration-tests" + ENVIRONMENT + "${kernel-tracing-env}" + FAIL_REGULAR_EXPRESSION + "${ROCPROFILER_DEFAULT_FAIL_REGEX}" + FIXTURES_SETUP + kernel-tracing) # copy to binary directory rocprofiler_configure_pytest_files(COPY validate.py conftest.py CONFIG pytest.ini) @@ -45,5 +53,13 @@ add_test( set_tests_properties( test-kernel-tracing-validate - PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS test-kernel-tracing-execute - FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}") + PROPERTIES TIMEOUT + 45 + LABELS + "integration-tests" + DEPENDS + test-kernel-tracing-execute + FAIL_REGULAR_EXPRESSION + "${ROCPROFILER_DEFAULT_FAIL_REGEX}" + FIXTURES_REQUIRED + kernel-tracing) diff --git a/projects/rocprofiler-sdk/tests/rocprofv3/advanced-thread-trace/CMakeLists.txt b/projects/rocprofiler-sdk/tests/rocprofv3/advanced-thread-trace/CMakeLists.txt index b06f349575..d48dc04315 100644 --- a/projects/rocprofiler-sdk/tests/rocprofv3/advanced-thread-trace/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/rocprofv3/advanced-thread-trace/CMakeLists.txt @@ -109,13 +109,6 @@ add_test( --code-object-input ${CMAKE_CURRENT_BINARY_DIR} --output-path ${CMAKE_CURRENT_BINARY_DIR}/hsa_code_object_testapp-trace/json_input) -set(MULTIQUEUE_CMD_VALIDATION_FILES - ${CMAKE_CURRENT_BINARY_DIR}/hsa_code_object_testapp-trace/cmd_input/out_results.json) - -set(MULTIQUEUE_JSON_VALIDATION_FILES - ${CMAKE_CURRENT_BINARY_DIR}/hsa_code_object_testapp-trace/json_input/pass_1/out_results.json - ) - set_tests_properties( rocprofv3-test-hsa-multiqueue-att-cmd-validate PROPERTIES TIMEOUT diff --git a/projects/rocprofiler-sdk/tests/rocprofv3/agent-index/CMakeLists.txt b/projects/rocprofiler-sdk/tests/rocprofv3/agent-index/CMakeLists.txt index 48e248856a..750c33b39a 100644 --- a/projects/rocprofiler-sdk/tests/rocprofv3/agent-index/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/rocprofv3/agent-index/CMakeLists.txt @@ -106,19 +106,6 @@ foreach(i RANGE 0 ${validate_test_length}) ${CMAKE_CURRENT_BINARY_DIR}/transpose-agent-index-absolute/out_results.json) endforeach() -set(VALIDATION_FILES - ${CMAKE_CURRENT_BINARY_DIR}/transpose-agent-index-absolute/out_results.json - ${CMAKE_CURRENT_BINARY_DIR}/transpose-agent-index-absolute/out_kernel_trace.csv - ${CMAKE_CURRENT_BINARY_DIR}/transpose-agent-index-absolute/out_memory_allocation_trace.csv - ${CMAKE_CURRENT_BINARY_DIR}/transpose-agent-index-absolute/out_memory_copy_trace.csv - ${CMAKE_CURRENT_BINARY_DIR}/transpose-agent-index-relative/out_kernel_trace.csv - ${CMAKE_CURRENT_BINARY_DIR}/transpose-agent-index-relative/out_memory_allocation_trace.csv - ${CMAKE_CURRENT_BINARY_DIR}/transpose-agent-index-relative/out_memory_copy_trace.csv - ${CMAKE_CURRENT_BINARY_DIR}/transpose-agent-index-type-relative/out_kernel_trace.csv - ${CMAKE_CURRENT_BINARY_DIR}/transpose-agent-index-type-relative/out_memory_allocation_trace.csv - ${CMAKE_CURRENT_BINARY_DIR}/transpose-agent-index-type-relative/out_memory_copy_trace.csv - ) - set(dependency_tests rocprofv3-test-agent-index-json-absolute-execute rocprofv3-test-agent-index-json-relative-execute;rocprofv3-test-agent-index-json-absolute-execute @@ -132,15 +119,6 @@ foreach(i RANGE 0 ${validate_test_length}) list(GET validate_tests ${i} test_name) list(GET dependency_tests ${i} dep) set_tests_properties( - ${test_name} - PROPERTIES TIMEOUT - 45 - LABELS - "integration-tests" - DEPENDS - ${dep} - FAIL_REGULAR_EXPRESSION - "AssertionError" - ATTACHED_FILES_ON_FAIL - "${VALIDATION_FILES}") + ${test_name} PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS ${dep} + FAIL_REGULAR_EXPRESSION "AssertionError") endforeach() diff --git a/projects/rocprofiler-sdk/tests/rocprofv3/collection-period/CMakeLists.txt b/projects/rocprofiler-sdk/tests/rocprofv3/collection-period/CMakeLists.txt index 9633d720f8..b09aba2312 100644 --- a/projects/rocprofiler-sdk/tests/rocprofv3/collection-period/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/rocprofv3/collection-period/CMakeLists.txt @@ -48,7 +48,10 @@ set_tests_properties( FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}" DISABLED - "${IS_THREAD_SANITIZER}") + "${ROCPROFILER_DISABLE_UNSTABLE_CTESTS}") # Once stable, should be disabled + # via IS_THREAD_SANITIZER (thread + # sanitizer has too much + # overhead) add_test( NAME rocprofv3-test-collection-period-validate @@ -71,4 +74,7 @@ set_tests_properties( FAIL_REGULAR_EXPRESSION "AssertionError" DISABLED - "${IS_THREAD_SANITIZER}") + "${ROCPROFILER_DISABLE_UNSTABLE_CTESTS}") # Once stable, should be disabled + # via IS_THREAD_SANITIZER (thread + # sanitizer has too much + # overhead) diff --git a/projects/rocprofiler-sdk/tests/rocprofv3/counter-collection/input2/CMakeLists.txt b/projects/rocprofiler-sdk/tests/rocprofv3/counter-collection/input2/CMakeLists.txt index 4d737b3b93..7cf1359ac8 100644 --- a/projects/rocprofiler-sdk/tests/rocprofv3/counter-collection/input2/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/rocprofv3/counter-collection/input2/CMakeLists.txt @@ -43,21 +43,8 @@ add_test( --counter-input ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pmc_2/out_counter_collection.csv) -set(SYS_VALIDATION_FILES - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pmc_1/out_agent_info.csv - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pmc_1/out_counter_collection.csv - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pmc_2/out_agent_info.csv - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pmc_2/out_counter_collection.csv) - set_tests_properties( rocprofv3-test-counter-collection-txt-pmc2-execute-validate - PROPERTIES TIMEOUT - 45 - LABELS - "integration-tests" - DEPENDS - "rocprofv3-test-counter-collection-pmc2-execute" - FAIL_REGULAR_EXPRESSION - "${ROCPROFILER_DEFAULT_FAIL_REGEX}" - ATTACHED_FILES_ON_FAIL - "${VALIDATION_FILES}") + PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS + "rocprofv3-test-counter-collection-pmc2-execute" FAIL_REGULAR_EXPRESSION + "${ROCPROFILER_DEFAULT_FAIL_REGEX}") diff --git a/projects/rocprofiler-sdk/tests/rocprofv3/counter-collection/input3/CMakeLists.txt b/projects/rocprofiler-sdk/tests/rocprofv3/counter-collection/input3/CMakeLists.txt index 17a2a686fb..48206b09d5 100644 --- a/projects/rocprofiler-sdk/tests/rocprofv3/counter-collection/input3/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/rocprofv3/counter-collection/input3/CMakeLists.txt @@ -52,25 +52,11 @@ add_test( ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pass_2/out_json_counter_collection.csv ) -set(JSON_VALIDATION_FILES - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pass_1/out_json_agent_info.csv - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pass_1/out_json_counter_collection.csv - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pass_2/out_json_agent_info.csv - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pass_2/out_json_counter_collection.csv - ) - set_tests_properties( rocprofv3-test-counter-collection-json-pmc1-validate - PROPERTIES TIMEOUT - 45 - LABELS - "integration-tests" - DEPENDS + PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS rocprofv3-test-counter-collection-json-pmc1-execute - FAIL_REGULAR_EXPRESSION - "${ROCPROFILER_DEFAULT_FAIL_REGEX}" - ATTACHED_FILES_ON_FAIL - "${JSON_VALIDATION_FILES}") + FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}") add_test( NAME rocprofv3-test-counter-collection-yaml-pmc1-validate @@ -85,22 +71,8 @@ add_test( ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pass_2/out_yaml_counter_collection.csv ) -set(YAML_VALIDATION_FILES - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pass_1/out_yaml_agent_info.csv - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pass_1/out_yaml_counter_collection.csv - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pass_2/out_yaml_agent_info.csv - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pass_2/out_yaml_counter_collection.csv - ) - set_tests_properties( rocprofv3-test-counter-collection-yaml-pmc1-validate - PROPERTIES TIMEOUT - 45 - LABELS - "integration-tests" - DEPENDS + PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS rocprofv3-test-counter-collection-yaml-pmc1-execute - FAIL_REGULAR_EXPRESSION - "${ROCPROFILER_DEFAULT_FAIL_REGEX}" - ATTACHED_FILES_ON_FAIL - "${YAML_VALIDATION_FILES}") + FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}") diff --git a/projects/rocprofiler-sdk/tests/rocprofv3/counter-collection/kernel_filtering/CMakeLists.txt b/projects/rocprofiler-sdk/tests/rocprofv3/counter-collection/kernel_filtering/CMakeLists.txt index 61e729be45..618672a81c 100644 --- a/projects/rocprofiler-sdk/tests/rocprofv3/counter-collection/kernel_filtering/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/rocprofv3/counter-collection/kernel_filtering/CMakeLists.txt @@ -28,7 +28,7 @@ set(cc-env-kernel-filtering "${PRELOAD_ENV}") set_tests_properties( rocprofv3-test-counter-collection-kernel-filtering-input-json-execute - PROPERTIES TIMEOUT 45 LABELS "integration-tests" ENVIRONMENT + PROPERTIES TIMEOUT 120 LABELS "integration-tests" ENVIRONMENT "${cc-env-kernel-filtering}" FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}") @@ -42,7 +42,7 @@ add_test( set_tests_properties( rocprofv3-test-counter-collection-kernel-filtering-input-cmd-execute - PROPERTIES TIMEOUT 45 LABELS "integration-tests" ENVIRONMENT + PROPERTIES TIMEOUT 120 LABELS "integration-tests" ENVIRONMENT "${cc-env-kernel-filtering}" FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}") @@ -57,7 +57,7 @@ add_test( set_tests_properties( rocprofv3-test-counter-collection-kernel-filtering-input-yaml-execute - PROPERTIES TIMEOUT 45 LABELS "integration-tests" ENVIRONMENT + PROPERTIES TIMEOUT 120 LABELS "integration-tests" ENVIRONMENT "${cc-env-kernel-filtering}" FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}") add_test( @@ -103,18 +103,18 @@ add_test( set_tests_properties( rocprofv3-test-counter-collection-kernel-filtering-input-json-validate - PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS + PROPERTIES TIMEOUT 120 LABELS "integration-tests" DEPENDS "rocprofv3-test-counter-collection-kernel-filtering-input-json-execute" FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}") set_tests_properties( rocprofv3-test-counter-collection-kernel-filtering-input-cmd-validate - PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS + PROPERTIES TIMEOUT 120 LABELS "integration-tests" DEPENDS "rocprofv3-test-counter-collection-kernel-filtering-input-cmd-execute" FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}") set_tests_properties( rocprofv3-test-counter-collection-kernel-filtering-input-yaml-validate - PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS + PROPERTIES TIMEOUT 120 LABELS "integration-tests" DEPENDS "rocprofv3-test-counter-collection-kernel-filtering-input-yaml-execute" FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}") diff --git a/projects/rocprofiler-sdk/tests/rocprofv3/counter-collection/list_metrics/CMakeLists.txt b/projects/rocprofiler-sdk/tests/rocprofv3/counter-collection/list_metrics/CMakeLists.txt index c9dd2a33a1..ae423e7eeb 100644 --- a/projects/rocprofiler-sdk/tests/rocprofv3/counter-collection/list_metrics/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/rocprofv3/counter-collection/list_metrics/CMakeLists.txt @@ -33,11 +33,11 @@ add_test( string(REPLACE "LD_PRELOAD=" "ROCPROF_PRELOAD=" PRELOAD_ENV "${ROCPROFILER_MEMCHECK_PRELOAD_ENV}") -set(cc-env-list-metrics "${PRELOAD_ENV}" "ROCPD_LOG_LEVEL=trace") +set(cc-env-list-metrics "${PRELOAD_ENV}" "ROCPD_LOG_LEVEL=info") set_tests_properties( rocprofv3-test-list-avail-execute - PROPERTIES TIMEOUT 45 LABELS "integration-tests" ENVIRONMENT "${cc-env-list-metrics}" + PROPERTIES TIMEOUT 60 LABELS "integration-tests" ENVIRONMENT "${cc-env-list-metrics}" FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}") set_tests_properties( @@ -55,5 +55,5 @@ set_tests_properties( set_tests_properties( rocprofv3-test-list-avail-trace-execute - PROPERTIES TIMEOUT 45 LABELS "integration-tests" ENVIRONMENT "${cc-env-list-metrics}" + PROPERTIES TIMEOUT 60 LABELS "integration-tests" ENVIRONMENT "${cc-env-list-metrics}" FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}") diff --git a/projects/rocprofiler-sdk/tests/rocprofv3/counter-collection/multiplex/CMakeLists.txt b/projects/rocprofiler-sdk/tests/rocprofv3/counter-collection/multiplex/CMakeLists.txt index 65a4700a95..e3f9936531 100644 --- a/projects/rocprofiler-sdk/tests/rocprofv3/counter-collection/multiplex/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/rocprofv3/counter-collection/multiplex/CMakeLists.txt @@ -69,22 +69,11 @@ add_test( --counter-input ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/out_json_counter_collection.csv) -set(JSON_VALIDATION_FILES - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/out_json_agent_info.csv - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/out_json_counter_collection.csv) - set_tests_properties( rocprofv3-test-counter-collection-multiplex-validate - PROPERTIES TIMEOUT - 45 - LABELS - "integration-tests" - DEPENDS + PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS rocprofv3-test-counter-collection-multiplex-execute - FAIL_REGULAR_EXPRESSION - "${ROCPROFILER_DEFAULT_FAIL_REGEX}" - ATTACHED_FILES_ON_FAIL - "${JSON_VALIDATION_FILES}") + FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}") add_test( NAME rocprofv3-test-counter-collection-multiple-yaml-validate @@ -94,19 +83,8 @@ add_test( --counter-input ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/out_yaml_counter_collection.csv) -set(YAML_VALIDATION_FILES - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/out_yaml_agent_info.csv - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/out_yaml_counter_collection.csv) - set_tests_properties( rocprofv3-test-counter-collection-multiple-yaml-validate - PROPERTIES TIMEOUT - 45 - LABELS - "integration-tests" - DEPENDS + PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS rocprofv3-test-counter-collection-multiple-yaml-execute - FAIL_REGULAR_EXPRESSION - "${ROCPROFILER_DEFAULT_FAIL_REGEX}" - ATTACHED_FILES_ON_FAIL - "${YAML_VALIDATION_FILES}") + FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}") diff --git a/projects/rocprofiler-sdk/tests/rocprofv3/counter-collection/range_filtering/CMakeLists.txt b/projects/rocprofiler-sdk/tests/rocprofv3/counter-collection/range_filtering/CMakeLists.txt index e0ccef39d1..6a81e20df4 100644 --- a/projects/rocprofiler-sdk/tests/rocprofv3/counter-collection/range_filtering/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/rocprofv3/counter-collection/range_filtering/CMakeLists.txt @@ -27,7 +27,7 @@ set(cc-env-kernel-filtering "${PRELOAD_ENV}") set_tests_properties( rocprofv3-test-counter-collection-kernel-filtering-range-filter-execute - PROPERTIES TIMEOUT 45 LABELS "integration-tests" ENVIRONMENT + PROPERTIES TIMEOUT 120 LABELS "integration-tests" ENVIRONMENT "${cc-env-kernel-filtering}" FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}") @@ -44,6 +44,6 @@ add_test( set_tests_properties( rocprofv3-test-counter-collection-kernel-filtering-range-filter-validate - PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS + PROPERTIES TIMEOUT 120 LABELS "integration-tests" DEPENDS "rocprofv3-test-counter-collection-kernel-filtering-range-filter-execute" FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}") diff --git a/projects/rocprofiler-sdk/tests/rocprofv3/hip-stream-display/CMakeLists.txt b/projects/rocprofiler-sdk/tests/rocprofv3/hip-stream-display/CMakeLists.txt index 34c6721e59..a0aacd0687 100644 --- a/projects/rocprofiler-sdk/tests/rocprofv3/hip-stream-display/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/rocprofv3/hip-stream-display/CMakeLists.txt @@ -47,13 +47,13 @@ add_test( set_tests_properties( rocprofv3-test-hip-stream-display-execute PROPERTIES TIMEOUT - 45 + 60 LABELS "integration-tests" ENVIRONMENT "${hip-stream-display-env}" FAIL_REGULAR_EXPRESSION - "threw an exception" + "${ROCPROFILER_DEFAULT_FAIL_REGEX}" DISABLED $>) @@ -67,7 +67,7 @@ add_test( set_tests_properties( rocprofv3-test-hip-stream-display-validate PROPERTIES TIMEOUT - 45 + 60 LABELS "integration-tests" DEPENDS diff --git a/projects/rocprofiler-sdk/tests/rocprofv3/hsa-queue-dependency/CMakeLists.txt b/projects/rocprofiler-sdk/tests/rocprofv3/hsa-queue-dependency/CMakeLists.txt index 9c50cb8ca5..bea9a731c5 100644 --- a/projects/rocprofiler-sdk/tests/rocprofv3/hsa-queue-dependency/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/rocprofv3/hsa-queue-dependency/CMakeLists.txt @@ -42,20 +42,8 @@ add_test( --pftrace-input ${CMAKE_CURRENT_BINARY_DIR}/multiqueue_testapp-trace/out_results.pftrace) -set(MULTIQUEUE_VALIDATION_FILES - ${CMAKE_CURRENT_BINARY_DIR}/multiqueue_testapp-trace/out_hsa_api_trace.csv - ${CMAKE_CURRENT_BINARY_DIR}/multiqueue_testapp-trace/out_kernel_api_trace.csv - ${CMAKE_CURRENT_BINARY_DIR}/multiqueue_testapp-trace/out_results.json) - set_tests_properties( rocprofv3-test-hsa-multiqueue-validate - PROPERTIES TIMEOUT - 45 - LABELS - "integration-tests" - DEPENDS - "rocprofv3-test-hsa-multiqueue-execute" - FAIL_REGULAR_EXPRESSION - "AssertionError" - ATTACHED_FILES_ON_FAIL - "${MULTIQUEUE_VALIDATION_FILES}") + PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS + "rocprofv3-test-hsa-multiqueue-execute" FAIL_REGULAR_EXPRESSION + "AssertionError") diff --git a/projects/rocprofiler-sdk/tests/rocprofv3/kernel-rename/CMakeLists.txt b/projects/rocprofiler-sdk/tests/rocprofv3/kernel-rename/CMakeLists.txt index dc4982a7f0..e2b51f742c 100644 --- a/projects/rocprofiler-sdk/tests/rocprofv3/kernel-rename/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/rocprofv3/kernel-rename/CMakeLists.txt @@ -56,22 +56,11 @@ add_test( --otf2-input ${CMAKE_CURRENT_BINARY_DIR}/transpose-trace-cmd-line/out_results.otf2) -set(VALIDATION_FILES - ${CMAKE_CURRENT_BINARY_DIR}/transpose-trace-cmd-line/out_results.pftrace - ${CMAKE_CURRENT_BINARY_DIR}/transpose-trace-cmd-line/out_results.json) - set_tests_properties( rocprofv3-test-kernel-rename-cmd-line-validate - PROPERTIES TIMEOUT - 45 - LABELS - "integration-tests" - DEPENDS - "rocprofv3-test-kernel-rename-execute" - FAIL_REGULAR_EXPRESSION - "AssertionError" - ATTACHED_FILES_ON_FAIL - "${VALIDATION_FILES}") + PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS + "rocprofv3-test-kernel-rename-execute" FAIL_REGULAR_EXPRESSION + "AssertionError") ########################################################################################## # @@ -100,19 +89,8 @@ add_test( --otf2-input ${CMAKE_CURRENT_BINARY_DIR}/transpose-trace-inp-yaml/out_results.otf2) -set(VALIDATION_FILES - ${CMAKE_CURRENT_BINARY_DIR}/transpose-trace-inp-yaml/out_results.pftrace - ${CMAKE_CURRENT_BINARY_DIR}/transpose-trace-inp-yaml/out_results.json) - set_tests_properties( rocprofv3-test-kernel-rename-inp-yaml-validate - PROPERTIES TIMEOUT - 45 - LABELS - "integration-tests" - DEPENDS - "rocprofv3-test-kernel-rename-inp-yaml-execute" - FAIL_REGULAR_EXPRESSION - "AssertionError" - ATTACHED_FILES_ON_FAIL - "${VALIDATION_FILES}") + PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS + "rocprofv3-test-kernel-rename-inp-yaml-execute" FAIL_REGULAR_EXPRESSION + "AssertionError") diff --git a/projects/rocprofiler-sdk/tests/rocprofv3/memory-allocation/CMakeLists.txt b/projects/rocprofiler-sdk/tests/rocprofv3/memory-allocation/CMakeLists.txt index f63a01a1a6..368a35b1cd 100644 --- a/projects/rocprofiler-sdk/tests/rocprofv3/memory-allocation/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/rocprofv3/memory-allocation/CMakeLists.txt @@ -28,7 +28,7 @@ set_tests_properties( rocprofv3-test-memory-allocation-tracing-execute PROPERTIES TIMEOUT 45 LABELS "integration-tests" ENVIRONMENT "${memory-allocation-tracing-env}" FAIL_REGULAR_EXPRESSION - "threw an exception") + "${ROCPROFILER_DEFAULT_FAIL_REGEX}") add_test( NAME rocprofv3-test-memory-allocation-tracing-validate diff --git a/projects/rocprofiler-sdk/tests/rocprofv3/pc-sampling/CMakeLists.txt b/projects/rocprofiler-sdk/tests/rocprofv3/pc-sampling/CMakeLists.txt index 20a12980d1..78bfb60128 100644 --- a/projects/rocprofiler-sdk/tests/rocprofv3/pc-sampling/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/rocprofv3/pc-sampling/CMakeLists.txt @@ -2,5 +2,9 @@ # PC sampling tests # +set(ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX + "PC sampling unavailable|PC sampling configuration is not supported" + CACHE STRING "regex for skipping PC sampling test when not supported by given agents") + add_subdirectory(host-trap) add_subdirectory(stochastic) diff --git a/projects/rocprofiler-sdk/tests/rocprofv3/pc-sampling/host-trap/exec-mask-manipulation/CMakeLists.txt b/projects/rocprofiler-sdk/tests/rocprofv3/pc-sampling/host-trap/exec-mask-manipulation/CMakeLists.txt index 3684560364..aa164ee493 100644 --- a/projects/rocprofiler-sdk/tests/rocprofv3/pc-sampling/host-trap/exec-mask-manipulation/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/rocprofv3/pc-sampling/host-trap/exec-mask-manipulation/CMakeLists.txt @@ -40,7 +40,7 @@ set_tests_properties( FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}" SKIP_REGULAR_EXPRESSION - "PC sampling unavailable" + "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED "${IS_PC_SAMPLING_DISABLED}") @@ -63,7 +63,7 @@ set_tests_properties( FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}" SKIP_REGULAR_EXPRESSION - "PC sampling unavailable" + "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED "${IS_PC_SAMPLING_DISABLED}") @@ -86,7 +86,7 @@ set_tests_properties( FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}" SKIP_REGULAR_EXPRESSION - "PC sampling unavailable" + "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED "${IS_PC_SAMPLING_DISABLED}") @@ -113,7 +113,7 @@ set_tests_properties( FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}" SKIP_REGULAR_EXPRESSION - "PC sampling unavailable" + "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED "${IS_PC_SAMPLING_DISABLED}") @@ -138,7 +138,7 @@ set_tests_properties( FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}" SKIP_REGULAR_EXPRESSION - "PC sampling unavailable" + "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED "${IS_PC_SAMPLING_DISABLED}") @@ -163,6 +163,6 @@ set_tests_properties( FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}" SKIP_REGULAR_EXPRESSION - "PC sampling unavailable" + "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED "${IS_PC_SAMPLING_DISABLED}") diff --git a/projects/rocprofiler-sdk/tests/rocprofv3/pc-sampling/host-trap/transpose-multiple-agents/CMakeLists.txt b/projects/rocprofiler-sdk/tests/rocprofv3/pc-sampling/host-trap/transpose-multiple-agents/CMakeLists.txt index 6bb00915c3..b4ce29e8b3 100644 --- a/projects/rocprofiler-sdk/tests/rocprofv3/pc-sampling/host-trap/transpose-multiple-agents/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/rocprofv3/pc-sampling/host-trap/transpose-multiple-agents/CMakeLists.txt @@ -46,7 +46,7 @@ set_tests_properties( FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}" SKIP_REGULAR_EXPRESSION - "PC sampling unavailable" + "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED "${IS_PC_SAMPLING_DISABLED}") @@ -69,7 +69,7 @@ set_tests_properties( FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}" SKIP_REGULAR_EXPRESSION - "PC sampling unavailable" + "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED "${IS_PC_SAMPLING_DISABLED}") @@ -92,7 +92,7 @@ set_tests_properties( FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}" SKIP_REGULAR_EXPRESSION - "PC sampling unavailable" + "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED "${IS_PC_SAMPLING_DISABLED}") @@ -121,7 +121,7 @@ set_tests_properties( FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}" SKIP_REGULAR_EXPRESSION - "PC sampling unavailable" + "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED "${IS_PC_SAMPLING_DISABLED}") @@ -148,7 +148,7 @@ set_tests_properties( FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}" SKIP_REGULAR_EXPRESSION - "PC sampling unavailable" + "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED "${IS_PC_SAMPLING_DISABLED}") @@ -175,6 +175,6 @@ set_tests_properties( FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}" SKIP_REGULAR_EXPRESSION - "PC sampling unavailable" + "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED "${IS_PC_SAMPLING_DISABLED}") diff --git a/projects/rocprofiler-sdk/tests/rocprofv3/pc-sampling/stochastic/exec-mask-manipulation/CMakeLists.txt b/projects/rocprofiler-sdk/tests/rocprofv3/pc-sampling/stochastic/exec-mask-manipulation/CMakeLists.txt index 644aaad358..b92d0beeec 100644 --- a/projects/rocprofiler-sdk/tests/rocprofv3/pc-sampling/stochastic/exec-mask-manipulation/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/rocprofv3/pc-sampling/stochastic/exec-mask-manipulation/CMakeLists.txt @@ -62,7 +62,7 @@ set_tests_properties( FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}" SKIP_REGULAR_EXPRESSION - "PC sampling unavailable" + "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED "${IS_PC_SAMPLING_STOCHASTIC_DISABLED}") @@ -85,7 +85,7 @@ set_tests_properties( FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}" SKIP_REGULAR_EXPRESSION - "PC sampling unavailable" + "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED "${IS_PC_SAMPLING_STOCHASTIC_DISABLED}") @@ -108,7 +108,7 @@ set_tests_properties( FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}" SKIP_REGULAR_EXPRESSION - "PC sampling unavailable" + "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED "${IS_PC_SAMPLING_STOCHASTIC_DISABLED}") @@ -135,7 +135,7 @@ set_tests_properties( FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}" SKIP_REGULAR_EXPRESSION - "PC sampling unavailable" + "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED "${IS_PC_SAMPLING_STOCHASTIC_DISABLED}") @@ -160,7 +160,7 @@ set_tests_properties( FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}" SKIP_REGULAR_EXPRESSION - "PC sampling unavailable" + "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED "${IS_PC_SAMPLING_STOCHASTIC_DISABLED}") @@ -185,6 +185,6 @@ set_tests_properties( FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}" SKIP_REGULAR_EXPRESSION - "PC sampling unavailable" + "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED "${IS_PC_SAMPLING_STOCHASTIC_DISABLED}") diff --git a/projects/rocprofiler-sdk/tests/rocprofv3/pc-sampling/stochastic/transpose-multiple-agents/CMakeLists.txt b/projects/rocprofiler-sdk/tests/rocprofv3/pc-sampling/stochastic/transpose-multiple-agents/CMakeLists.txt index af8d7a07d0..869aab6fcc 100644 --- a/projects/rocprofiler-sdk/tests/rocprofv3/pc-sampling/stochastic/transpose-multiple-agents/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/rocprofv3/pc-sampling/stochastic/transpose-multiple-agents/CMakeLists.txt @@ -68,7 +68,7 @@ set_tests_properties( FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}" SKIP_REGULAR_EXPRESSION - "PC sampling unavailable" + "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED "${IS_PC_SAMPLING_STOCHASTIC_DISABLED}") @@ -91,7 +91,7 @@ set_tests_properties( FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}" SKIP_REGULAR_EXPRESSION - "PC sampling unavailable" + "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED "${IS_PC_SAMPLING_STOCHASTIC_DISABLED}") @@ -114,7 +114,7 @@ set_tests_properties( FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}" SKIP_REGULAR_EXPRESSION - "PC sampling unavailable" + "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED "${IS_PC_SAMPLING_STOCHASTIC_DISABLED}") @@ -145,7 +145,7 @@ set_tests_properties( FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}" SKIP_REGULAR_EXPRESSION - "PC sampling unavailable" + "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED "${IS_PC_SAMPLING_STOCHASTIC_DISABLED}") @@ -174,7 +174,7 @@ set_tests_properties( FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}" SKIP_REGULAR_EXPRESSION - "PC sampling unavailable" + "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED "${IS_PC_SAMPLING_STOCHASTIC_DISABLED}") @@ -203,6 +203,6 @@ set_tests_properties( FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}" SKIP_REGULAR_EXPRESSION - "PC sampling unavailable" + "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED "${IS_PC_SAMPLING_STOCHASTIC_DISABLED}") diff --git a/projects/rocprofiler-sdk/tests/rocprofv3/python-bindings/CMakeLists.txt b/projects/rocprofiler-sdk/tests/rocprofv3/python-bindings/CMakeLists.txt index 26d75ec0f1..33eaf082fa 100644 --- a/projects/rocprofiler-sdk/tests/rocprofv3/python-bindings/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/rocprofv3/python-bindings/CMakeLists.txt @@ -54,12 +54,6 @@ add_test( --pftrace-input ${CMAKE_CURRENT_BINARY_DIR}/marker-python-bindings/out_results.pftrace) -set(VALIDATION_FILES - ${CMAKE_CURRENT_BINARY_DIR}/marker-python-bindings/out_agent_info.csv - ${CMAKE_CURRENT_BINARY_DIR}/marker-python-bindings/out_marker_api_trace.csv - ${CMAKE_CURRENT_BINARY_DIR}/marker-python-bindings/out_results.json - ${CMAKE_CURRENT_BINARY_DIR}/marker-python-bindings/out_results.pftrace) - set_tests_properties( rocprofv3-trace-roctx-python-bindings-validate PROPERTIES TIMEOUT @@ -71,6 +65,4 @@ set_tests_properties( DISABLED "${TRANSPOSE_ROCTRACER_ROCTX_DISABLED}" FAIL_REGULAR_EXPRESSION - "AssertionError" - ATTACHED_FILES_ON_FAIL - "${VALIDATION_FILES}") + "AssertionError") diff --git a/projects/rocprofiler-sdk/tests/rocprofv3/rocdecode-trace/CMakeLists.txt b/projects/rocprofiler-sdk/tests/rocprofv3/rocdecode-trace/CMakeLists.txt index 0c1e7a08fc..901a34330f 100644 --- a/projects/rocprofiler-sdk/tests/rocprofv3/rocdecode-trace/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/rocprofv3/rocdecode-trace/CMakeLists.txt @@ -48,7 +48,7 @@ set_tests_properties( ENVIRONMENT "${rocdecode-tracing-env}" FAIL_REGULAR_EXPRESSION - "threw an exception" + "${ROCPROFILER_DEFAULT_FAIL_REGEX}" DISABLED "${IS_DISABLED}") diff --git a/projects/rocprofiler-sdk/tests/rocprofv3/rocjpeg-trace/CMakeLists.txt b/projects/rocprofiler-sdk/tests/rocprofv3/rocjpeg-trace/CMakeLists.txt index da826441df..f81a4f8a22 100644 --- a/projects/rocprofiler-sdk/tests/rocprofv3/rocjpeg-trace/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/rocprofv3/rocjpeg-trace/CMakeLists.txt @@ -69,7 +69,7 @@ set_tests_properties( ENVIRONMENT "${rocjpeg-tracing-env}" FAIL_REGULAR_EXPRESSION - "threw an exception" + "${ROCPROFILER_DEFAULT_FAIL_REGEX}" DISABLED "${IS_DISABLED}") diff --git a/projects/rocprofiler-sdk/tests/rocprofv3/rocpd/CMakeLists.txt b/projects/rocprofiler-sdk/tests/rocprofv3/rocpd/CMakeLists.txt index 77c388dfaf..1bafc1730c 100644 --- a/projects/rocprofiler-sdk/tests/rocprofv3/rocpd/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/rocprofv3/rocpd/CMakeLists.txt @@ -10,7 +10,7 @@ project( find_package(rocprofiler-sdk REQUIRED) -set(tracing-env +set(rocprofv3-rocpd-env "${ROCPROFILER_MEMCHECK_PRELOAD_ENV}" "PYTHONPATH=${rocprofiler-sdk_LIB_DIR}/python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}/site-packages" "OMPI_ALLOW_RUN_AS_ROOT=1" @@ -30,6 +30,10 @@ else() set(MULTIPROC_LAUNCHER) endif() +if(ROCPROFILER_DISABLE_UNSTABLE_CTESTS) + set(MULTIPROC_IS_DISABLED ON) # fails on mi300 SLES for some unknown reason +endif() + ######################################################################################### # # generate rocpd database and the old-way outputs csv, otf2, perfetto to compare @@ -40,36 +44,46 @@ add_test( NAME rocprofv3-test-rocpd-execute COMMAND $ -d - ${CMAKE_CURRENT_BINARY_DIR}/%tag%-test -o out --output-format rocpd json + ${CMAKE_CURRENT_BINARY_DIR}/rocpd-input-data -o out --output-format rocpd json --runtime-trace --kernel-rename --output-config --pmc SQ_WAVES -- - $ 2 500 50) + $ 500 2) set_tests_properties( rocprofv3-test-rocpd-execute - PROPERTIES TIMEOUT 120 LABELS "integration-tests;rocpd" ENVIRONMENT "${tracing-env}" - FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}") + PROPERTIES TIMEOUT + 120 + LABELS + "integration-tests;rocpd" + ENVIRONMENT + "${rocprofv3-rocpd-env}" + FAIL_REGULAR_EXPRESSION + "${ROCPROFILER_DEFAULT_FAIL_REGEX}" + FIXTURES_SETUP + rocprofv3-test-rocpd) add_test( NAME rocprofv3-test-rocpd-execute-multiproc COMMAND ${MULTIPROC_LAUNCHER} ${Python3_EXECUTABLE} $ -d - ${CMAKE_CURRENT_BINARY_DIR}/%tag%-mp-test -o out_transpose_%rank% --output-format - rocpd json --runtime-trace --kernel-rename --output-config --pmc SQ_WAVES -- - $ 1 250 50) + ${CMAKE_CURRENT_BINARY_DIR}/rocpd-input-data-multiproc -o out_mp_%rank% + --output-format rocpd json --runtime-trace --kernel-rename --output-config --pmc + SQ_WAVES -- $ 200 1) set_tests_properties( rocprofv3-test-rocpd-execute-multiproc PROPERTIES TIMEOUT - 45 + 120 LABELS "integration-tests;rocpd" ENVIRONMENT - "${tracing-env}" + "${rocprofv3-rocpd-env}" FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}" DISABLED - "${MULTIPROC_IS_DISABLED}") + "${MULTIPROC_IS_DISABLED}" + FIXTURES_SETUP + rocprofv3-test-rocpd-multiproc) ######################################################################################### # @@ -81,34 +95,48 @@ add_test( NAME rocprofv3-test-rocpd-otf2-generation COMMAND ${Python3_EXECUTABLE} -m rocpd convert -f otf2 --kernel-rename -d - ${CMAKE_CURRENT_BINARY_DIR}/rocpd-output-test -i - ${CMAKE_CURRENT_BINARY_DIR}/transpose-test/out_results.db) + ${CMAKE_CURRENT_BINARY_DIR}/rocpd-output-data -i + ${CMAKE_CURRENT_BINARY_DIR}/rocpd-input-data/out_results.db) set_tests_properties( rocprofv3-test-rocpd-otf2-generation - PROPERTIES TIMEOUT 120 LABELS "integration-tests;rocpd" ENVIRONMENT "${tracing-env}" - FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}") + PROPERTIES TIMEOUT + 120 + LABELS + "integration-tests;rocpd" + ENVIRONMENT + "${rocprofv3-rocpd-env}" + DEPENDS + "rocprofv3-test-rocpd-execute" + FAIL_REGULAR_EXPRESSION + "${ROCPROFILER_DEFAULT_FAIL_REGEX}" + FIXTURES_SETUP + rocprofv3-test-rocpd-generation + FIXTURES_REQUIRED + rocprofv3-test-rocpd) add_test( NAME rocprofv3-test-rocpd-otf2-generation-multiproc COMMAND ${Python3_EXECUTABLE} -m rocpd convert -f otf2 --kernel-rename -d - ${CMAKE_CURRENT_BINARY_DIR}/rocpd-output-test -o rocpd-mp-output-test -i - ${CMAKE_CURRENT_BINARY_DIR}/transpose-mp-test/out_transpose_0_results.db - ${CMAKE_CURRENT_BINARY_DIR}/transpose-mp-test/out_transpose_1_results.db) + ${CMAKE_CURRENT_BINARY_DIR}/rocpd-output-data-multiproc -o rocpd-mp-output-test + -i ${CMAKE_CURRENT_BINARY_DIR}/rocpd-input-data-multiproc/out_mp_0_results.db + ${CMAKE_CURRENT_BINARY_DIR}/rocpd-input-data-multiproc/out_mp_1_results.db) set_tests_properties( rocprofv3-test-rocpd-otf2-generation-multiproc PROPERTIES TIMEOUT - 45 + 120 LABELS "integration-tests;rocpd" ENVIRONMENT - "${tracing-env}" + "${rocprofv3-rocpd-env}" FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}" DISABLED - "${MULTIPROC_IS_DISABLED}") + "${MULTIPROC_IS_DISABLED}" + FIXTURES_REQUIRED + rocprofv3-test-rocpd-multiproc) ######################################################################################### # @@ -120,34 +148,49 @@ add_test( NAME rocprofv3-test-rocpd-perfetto-generation COMMAND ${Python3_EXECUTABLE} -m rocpd convert -f pftrace --kernel-rename -d - ${CMAKE_CURRENT_BINARY_DIR}/rocpd-output-test -i - ${CMAKE_CURRENT_BINARY_DIR}/transpose-test/out_results.db) + ${CMAKE_CURRENT_BINARY_DIR}/rocpd-output-data -i + ${CMAKE_CURRENT_BINARY_DIR}/rocpd-input-data/out_results.db) set_tests_properties( rocprofv3-test-rocpd-perfetto-generation - PROPERTIES TIMEOUT 120 LABELS "integration-tests;rocpd" ENVIRONMENT "${tracing-env}" - FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}") + PROPERTIES TIMEOUT + 120 + LABELS + "integration-tests;rocpd" + ENVIRONMENT + "${rocprofv3-rocpd-env}" + DEPENDS + "rocprofv3-test-rocpd-execute" + FAIL_REGULAR_EXPRESSION + "${ROCPROFILER_DEFAULT_FAIL_REGEX}" + FIXTURES_SETUP + rocprofv3-test-rocpd-generation + FIXTURES_REQUIRED + rocprofv3-test-rocpd) add_test( NAME rocprofv3-test-rocpd-perfetto-generation-multiproc COMMAND ${Python3_EXECUTABLE} -m rocpd convert -f perfetto --kernel-rename - --group-by-queue -d ${CMAKE_CURRENT_BINARY_DIR}/rocpd-output-test -o out_mp -i - ${CMAKE_CURRENT_BINARY_DIR}/transpose-mp-test/out_transpose_0_results.db - ${CMAKE_CURRENT_BINARY_DIR}/transpose-mp-test/out_transpose_1_results.db) + --group-by-queue -d ${CMAKE_CURRENT_BINARY_DIR}/rocpd-output-data-multiproc -o + out_mp -i + ${CMAKE_CURRENT_BINARY_DIR}/rocpd-input-data-multiproc/out_mp_0_results.db + ${CMAKE_CURRENT_BINARY_DIR}/rocpd-input-data-multiproc/out_mp_1_results.db) set_tests_properties( rocprofv3-test-rocpd-perfetto-generation-multiproc PROPERTIES TIMEOUT - 45 + 120 LABELS "integration-tests;rocpd" ENVIRONMENT - "${tracing-env}" + "${rocprofv3-rocpd-env}" FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}" DISABLED - "${MULTIPROC_IS_DISABLED}") + "${MULTIPROC_IS_DISABLED}" + FIXTURES_REQUIRED + rocprofv3-test-rocpd-multiproc) ######################################################################################### # @@ -159,13 +202,25 @@ add_test( NAME rocprofv3-test-rocpd-csv-generation COMMAND ${Python3_EXECUTABLE} -m rocpd convert -f csv --kernel-rename -d - ${CMAKE_CURRENT_BINARY_DIR}/rocpd-output-test -i - ${CMAKE_CURRENT_BINARY_DIR}/transpose-test/out_results.db) + ${CMAKE_CURRENT_BINARY_DIR}/rocpd-output-data -i + ${CMAKE_CURRENT_BINARY_DIR}/rocpd-input-data/out_results.db) set_tests_properties( rocprofv3-test-rocpd-csv-generation - PROPERTIES TIMEOUT 45 LABELS "integration-tests;rocpd" ENVIRONMENT "${tracing-env}" - FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}") + PROPERTIES TIMEOUT + 120 + LABELS + "integration-tests;rocpd" + ENVIRONMENT + "${rocprofv3-rocpd-env}" + DEPENDS + "rocprofv3-test-rocpd-execute" + FAIL_REGULAR_EXPRESSION + "${ROCPROFILER_DEFAULT_FAIL_REGEX}" + FIXTURES_SETUP + rocprofv3-test-rocpd-generation + FIXTURES_REQUIRED + rocprofv3-test-rocpd) ######################################################################################### # @@ -173,15 +228,29 @@ set_tests_properties( # ######################################################################################### +set(VALIDATION_DEPENDS + rocprofv3-test-rocpd-perfetto-generation rocprofv3-test-rocpd-csv-generation + rocprofv3-test-rocpd-otf2-generation) + add_test( NAME rocprofv3-test-rocpd-validation COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --json-input - ${CMAKE_CURRENT_BINARY_DIR}/transpose-test/out_results.json --otf2-input - ${CMAKE_CURRENT_BINARY_DIR}/rocpd-output-test/out_results.otf2 --pftrace-input - ${CMAKE_CURRENT_BINARY_DIR}/rocpd-output-test/out_results.pftrace) + ${CMAKE_CURRENT_BINARY_DIR}/rocpd-input-data/out_results.json --otf2-input + ${CMAKE_CURRENT_BINARY_DIR}/rocpd-output-data/out_results.otf2 --pftrace-input + ${CMAKE_CURRENT_BINARY_DIR}/rocpd-output-data/out_results.pftrace) set_tests_properties( rocprofv3-test-rocpd-validation - PROPERTIES TIMEOUT 45 LABELS "integration-tests;rocpd" ENVIRONMENT "${tracing-env}" - FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}") + PROPERTIES TIMEOUT + 120 + LABELS + "integration-tests;rocpd" + ENVIRONMENT + "${rocprofv3-rocpd-env}" + DEPENDS + "${VALIDATION_DEPENDS}" + FAIL_REGULAR_EXPRESSION + "${ROCPROFILER_DEFAULT_FAIL_REGEX}" + FIXTURES_REQUIRED + rocprofv3-test-rocpd-generation) diff --git a/projects/rocprofiler-sdk/tests/rocprofv3/roctracer-roctx/CMakeLists.txt b/projects/rocprofiler-sdk/tests/rocprofv3/roctracer-roctx/CMakeLists.txt index cfb877405c..2317bdcf34 100644 --- a/projects/rocprofiler-sdk/tests/rocprofv3/roctracer-roctx/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/rocprofv3/roctracer-roctx/CMakeLists.txt @@ -44,11 +44,6 @@ add_test( ${CMAKE_CURRENT_BINARY_DIR}/roctracer-roctx-trace/out_results.pftrace --otf2-input ${CMAKE_CURRENT_BINARY_DIR}/roctracer-roctx-trace/out_results.otf2) -set(VALIDATION_FILES - ${CMAKE_CURRENT_BINARY_DIR}/roctracer-roctx-trace/out_results.pftrace - ${CMAKE_CURRENT_BINARY_DIR}/roctracer-roctx-trace/out_results.json - ${CMAKE_CURRENT_BINARY_DIR}/roctracer-roctx-trace/out_results.otf2) - set_tests_properties( rocprofv3-test-roctracer-roctx-trace-validate PROPERTIES TIMEOUT @@ -60,6 +55,4 @@ set_tests_properties( DISABLED "${TRANSPOSE_ROCTRACER_ROCTX_DISABLED}" FAIL_REGULAR_EXPRESSION - "AssertionError" - ATTACHED_FILES_ON_FAIL - "${VALIDATION_FILES}") + "AssertionError") diff --git a/projects/rocprofiler-sdk/tests/rocprofv3/scratch-memory/CMakeLists.txt b/projects/rocprofiler-sdk/tests/rocprofv3/scratch-memory/CMakeLists.txt index 8166adebab..eea3ae6d60 100644 --- a/projects/rocprofiler-sdk/tests/rocprofv3/scratch-memory/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/rocprofv3/scratch-memory/CMakeLists.txt @@ -28,9 +28,18 @@ foreach(_OUTPUT_FORMAT csv json) set_tests_properties( rocprofv3-test-scratch-memory-tracing-${_OUTPUT_FORMAT}-execute - PROPERTIES TIMEOUT 45 LABELS "integration-tests" ENVIRONMENT - "${scratch-memory-tracing-env}" FAIL_REGULAR_EXPRESSION - "threw an exception") + PROPERTIES TIMEOUT + 45 + LABELS + "integration-tests" + ENVIRONMENT + "${scratch-memory-tracing-env}" + FAIL_REGULAR_EXPRESSION + "${ROCPROFILER_DEFAULT_FAIL_REGEX}" + DISABLED + "${ROCPROFILER_DISABLE_UNSTABLE_CTESTS}" + FIXTURES_SETUP + rocprofv3-scratch-memory-tracing) list(APPEND VALIDATION_DEPENDS rocprofv3-test-scratch-memory-tracing-${_OUTPUT_FORMAT}-execute) @@ -43,10 +52,6 @@ add_test( ${CMAKE_CURRENT_BINARY_DIR}/scratch-memory-trace/out_results.json --csv-input ${CMAKE_CURRENT_BINARY_DIR}/scratch-memory-trace/out_scratch_memory_trace.csv) -set(VALIDATION_FILES - ${CMAKE_CURRENT_BINARY_DIR}/scratch-memory-trace/out_results.json - ${CMAKE_CURRENT_BINARY_DIR}/scratch-memory-trace/out_scratch_memory_trace.csv) - set_tests_properties( rocprofv3-test-scratch-memory-tracing-validate PROPERTIES TIMEOUT @@ -57,5 +62,7 @@ set_tests_properties( "${VALIDATION_DEPENDS}" FAIL_REGULAR_EXPRESSION "AssertionError" - ATTACHED_FILES_ON_FAIL - "${VALIDATION_FILES}") + DISABLED + "${ROCPROFILER_DISABLE_UNSTABLE_CTESTS}" + FIXTURES_REQUIRED + rocprofv3-scratch-memory-tracing) diff --git a/projects/rocprofiler-sdk/tests/rocprofv3/summary/CMakeLists.txt b/projects/rocprofiler-sdk/tests/rocprofv3/summary/CMakeLists.txt index 221b80f4e3..f7bfab4b9b 100644 --- a/projects/rocprofiler-sdk/tests/rocprofv3/summary/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/rocprofv3/summary/CMakeLists.txt @@ -58,23 +58,10 @@ add_test( --summary-input ${CMAKE_CURRENT_BINARY_DIR}/transpose-trace-cmd-line/out_summary.txt) -set(VALIDATION_FILES - ${CMAKE_CURRENT_BINARY_DIR}/transpose-trace-cmd-line/out_results.pftrace - ${CMAKE_CURRENT_BINARY_DIR}/transpose-trace-cmd-line/out_results.json - ${CMAKE_CURRENT_BINARY_DIR}/transpose-trace-cmd-line/out_summary.txt) - set_tests_properties( rocprofv3-test-summary-cmd-line-validate - PROPERTIES TIMEOUT - 45 - LABELS - "integration-tests" - DEPENDS - "rocprofv3-test-summary-execute" - FAIL_REGULAR_EXPRESSION - "AssertionError" - ATTACHED_FILES_ON_FAIL - "${VALIDATION_FILES}") + PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS + "rocprofv3-test-summary-execute" FAIL_REGULAR_EXPRESSION "AssertionError") ########################################################################################## # @@ -108,20 +95,8 @@ add_test( --summary-input ${CMAKE_CURRENT_BINARY_DIR}/transpose-trace-inp-yaml/out_summary.txt) -set(VALIDATION_FILES - ${CMAKE_CURRENT_BINARY_DIR}/transpose-trace-inp-yaml/out_results.pftrace - ${CMAKE_CURRENT_BINARY_DIR}/transpose-trace-inp-yaml/out_results.json - ${CMAKE_CURRENT_BINARY_DIR}/transpose-trace-inp-yaml/out_summary.txt) - set_tests_properties( rocprofv3-test-summary-inp-yaml-validate - PROPERTIES TIMEOUT - 45 - LABELS - "integration-tests" - DEPENDS - "rocprofv3-test-summary-inp-yaml-execute" - FAIL_REGULAR_EXPRESSION - "AssertionError" - ATTACHED_FILES_ON_FAIL - "${VALIDATION_FILES}") + PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS + "rocprofv3-test-summary-inp-yaml-execute" FAIL_REGULAR_EXPRESSION + "AssertionError") diff --git a/projects/rocprofiler-sdk/tests/rocprofv3/tracing-hip-in-libraries/CMakeLists.txt b/projects/rocprofiler-sdk/tests/rocprofv3/tracing-hip-in-libraries/CMakeLists.txt index 813f92baae..9f5e8d3800 100644 --- a/projects/rocprofiler-sdk/tests/rocprofv3/tracing-hip-in-libraries/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/rocprofv3/tracing-hip-in-libraries/CMakeLists.txt @@ -35,7 +35,8 @@ foreach(_OUTPUT_FORMAT csv json pftrace otf2) set_tests_properties( rocprofv3-test-trace-hip-in-libraries-${_OUTPUT_FORMAT}-execute - PROPERTIES TIMEOUT 100 LABELS "integration-tests" ENVIRONMENT "${tracing-env}") + PROPERTIES TIMEOUT 120 LABELS "integration-tests" ENVIRONMENT "${tracing-env}" + FIXTURES_SETUP rocprofv3-test-trace-hip-in-libraries) list(APPEND VALIDATION_DEPENDS rocprofv3-test-trace-hip-in-libraries-${_OUTPUT_FORMAT}-execute) @@ -69,19 +70,6 @@ add_test( ${CMAKE_CURRENT_BINARY_DIR}/hip-in-libraries-trace/out_results.pftrace --otf2-input ${CMAKE_CURRENT_BINARY_DIR}/hip-in-libraries-trace/out_results.otf2) -set(VALIDATION_FILES - ${CMAKE_CURRENT_BINARY_DIR}/hip-in-libraries-trace/out_results.pftrace - ${CMAKE_CURRENT_BINARY_DIR}/hip-in-libraries-trace/out_results.json - ${CMAKE_CURRENT_BINARY_DIR}/hip-in-libraries-trace/out_memory_copy_trace.csv - ${CMAKE_CURRENT_BINARY_DIR}/hip-in-libraries-trace/out_hsa_api_trace.csv - ${CMAKE_CURRENT_BINARY_DIR}/hip-in-libraries-trace/out_hip_api_trace.csv - ${CMAKE_CURRENT_BINARY_DIR}/hip-in-libraries-trace/out_kernel_trace.csv - ${CMAKE_CURRENT_BINARY_DIR}/hip-in-libraries-trace/out_agent_info.csv - ${CMAKE_CURRENT_BINARY_DIR}/hip-in-libraries-trace/out_kernel_stats.csv - ${CMAKE_CURRENT_BINARY_DIR}/hip-in-libraries-trace/out_hip_api_stats.csv - ${CMAKE_CURRENT_BINARY_DIR}/hip-in-libraries-trace/out_hsa_api_stats.csv - ${CMAKE_CURRENT_BINARY_DIR}/hip-in-libraries-trace/out_memory_copy_stats.csv) - set_tests_properties( rocprofv3-test-trace-hip-in-libraries-validate PROPERTIES TIMEOUT @@ -92,5 +80,5 @@ set_tests_properties( "${VALIDATION_DEPENDS}" FAIL_REGULAR_EXPRESSION "AssertionError" - ATTACHED_FILES_ON_FAIL - "${VALIDATION_FILES}") + FIXTURES_REQUIRED + rocprofv3-test-trace-hip-in-libraries) diff --git a/projects/rocprofiler-sdk/tests/rocprofv3/tracing/CMakeLists.txt b/projects/rocprofiler-sdk/tests/rocprofv3/tracing/CMakeLists.txt index 00ac139b17..13a9924966 100644 --- a/projects/rocprofiler-sdk/tests/rocprofv3/tracing/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/rocprofv3/tracing/CMakeLists.txt @@ -106,48 +106,16 @@ add_test( --rocpd-input ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-trace/json-input/out_results.db) -set(VALIDATION_FILES - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-trace/cmdl-input/out_results.db - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-trace/cmdl-input/out_results.pftrace - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-trace/cmdl-input/out_results.json - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-trace/cmdl-input/out_memory_copy_trace.csv - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-trace/cmdl-input/out_hsa_api_trace.csv - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-trace/cmdl-input/out_kernel_trace.csv - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-trace/cmdl-input/out_marker_api_trace.csv - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-trace/cmdl-input/out_agent_info.csv - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-trace/json-input/out_results.pftrace - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-trace/json-input/out_results.json - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-trace/json-input/out_memory_copy_trace.csv - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-trace/json-input/out_hsa_api_trace.csv - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-trace/json-input/out_kernel_trace.csv - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-trace/json-input/out_marker_api_trace.csv - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-trace/json-input/out_agent_info.csv) - set_tests_properties( rocprofv3-test-trace-validate - PROPERTIES TIMEOUT - 45 - LABELS - "integration-tests" - DEPENDS - "rocprofv3-test-trace-execute" - FAIL_REGULAR_EXPRESSION - "AssertionError" - ATTACHED_FILES_ON_FAIL - "${VALIDATION_FILES}") + PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS + "rocprofv3-test-trace-execute" FAIL_REGULAR_EXPRESSION "AssertionError") set_tests_properties( rocprofv3-test-trace-input-json-validate - PROPERTIES TIMEOUT - 45 - LABELS - "integration-tests" - DEPENDS - "rocprofv3-test-trace-input-json-execute" - FAIL_REGULAR_EXPRESSION - "AssertionError" - ATTACHED_FILES_ON_FAIL - "${VALIDATION_FILES}") + PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS + "rocprofv3-test-trace-input-json-execute" FAIL_REGULAR_EXPRESSION + "AssertionError") # sys-trace test: tests --sys-trace command with mangled kernel names and validates # generated files @@ -233,45 +201,13 @@ add_test( --rocpd-input ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-systrace/json-input/out_results.db) -set(SYS_VALIDATION_FILES - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-systrace/cmdl-input/out_results.db - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-systrace/cmdl-input/out_results.pftrace - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-systrace/cmdl-input/out_results.json - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-systrace/cmdl-input/out_memory_copy_trace.csv - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-systrace/cmdl-input/out_hsa_api_trace.csv - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-systrace/cmdl-input/out_kernel_trace.csv - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-systrace/cmdl-input/out_marker_api_trace.csv - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-systrace/cmdl-input/out_agent_info.csv - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-systrace/json-input/out_results.pftrace - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-systrace/json-input/out_results.json - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-systrace/json-input/out_memory_copy_trace.csv - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-systrace/json-input/out_hsa_api_trace.csv - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-systrace/json-input/out_kernel_trace.csv - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-systrace/json-input/out_marker_api_trace.csv - ${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-systrace/json-input/out_agent_info.csv) - set_tests_properties( rocprofv3-test-systrace-validate - PROPERTIES TIMEOUT - 45 - LABELS - "integration-tests" - DEPENDS - "rocprofv3-test-systrace-execute" - FAIL_REGULAR_EXPRESSION - "AssertionError" - ATTACHED_FILES_ON_FAIL - "${SYS_VALIDATION_FILES}") + PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS + "rocprofv3-test-systrace-execute" FAIL_REGULAR_EXPRESSION "AssertionError") set_tests_properties( rocprofv3-test-systrace-input-json-validate - PROPERTIES TIMEOUT - 45 - LABELS - "integration-tests" - DEPENDS - "rocprofv3-test-systrace-input-json-execute" - FAIL_REGULAR_EXPRESSION - "AssertionError" - ATTACHED_FILES_ON_FAIL - "${SYS_VALIDATION_FILES}") + PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS + "rocprofv3-test-systrace-input-json-execute" FAIL_REGULAR_EXPRESSION + "AssertionError") diff --git a/projects/rocprofiler-sdk/tests/scratch-memory-tracing/CMakeLists.txt b/projects/rocprofiler-sdk/tests/scratch-memory-tracing/CMakeLists.txt index 04f0070198..fc85a59a65 100644 --- a/projects/rocprofiler-sdk/tests/scratch-memory-tracing/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/scratch-memory-tracing/CMakeLists.txt @@ -27,9 +27,18 @@ set(scratch-memory-tracing-env set_tests_properties( test-scratch-memory-tracing-execute - PROPERTIES TIMEOUT 45 LABELS "integration-tests" ENVIRONMENT - "${scratch-memory-tracing-env}" FAIL_REGULAR_EXPRESSION - "threw an exception") + PROPERTIES TIMEOUT + 45 + LABELS + "integration-tests" + ENVIRONMENT + "${scratch-memory-tracing-env}" + FAIL_REGULAR_EXPRESSION + "${ROCPROFILER_DEFAULT_FAIL_REGEX}" + DISABLED + "${ROCPROFILER_DISABLE_UNSTABLE_CTESTS}" + FIXTURES_SETUP + scratch-memory-trace) # copy to binary directory rocprofiler_configure_pytest_files(COPY validate.py conftest.py CONFIG pytest.ini) @@ -40,6 +49,15 @@ add_test(NAME test-scratch-memory-tracing-validate set_tests_properties( test-scratch-memory-tracing-validate - PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS - test-scratch-memory-tracing-execute FAIL_REGULAR_EXPRESSION - "threw an exception") + PROPERTIES TIMEOUT + 45 + LABELS + "integration-tests" + DEPENDS + test-scratch-memory-tracing-execute + FAIL_REGULAR_EXPRESSION + "${ROCPROFILER_DEFAULT_FAIL_REGEX}" + DISABLED + "${ROCPROFILER_DISABLE_UNSTABLE_CTESTS}" + FIXTURES_REQUIRED + scratch-memory-trace)