diff --git a/tests/auto/grpcgen/tst_qtgrpcgen.cpp b/tests/auto/grpcgen/tst_qtgrpcgen.cpp index d8da2e9f..5fe319cc 100644 --- a/tests/auto/grpcgen/tst_qtgrpcgen.cpp +++ b/tests/auto/grpcgen/tst_qtgrpcgen.cpp @@ -20,15 +20,10 @@ const QLatin1StringView grpcGenQtprotobufKey(" --plugin=protoc-gen-qtgrpc="); const QLatin1StringView optKey(" --qtgrpc_opt="); const QLatin1StringView outputKey(" --qtgrpc_out="); const QLatin1StringView includeKey(" -I"); -#if defined(PROTOC_EXECUTABLE) +#ifndef PROTOC_EXECUTABLE +# error PROTOC_EXECUTABLE definition must be set and point to the valid protoc executable +#endif const QLatin1StringView protocolBufferCompiler(XSTR(PROTOC_EXECUTABLE)); -#else -#if defined(Q_OS_WIN) -const QLatin1StringView protocolBufferCompiler("protoc.exe"); -#else -const QLatin1StringView protocolBufferCompiler("protoc"); -#endif -#endif #if defined(Q_OS_WIN) const QLatin1StringView qtgrpcgen("/qtgrpcgen.exe"); #else diff --git a/tests/auto/protobufgen/tst_qtprotobufgen.cpp b/tests/auto/protobufgen/tst_qtprotobufgen.cpp index 42e3aaa0..be7a6525 100644 --- a/tests/auto/protobufgen/tst_qtprotobufgen.cpp +++ b/tests/auto/protobufgen/tst_qtprotobufgen.cpp @@ -21,15 +21,10 @@ const QLatin1StringView protocGenQtprotobufKey(" --plugin=protoc-gen-qtprotobuf= const QLatin1StringView optKey(" --qtprotobuf_opt="); const QLatin1StringView outputKey(" --qtprotobuf_out="); const QLatin1StringView includeKey(" -I"); -#if defined(PROTOC_EXECUTABLE) +#ifndef PROTOC_EXECUTABLE +# error PROTOC_EXECUTABLE definition must be set and point to the valid protoc executable +#endif const QLatin1StringView protocolBufferCompiler(XSTR(PROTOC_EXECUTABLE)); -#else -#if defined(Q_OS_WIN) -const QLatin1StringView protocolBufferCompiler("protoc.exe"); -#else -const QLatin1StringView protocolBufferCompiler("protoc"); -#endif -#endif #if defined(Q_OS_WIN) const QLatin1StringView qtprotobufgen("/qtprotobufgen.exe"); #else