diff --git a/clients/tests/accuracy_test_1D.cpp b/clients/tests/accuracy_test_1D.cpp index 73213ec2..bea7a518 100644 --- a/clients/tests/accuracy_test_1D.cpp +++ b/clients/tests/accuracy_test_1D.cpp @@ -25,9 +25,9 @@ #include "../../shared/accuracy_test.h" #include "../../shared/fftw_transform.h" +#include "../../shared/params_gen.h" #include "../../shared/rocfft_against_fftw.h" #include "accuracy_tests_range.h" -#include "params_gen.h" using ::testing::ValuesIn; diff --git a/clients/tests/accuracy_test_2D.cpp b/clients/tests/accuracy_test_2D.cpp index a47441a6..b5bd9144 100644 --- a/clients/tests/accuracy_test_2D.cpp +++ b/clients/tests/accuracy_test_2D.cpp @@ -25,9 +25,9 @@ #include "../../shared/accuracy_test.h" #include "../../shared/fftw_transform.h" +#include "../../shared/params_gen.h" #include "../../shared/rocfft_against_fftw.h" #include "accuracy_tests_range.h" -#include "params_gen.h" using ::testing::ValuesIn; diff --git a/clients/tests/accuracy_test_3D.cpp b/clients/tests/accuracy_test_3D.cpp index b0b12861..2a02be9a 100644 --- a/clients/tests/accuracy_test_3D.cpp +++ b/clients/tests/accuracy_test_3D.cpp @@ -25,9 +25,9 @@ #include "../../shared/accuracy_test.h" #include "../../shared/fftw_transform.h" +#include "../../shared/params_gen.h" #include "../../shared/rocfft_against_fftw.h" #include "accuracy_tests_range.h" -#include "params_gen.h" using ::testing::ValuesIn; diff --git a/clients/tests/accuracy_test_adhoc.cpp b/clients/tests/accuracy_test_adhoc.cpp index ccb23240..c8d99e0d 100644 --- a/clients/tests/accuracy_test_adhoc.cpp +++ b/clients/tests/accuracy_test_adhoc.cpp @@ -20,7 +20,7 @@ // THE SOFTWARE. #include "../../shared/accuracy_test.h" -#include "params_gen.h" +#include "../../shared/params_gen.h" std::vector> adhoc_sizes = { // sizes that exercise L1D_TRTRT subplan of 2D_RTRT or 3D_TRTRTR diff --git a/clients/tests/accuracy_test_callback.cpp b/clients/tests/accuracy_test_callback.cpp index 7357e244..109bd441 100644 --- a/clients/tests/accuracy_test_callback.cpp +++ b/clients/tests/accuracy_test_callback.cpp @@ -19,7 +19,7 @@ // THE SOFTWARE. #include "../../shared/accuracy_test.h" -#include "params_gen.h" +#include "../../shared/params_gen.h" std::vector> callback_sizes = { // some single kernel sizes diff --git a/clients/tests/accuracy_test_checkstride.cpp b/clients/tests/accuracy_test_checkstride.cpp index 119bfc63..41feb21f 100644 --- a/clients/tests/accuracy_test_checkstride.cpp +++ b/clients/tests/accuracy_test_checkstride.cpp @@ -19,7 +19,7 @@ // THE SOFTWARE. #include "../../shared/accuracy_test.h" -#include "params_gen.h" +#include "../../shared/params_gen.h" extern bool fftw_compare; diff --git a/clients/tests/bitwise_repro/bitwise_repro_test.cpp b/clients/tests/bitwise_repro/bitwise_repro_test.cpp index 2318971d..a946ee9c 100644 --- a/clients/tests/bitwise_repro/bitwise_repro_test.cpp +++ b/clients/tests/bitwise_repro/bitwise_repro_test.cpp @@ -23,9 +23,9 @@ #include #include +#include "../../../shared/params_gen.h" #include "../../../shared/rocfft_params.h" #include "../accuracy_tests_range.h" -#include "../params_gen.h" #include "bitwise_repro_test.h" using ::testing::ValuesIn; @@ -51,7 +51,18 @@ TEST(bitwise_repro_test, compare_precisions) GTEST_SKIP(); } - bitwise_repro(params_1, params_2); + try + { + bitwise_repro(params_1, params_2); + } + catch(ROCFFT_GTEST_SKIP& e) + { + GTEST_SKIP() << e.msg.str(); + } + catch(ROCFFT_GTEST_FAIL& e) + { + GTEST_FAIL() << e.msg.str(); + } SUCCEED(); } @@ -75,7 +86,18 @@ TEST(bitwise_repro_test, compare_lengths) GTEST_SKIP(); } - bitwise_repro(params_1, params_2); + try + { + bitwise_repro(params_1, params_2); + } + catch(ROCFFT_GTEST_SKIP& e) + { + GTEST_SKIP() << e.msg.str(); + } + catch(ROCFFT_GTEST_FAIL& e) + { + GTEST_FAIL() << e.msg.str(); + } SUCCEED(); } @@ -99,7 +121,18 @@ TEST(bitwise_repro_test, compare_transform_types) GTEST_SKIP(); } - bitwise_repro(params_1, params_2); + try + { + bitwise_repro(params_1, params_2); + } + catch(ROCFFT_GTEST_SKIP& e) + { + GTEST_SKIP() << e.msg.str(); + } + catch(ROCFFT_GTEST_FAIL& e) + { + GTEST_FAIL() << e.msg.str(); + } SUCCEED(); } @@ -128,7 +161,18 @@ TEST_P(bitwise_repro_test, compare_to_reference) GTEST_SKIP(); } - bitwise_repro(params); + try + { + bitwise_repro(params); + } + catch(ROCFFT_GTEST_SKIP& e) + { + GTEST_SKIP() << e.msg.str(); + } + catch(ROCFFT_GTEST_FAIL& e) + { + GTEST_FAIL() << e.msg.str(); + } SUCCEED(); } @@ -565,4 +609,4 @@ INSTANTIATE_TEST_SUITE_P( ooffset_range_zero, place_range, true)), - bitwise_repro_test::TestName); \ No newline at end of file + bitwise_repro_test::TestName); diff --git a/clients/tests/bitwise_repro/bitwise_repro_test.h b/clients/tests/bitwise_repro/bitwise_repro_test.h index c478a001..982c7f49 100644 --- a/clients/tests/bitwise_repro/bitwise_repro_test.h +++ b/clients/tests/bitwise_repro/bitwise_repro_test.h @@ -76,14 +76,12 @@ inline void execute_fft(Tparams& params, if(hip_status != hipSuccess) { ++n_hip_failures; + std::stringstream msg; + msg << "hipMemcpy failure"; if(skip_runtime_fails) - { - GTEST_SKIP() << "hipMemcpy failure"; - } + throw ROCFFT_GTEST_SKIP{std::move(msg)}; else - { - GTEST_FAIL() << "hipMemcpy failure"; - } + throw ROCFFT_GTEST_FAIL{std::move(msg)}; } } if(verbose > 2) @@ -128,16 +126,12 @@ void compute_fft_data(Tparams& params, catch(fft_params::work_buffer_alloc_failure& e) { ++n_hip_failures; - std::stringstream ss; - ss << "Work buffer allocation failed with size: " << params.workbuffersize; + std::stringstream msg; + msg << "Work buffer allocation failed with size: " << params.workbuffersize; if(skip_runtime_fails) - { - GTEST_SKIP() << ss.str(); - } + throw ROCFFT_GTEST_SKIP{std::move(msg)}; else - { - GTEST_FAIL() << ss.str(); - } + throw ROCFFT_GTEST_FAIL{std::move(msg)}; } ASSERT_EQ(plan_status, fft_status_success) << "plan creation failed"; @@ -148,19 +142,15 @@ void compute_fft_data(Tparams& params, hip_status = ibuffer[i].alloc(ibuffer_sizes[i]); if(hip_status != hipSuccess) { - std::stringstream ss; - ss << "hipMalloc failure for input buffer " << i << " size " << ibuffer_sizes[i] << "(" - << bytes_to_GiB(ibuffer_sizes[i]) << " GiB)" - << " with code " << hipError_to_string(hip_status); + std::stringstream msg; + msg << "hipMalloc failure for input buffer " << i << " size " << ibuffer_sizes[i] << "(" + << bytes_to_GiB(ibuffer_sizes[i]) << " GiB)" + << " with code " << hipError_to_string(hip_status); ++n_hip_failures; if(skip_runtime_fails) - { - GTEST_SKIP() << ss.str(); - } + throw ROCFFT_GTEST_SKIP{std::move(msg)}; else - { - GTEST_FAIL() << ss.str(); - } + throw ROCFFT_GTEST_FAIL{std::move(msg)}; } pibuffer[i] = ibuffer[i].data(); } @@ -183,15 +173,14 @@ void compute_fft_data(Tparams& params, hipMemcpyDeviceToHost); if(hip_status != hipSuccess) { + std::stringstream msg; + msg << "hipMemcpy failure with error " << hip_status; + ++n_hip_failures; if(skip_runtime_fails) - { - GTEST_SKIP() << "hipMemcpy failure with error " << hip_status; - } + throw ROCFFT_GTEST_SKIP{std::move(msg)}; else - { - GTEST_FAIL() << "hipMemcpy failure with error " << hip_status; - } + throw ROCFFT_GTEST_FAIL{std::move(msg)}; } } @@ -214,18 +203,14 @@ void compute_fft_data(Tparams& params, if(hip_status != hipSuccess) { ++n_hip_failures; - std::stringstream ss; - ss << "hipMalloc failure for output buffer " << i << " size " << obuffer_sizes[i] - << "(" << bytes_to_GiB(obuffer_sizes[i]) << " GiB)" - << " with code " << hipError_to_string(hip_status); + std::stringstream msg; + msg << "hipMalloc failure for output buffer " << i << " size " << obuffer_sizes[i] + << "(" << bytes_to_GiB(obuffer_sizes[i]) << " GiB)" + << " with code " << hipError_to_string(hip_status); if(skip_runtime_fails) - { - GTEST_SKIP() << ss.str(); - } + throw ROCFFT_GTEST_SKIP{std::move(msg)}; else - { - GTEST_FAIL() << ss.str(); - } + throw ROCFFT_GTEST_FAIL{std::move(msg)}; } } } @@ -256,7 +241,11 @@ inline void bitwise_repro_impl(Tparams& params, Tparams& params_comp) compute_hash(fft_output, obuffer_hash_in, obuffer_hash_out); if(params_comp.token().compare(params.token()) == 0) - GTEST_SKIP() << "FFT input tokens are identical"; + { + std::stringstream msg; + msg << "FFT input tokens are identical"; + throw ROCFFT_GTEST_SKIP{std::move(msg)}; + } std::vector fft_input_comp, fft_output_comp; compute_fft_data(params_comp, fft_input_comp, fft_output_comp); @@ -306,8 +295,12 @@ inline void bitwise_repro_impl(Tparams& params) if(hash_entry_found) ASSERT_TRUE(hash_valid) << "FFT result is not bitwise reproducible."; else - GTEST_SKIP() << "FFT result entry added to the repro-db file. Previously stored reference " - "entry not found."; + { + std::stringstream msg; + msg << "FFT result entry added to the repro-db file. Previously stored reference entry not " + "found. \n"; + throw ROCFFT_GTEST_SKIP{std::move(msg)}; + } } inline void bitwise_repro(rocfft_params& params) diff --git a/clients/tests/callback_change_type.cpp b/clients/tests/callback_change_type.cpp index 3a9a6523..e20da9bf 100644 --- a/clients/tests/callback_change_type.cpp +++ b/clients/tests/callback_change_type.cpp @@ -19,9 +19,9 @@ // THE SOFTWARE. #include "../../shared/hostbuf.h" +#include "../../shared/params_gen.h" #include "../../shared/rocfft_complex.h" #include "../../shared/rocfft_params.h" -#include "params_gen.h" #include "../../shared/accuracy_test.h" #include "../../shared/fftw_transform.h" diff --git a/clients/tests/gtest_main.cpp b/clients/tests/gtest_main.cpp index 2a5cbb9d..d0e4cd6e 100644 --- a/clients/tests/gtest_main.cpp +++ b/clients/tests/gtest_main.cpp @@ -568,7 +568,18 @@ TEST(manual, vs_fftw) // MANUAL TESTS HERE std::cout << "manual params are not valid\n"; } - fft_vs_reference(params); + try + { + fft_vs_reference(params); + } + catch(ROCFFT_GTEST_SKIP& e) + { + GTEST_SKIP() << e.msg.str(); + } + catch(ROCFFT_GTEST_FAIL& e) + { + GTEST_FAIL() << e.msg.str(); + } } TEST(manual, bitwise_reproducibility) // MANUAL TESTS HERE @@ -591,5 +602,17 @@ TEST(manual, bitwise_reproducibility) // MANUAL TESTS HERE std::cout << "manual params are not valid\n"; } - bitwise_repro(params); + try + { + bitwise_repro(params); + } + catch(ROCFFT_GTEST_SKIP& e) + { + GTEST_SKIP() << e.msg.str(); + } + catch(ROCFFT_GTEST_FAIL& e) + { + GTEST_FAIL() << e.msg.str(); + } + SUCCEED(); } diff --git a/clients/tests/multi_device_test.cpp b/clients/tests/multi_device_test.cpp index e5641c42..dddd75fc 100644 --- a/clients/tests/multi_device_test.cpp +++ b/clients/tests/multi_device_test.cpp @@ -19,8 +19,8 @@ // THE SOFTWARE. #include "../../shared/accuracy_test.h" +#include "../../shared/params_gen.h" #include "../../shared/rocfft_params.h" -#include "params_gen.h" #include #include diff --git a/clients/tests/random.cpp b/clients/tests/random.cpp index 1e3cc779..8cbb31bb 100644 --- a/clients/tests/random.cpp +++ b/clients/tests/random.cpp @@ -23,9 +23,9 @@ #include #include "../../shared/accuracy_test.h" +#include "../../shared/params_gen.h" #include "../../shared/rocfft_accuracy_test.h" #include "../../shared/test_params.h" -#include "params_gen.h" class random_params : public ::testing::TestWithParam< diff --git a/clients/tests/rocfft_accuracy_test.cpp b/clients/tests/rocfft_accuracy_test.cpp index 8a92b74a..2f1577a0 100644 --- a/clients/tests/rocfft_accuracy_test.cpp +++ b/clients/tests/rocfft_accuracy_test.cpp @@ -29,6 +29,7 @@ #include "../../shared/fftw_transform.h" #include "../../shared/gpubuf.h" +#include "../../shared/gtest_except.h" #include "../../shared/rocfft_against_fftw.h" #include "rocfft/rocfft.h" @@ -74,6 +75,17 @@ TEST_P(accuracy_test, vs_fftw) // only do round trip for non-field FFTs bool round_trip = params.ifields.empty() && params.ofields.empty(); - fft_vs_reference(params, round_trip); + try + { + fft_vs_reference(params, round_trip); + } + catch(ROCFFT_GTEST_SKIP& e) + { + GTEST_SKIP() << e.msg.str(); + } + catch(ROCFFT_GTEST_FAIL& e) + { + GTEST_FAIL() << e.msg.str(); + } SUCCEED(); } diff --git a/shared/accuracy_test.h b/shared/accuracy_test.h index 260a2886..afc200f2 100644 --- a/shared/accuracy_test.h +++ b/shared/accuracy_test.h @@ -34,6 +34,7 @@ #include "fft_params.h" #include "fftw_transform.h" #include "gpubuf.h" +#include "gtest_except.h" #include "rocfft_against_fftw.h" #include "test_params.h" @@ -125,8 +126,9 @@ inline void if(ramgb > 0 && needed_ram > ramgb * ONE_GiB) { - GTEST_SKIP() << "needed_ramgb: " << bytes_to_GiB(needed_ram) << ", ramgb limit: " << ramgb - << ".\n"; + std::stringstream msg; + msg << "needed_ramgb: " << bytes_to_GiB(needed_ram) << ", ramgb limit: " << ramgb << ".\n"; + throw ROCFFT_GTEST_SKIP{std::move(msg)}; } } @@ -153,11 +155,11 @@ inline void check_problem_fits_device_memory(Tparams& params, const int verbose) ss << "hipMemGetInfo failure with error " << hip_status; if(skip_runtime_fails) { - GTEST_SKIP() << ss.str(); + throw ROCFFT_GTEST_SKIP{std::move(ss)}; } else { - GTEST_FAIL() << ss.str(); + throw ROCFFT_GTEST_FAIL{std::move(ss)}; } } vram_avail = total; @@ -174,8 +176,10 @@ inline void check_problem_fits_device_memory(Tparams& params, const int verbose) if(!vram_fits_problem(raw_vram_footprint, vram_avail)) { - GTEST_SKIP() << "Raw problem size (" << bytes_to_GiB(raw_vram_footprint) - << " GiB) raw data too large for device"; + std::stringstream ss; + ss << "Raw problem size (" << bytes_to_GiB(raw_vram_footprint) + << " GiB) raw data too large for device"; + throw ROCFFT_GTEST_SKIP{std::move(ss)}; } if(verbose > 2) @@ -193,8 +197,10 @@ inline void check_problem_fits_device_memory(Tparams& params, const int verbose) { std::cout << "Problem raw data won't fit on device; skipped." << std::endl; } - GTEST_SKIP() << "Problem size (" << bytes_to_GiB(vram_footprint) - << " GiB) raw data too large for device"; + std::stringstream ss; + ss << "Problem size (" << bytes_to_GiB(vram_footprint) + << " GiB) raw data too large for device"; + throw ROCFFT_GTEST_SKIP{std::move(ss)}; } } @@ -395,11 +401,11 @@ inline void execute_gpu_fft(Tparams& params, ++n_hip_failures; if(skip_runtime_fails) { - GTEST_SKIP(); + throw ROCFFT_GTEST_SKIP(); } else { - GTEST_FAIL(); + throw ROCFFT_GTEST_FAIL(); } } hip_status = hipMemcpy(load_cb_data_dev.data(), @@ -411,11 +417,11 @@ inline void execute_gpu_fft(Tparams& params, ++n_hip_failures; if(skip_runtime_fails) { - GTEST_SKIP(); + throw ROCFFT_GTEST_SKIP(); } else { - GTEST_FAIL(); + throw ROCFFT_GTEST_FAIL(); } } @@ -441,11 +447,11 @@ inline void execute_gpu_fft(Tparams& params, ++n_hip_failures; if(skip_runtime_fails) { - GTEST_SKIP(); + throw ROCFFT_GTEST_SKIP(); } else { - GTEST_FAIL(); + throw ROCFFT_GTEST_FAIL(); } } @@ -458,11 +464,11 @@ inline void execute_gpu_fft(Tparams& params, ++n_hip_failures; if(skip_runtime_fails) { - GTEST_SKIP(); + throw ROCFFT_GTEST_SKIP(); } else { - GTEST_FAIL(); + throw ROCFFT_GTEST_FAIL(); } } @@ -497,13 +503,15 @@ inline void execute_gpu_fft(Tparams& params, if(hip_status != hipSuccess) { ++n_hip_failures; + std::stringstream ss; + ss << "hipMemcpy failure"; if(skip_runtime_fails) { - GTEST_SKIP() << "hipMemcpy failure"; + throw ROCFFT_GTEST_SKIP{std::move(ss)}; } else { - GTEST_FAIL() << "hipMemcpy failure"; + throw ROCFFT_GTEST_FAIL{std::move(ss)}; } } } @@ -688,11 +696,11 @@ inline void run_round_trip_inverse(Tparams& params, ++n_hip_failures; if(skip_runtime_fails) { - GTEST_SKIP() << ss.str(); + throw ROCFFT_GTEST_SKIP{std::move(ss)}; } else { - GTEST_FAIL() << ss.str(); + throw ROCFFT_GTEST_FAIL{std::move(ss)}; } } ASSERT_EQ(plan_status, fft_status_success) << "round trip inverse plan creation failed"; @@ -714,13 +722,15 @@ inline void run_round_trip_inverse(Tparams& params, if(hip_status != hipSuccess) { ++n_hip_failures; + std::stringstream ss; + ss << "hipMemset failure"; if(skip_runtime_fails) { - GTEST_SKIP() << "hipMemset failure"; + throw ROCFFT_GTEST_SKIP{std::move(ss)}; } else { - GTEST_FAIL() << "hipMemset failure"; + throw ROCFFT_GTEST_FAIL{std::move(ss)}; } } } @@ -888,11 +898,11 @@ inline void fft_vs_reference_impl(Tparams& params, bool round_trip) ss << "Work buffer allocation failed with size: " << params.workbuffersize; if(skip_runtime_fails) { - GTEST_SKIP() << ss.str(); + throw ROCFFT_GTEST_SKIP{std::move(ss)}; } else { - GTEST_FAIL() << ss.str(); + throw ROCFFT_GTEST_FAIL{std::move(ss)}; } } ASSERT_EQ(plan_status, fft_status_success) << "plan creation failed"; @@ -933,11 +943,11 @@ inline void fft_vs_reference_impl(Tparams& params, bool round_trip) ++n_hip_failures; if(skip_runtime_fails) { - GTEST_SKIP() << ss.str(); + throw ROCFFT_GTEST_SKIP{std::move(ss)}; } else { - GTEST_FAIL() << ss.str(); + throw ROCFFT_GTEST_FAIL{std::move(ss)}; } } pibuffer[i] = ibuffer[i].data(); @@ -1082,8 +1092,7 @@ inline void fft_vs_reference_impl(Tparams& params, bool round_trip) std::cout << "Problem exceeds memory limit; skipped [rocfft_transform]." << std::endl; } - GTEST_SKIP(); - return; + throw ROCFFT_GTEST_SKIP(); } } @@ -1111,13 +1120,15 @@ inline void fft_vs_reference_impl(Tparams& params, bool round_trip) if(hip_status != hipSuccess) { ++n_hip_failures; + std::stringstream ss; + ss << "hipMemcpy failure with error " << hip_status; if(skip_runtime_fails) { - GTEST_SKIP() << "hipMemcpy failure with error " << hip_status; + throw ROCFFT_GTEST_SKIP{std::move(ss)}; } else { - GTEST_FAIL() << "hipMemcpy failure with error " << hip_status; + throw ROCFFT_GTEST_FAIL{std::move(ss)}; } } } @@ -1148,13 +1159,15 @@ inline void fft_vs_reference_impl(Tparams& params, bool round_trip) if(hip_status != hipSuccess) { ++n_hip_failures; + std::stringstream ss; + ss << "hipMemcpy failure with error " << hip_status; if(skip_runtime_fails) { - GTEST_SKIP() << "hipMemcpy failure with error " << hip_status; + throw ROCFFT_GTEST_SKIP{std::move(ss)}; } else { - GTEST_FAIL() << "hipMemcpy failure with error " << hip_status; + throw ROCFFT_GTEST_FAIL{std::move(ss)}; } } } @@ -1201,13 +1214,15 @@ inline void fft_vs_reference_impl(Tparams& params, bool round_trip) if(hip_status != hipSuccess) { ++n_hip_failures; + std::stringstream ss; + ss << "hipMemcpy failure with error " << hip_status; if(skip_runtime_fails) { - GTEST_SKIP() << "hipMemcpy failure with error " << hip_status; + throw ROCFFT_GTEST_SKIP{std::move(ss)}; } else { - GTEST_FAIL() << "hipMemcpy failure with error " << hip_status; + throw ROCFFT_GTEST_FAIL{std::move(ss)}; } } } @@ -1269,11 +1284,11 @@ inline void fft_vs_reference_impl(Tparams& params, bool round_trip) << " with code " << hipError_to_string(hip_status); if(skip_runtime_fails) { - GTEST_SKIP() << ss.str(); + throw ROCFFT_GTEST_SKIP{std::move(ss)}; } else { - GTEST_FAIL() << ss.str(); + throw ROCFFT_GTEST_FAIL{std::move(ss)}; } } @@ -1288,13 +1303,15 @@ inline void fft_vs_reference_impl(Tparams& params, bool round_trip) if(hip_status != hipSuccess) { ++n_hip_failures; + std::stringstream ss; + ss << "hipMemset failure with error " << hip_status; if(skip_runtime_fails) { - GTEST_SKIP() << "hipMemset failure with error " << hip_status; + throw ROCFFT_GTEST_SKIP{std::move(ss)}; } else { - GTEST_FAIL() << "hipMemset failure with error " << hip_status; + throw ROCFFT_GTEST_FAIL{std::move(ss)}; } } } diff --git a/shared/gtest_except.h b/shared/gtest_except.h new file mode 100644 index 00000000..daca8df2 --- /dev/null +++ b/shared/gtest_except.h @@ -0,0 +1,38 @@ +// Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#ifndef ROCFFT_GTEST_EXCEPT_H +#define ROCFFT_GTEST_EXCEPT_H + +#include + +// exception type to throw when we want gtest to skip this test case +struct ROCFFT_GTEST_SKIP +{ + std::stringstream msg; +}; + +// exception type to throw when we want gtest to fail this test case +struct ROCFFT_GTEST_FAIL +{ + std::stringstream msg; +}; + +#endif diff --git a/clients/tests/params_gen.h b/shared/params_gen.h similarity index 99% rename from clients/tests/params_gen.h rename to shared/params_gen.h index c88f0ab5..d1d89d5a 100644 --- a/clients/tests/params_gen.h +++ b/shared/params_gen.h @@ -24,8 +24,8 @@ #include -#include "../../shared/fft_params.h" -#include "../../shared/test_params.h" +#include "fft_params.h" +#include "test_params.h" const static std::vector batch_range = {2, 1};