99#include < executorch/kernels/test/FunctionHeaderWrapper.h> // Declares the operator
1010#include < executorch/kernels/test/TestUtil.h>
1111#include < executorch/kernels/test/supported_features.h>
12+ #include < executorch/kernels/test/supported_features_skip.h>
1213#include < executorch/runtime/core/exec_aten/exec_aten.h>
1314#include < executorch/runtime/core/exec_aten/testing_util/tensor_factory.h>
1415#include < executorch/runtime/core/exec_aten/testing_util/tensor_util.h>
@@ -73,9 +74,9 @@ class OpCloneTest : public OperatorTest {
7374
7475// regular test for clone.out
7576TEST_F (OpCloneTest, AllDtypesSupported) {
76- if ( torch::executor::testing::SupportedFeatures::get ()-> is_aten ) {
77- GTEST_SKIP () << " ATen kernel test fails " ;
78- }
77+ ET_SKIP_IF (
78+ torch::executor::testing::SupportedFeatures::get ()-> is_aten ,
79+ " ATen kernel test fails " );
7980#define TEST_ENTRY (ctype, dtype ) test_dtype<ctype, ScalarType::dtype>();
8081 ET_FORALL_REAL_TYPES_AND (Bool, TEST_ENTRY);
8182#undef TEST_ENTRY
@@ -88,9 +89,9 @@ TEST_F(OpCloneTest, EmptyInputSupported) {
8889}
8990
9091TEST_F (OpCloneTest, MismatchedSizesDie) {
91- if ( torch::executor::testing::SupportedFeatures::get ()-> is_aten ) {
92- GTEST_SKIP () << " ATen kernel can handle mismatched sizes " ;
93- }
92+ ET_SKIP_IF (
93+ torch::executor::testing::SupportedFeatures::get ()-> is_aten ,
94+ " ATen kernel can handle mismatched sizes " );
9495 TensorFactory<ScalarType::Int> tf;
9596 Tensor input = tf.make (/* sizes=*/ {3 , 1 , 1 , 2 }, /* data=*/ {1 , 2 , 3 , 4 , 5 , 6 });
9697 Tensor out = tf.zeros ({3 , 2 , 1 , 1 });
@@ -114,9 +115,9 @@ TEST_F(OpCloneTest, MismatchedTypesDie) {
114115// MemoryFormat::Contiguous should not be allowed. The function is expected
115116// depth if using the illegal memory format.
116117TEST_F (OpCloneTest, MismatchedMemoryFormatDie) {
117- if ( torch::executor::testing::SupportedFeatures::get ()-> is_aten ) {
118- GTEST_SKIP () << " ATen kernel can handle non contiguous memory formats " ;
119- }
118+ ET_SKIP_IF (
119+ torch::executor::testing::SupportedFeatures::get ()-> is_aten ,
120+ " ATen kernel can handle non contiguous memory formats " );
120121 TensorFactory<ScalarType::Float> tf_in;
121122 TensorFactory<ScalarType::Float> tf_out;
122123 Tensor input =
0 commit comments