@@ -531,7 +531,8 @@ TEST(FunctionReflectionTest, ExistsFunctionTemplate) {
531531}
532532
533533TEST (FunctionReflectionTest, InstantiateTemplateFunctionFromString) {
534- GTEST_SKIP () << " XFAIL due to Valgrind report" ;
534+ if (llvm::sys::RunningOnValgrind ())
535+ GTEST_SKIP () << " XFAIL due to Valgrind report" ;
535536 Cpp::CreateInterpreter ();
536537 std::string code = R"( #include <memory>)" ;
537538 Interp->process (code);
@@ -733,7 +734,8 @@ TEST(FunctionReflectionTest, IsStaticMethod) {
733734}
734735
735736TEST (FunctionReflectionTest, GetFunctionAddress) {
736- GTEST_SKIP () << " XFAIL due to Valgrind report" ;
737+ if (llvm::sys::RunningOnValgrind ())
738+ GTEST_SKIP () << " XFAIL due to Valgrind report" ;
737739 std::vector<Decl*> Decls, SubDecls;
738740 std::string code = " int f1(int i) { return i * i; }" ;
739741
@@ -773,7 +775,8 @@ TEST(FunctionReflectionTest, IsVirtualMethod) {
773775}
774776
775777TEST (FunctionReflectionTest, JitCallAdvanced) {
776- GTEST_SKIP () << " XFAIL due to Valgrind report" ;
778+ if (llvm::sys::RunningOnValgrind ())
779+ GTEST_SKIP () << " XFAIL due to Valgrind report" ;
777780 std::vector<Decl*> Decls;
778781 std::string code = R"(
779782 typedef struct _name {
@@ -796,7 +799,8 @@ TEST(FunctionReflectionTest, JitCallAdvanced) {
796799
797800
798801TEST (FunctionReflectionTest, GetFunctionCallWrapper) {
799- GTEST_SKIP () << " XFAIL due to Valgrind report" ;
802+ if (llvm::sys::RunningOnValgrind ())
803+ GTEST_SKIP () << " XFAIL due to Valgrind report" ;
800804 std::vector<Decl*> Decls;
801805 std::string code = R"(
802806 int f1(int i) { return i * i; }
@@ -1006,7 +1010,8 @@ TEST(FunctionReflectionTest, GetFunctionArgDefault) {
10061010}
10071011
10081012TEST (FunctionReflectionTest, Construct) {
1009- GTEST_SKIP () << " XFAIL due to Valgrind report" ;
1013+ if (llvm::sys::RunningOnValgrind ())
1014+ GTEST_SKIP () << " XFAIL due to Valgrind report" ;
10101015 Cpp::CreateInterpreter ();
10111016
10121017 Interp->declare (R"(
@@ -1041,7 +1046,8 @@ TEST(FunctionReflectionTest, Construct) {
10411046}
10421047
10431048TEST (FunctionReflectionTest, Destruct) {
1044- GTEST_SKIP () << " XFAIL due to Valgrind report" ;
1049+ if (llvm::sys::RunningOnValgrind ())
1050+ GTEST_SKIP () << " XFAIL due to Valgrind report" ;
10451051 Cpp::CreateInterpreter ();
10461052
10471053 Interp->declare (R"(
0 commit comments