diff --git a/.jenkins/lsu-perftests/Jenkinsfile b/.jenkins/lsu-perftests/Jenkinsfile index 4fca52a9ce5..0047ee63a43 100644 --- a/.jenkins/lsu-perftests/Jenkinsfile +++ b/.jenkins/lsu-perftests/Jenkinsfile @@ -40,7 +40,7 @@ pipeline { always { archiveArtifacts artifacts: 'jenkins-hpx-*', fingerprint: true archiveArtifacts artifacts: '*-Testing/**', fingerprint: true - // archiveArtifacts artifacts: '*-reports/**', fingerprint: true + archiveArtifacts artifacts: '*-reports/**', fingerprint: true } } } diff --git a/.jenkins/lsu-perftests/batch.sh b/.jenkins/lsu-perftests/batch.sh index e69a7900a5c..482b7f5a041 100755 --- a/.jenkins/lsu-perftests/batch.sh +++ b/.jenkins/lsu-perftests/batch.sh @@ -16,13 +16,13 @@ status_computation_and_artifacts_storage() { # Copy the testing directory for saving as an artifact cp -r ${build_dir}/Testing ${src_dir}/${configuration_name}-Testing - # cp -r ${build_dir}/reports ${src_dir}/${configuration_name}-reports + cp -r ${build_dir}/*.json ${src_dir}/${configuration_name}-reports echo "${ctest_status}" > "jenkins-hpx-${configuration_name}-ctest-status.txt" - # exit $ctest_status + exit $ctest_status } -# trap "status_computation_and_artifacts_storage" EXIT +trap "status_computation_and_artifacts_storage" EXIT src_dir="$(pwd)" build_dir="${src_dir}/build/${configuration_name}" @@ -33,7 +33,7 @@ cp -r ${src_dir}/tools/perftests_ci ${build_dir}/tools # Variables perftests_dir=${build_dir}/tools/perftests_ci envfile=${src_dir}/.jenkins/lsu-perftests/env-${configuration_name}.sh -mkdir -p ${build_dir}/reports +mkdir -p ${src_dir}/${configuration_name}-reports logfile=${build_dir}/reports/jenkins-hpx-${configuration_name}.log # Load python packages @@ -51,7 +51,6 @@ wait source ${src_dir}/.jenkins/lsu-perftests/env-${configuration_name}.sh # CTest to upload the images to CDash -set +e ctest \ -VV \ --output-on-failure \ @@ -60,8 +59,7 @@ ctest \ -DCTEST_CONFIGURE_EXTRA_OPTIONS="${configure_extra_options}" \ -DCTEST_SOURCE_DIRECTORY="${src_dir}" \ -DCTEST_BINARY_DIRECTORY="${build_dir}" -set -e - + status_computation_and_artifacts_storage if [ -s $build_dir/index.html ]; then diff --git a/.jenkins/lsu/ctest.cmake b/.jenkins/lsu/ctest.cmake index 969099bb555..0731cf236ab 100644 --- a/.jenkins/lsu/ctest.cmake +++ b/.jenkins/lsu/ctest.cmake @@ -82,7 +82,7 @@ set(ctest_submission_result ${ctest_submission_result} "Build: " ${__build_result} "\n" ) -ctest_test(PARALLEL_LEVEL "${CTEST_TEST_PARALLELISM}") +ctest_test(PARALLEL_LEVEL "${CTEST_TEST_PARALLELISM}" EXCLUDE "_perftest$") ctest_submit( PARTS Test BUILD_ID __ctest_build_id diff --git a/cmake/HPX_AddTest.cmake b/cmake/HPX_AddTest.cmake index 13de0cbd66f..a9ce4c8f85f 100644 --- a/cmake/HPX_AddTest.cmake +++ b/cmake/HPX_AddTest.cmake @@ -289,8 +289,10 @@ function(add_hpx_performance_test subcategory name) endfunction(add_hpx_performance_test) function(add_hpx_performance_report_test subcategory name) + # set(ARGN "${ARGN} ") add_test_and_deps_test( "performance" "${subcategory}" ${name} ${ARGN} RUN_SERIAL + "--print_cdash_img_path" ) find_package(Python REQUIRED) string(REPLACE "_perftest" "" name ${name}) diff --git a/libs/core/testing/include/hpx/testing/performance.hpp b/libs/core/testing/include/hpx/testing/performance.hpp index 25210b6fba3..775687be24a 100644 --- a/libs/core/testing/include/hpx/testing/performance.hpp +++ b/libs/core/testing/include/hpx/testing/performance.hpp @@ -15,6 +15,7 @@ namespace hpx::util { HPX_CORE_EXPORT inline bool detailed_; + HPX_CORE_EXPORT inline bool print_cdash_img; HPX_CORE_EXPORT inline std::string test_name_; HPX_CORE_EXPORT void perftests_cfg( hpx::program_options::options_description& cmdline); diff --git a/libs/core/testing/src/performance.cpp b/libs/core/testing/src/performance.cpp index 6f624721d34..41a3add8559 100644 --- a/libs/core/testing/src/performance.cpp +++ b/libs/core/testing/src/performance.cpp @@ -26,7 +26,9 @@ namespace hpx::util { { cmdline.add_options()("detailed_bench", "Use if detailed benchmarks are required, showing the execution " - "time taken for each epoch"); + "time taken for each epoch") + ("print_cdash_img_path", + "Print the path to the images to be uploaded, in CDash XML format"); } void perftests_init(const hpx::program_options::variables_map& vm, @@ -36,6 +38,10 @@ namespace hpx::util { { detailed_ = true; } + if (vm.count("print_cdash_img_path")) + { + print_cdash_img = true; + } test_name_ = test_name; } @@ -175,9 +181,10 @@ average: {{average(elapsed)}}{{^-last}} strm << std::scientific << "average: " << average / series << "\n\n"; } - strm << "" - << "./" << test_name_ << ".png\n"; + if (print_cdash_img) + strm << "" + << "./" << test_name_ << ".png\n"; } return strm; } @@ -214,7 +221,7 @@ average: {{average(elapsed)}}{{^-last}} void perftests_print_times(char const* templ, std::ostream& strm) { detail::bench().render(templ, strm); - if (!detailed_) + if (!detailed_ && print_cdash_img) strm << "" << "./" << test_name_ << ".png\n";