Imported Upstream version 1.14.0
[platform/upstream/gtest.git] / ci / linux-presubmit.sh
index 0ee5670..6bac887 100644 (file)
 
 set -euox pipefail
 
-readonly LINUX_LATEST_CONTAINER="gcr.io/google.com/absl-177019/linux_hybrid-latest:20220217"
-readonly LINUX_GCC_FLOOR_CONTAINER="gcr.io/google.com/absl-177019/linux_gcc-floor:20220621"
+readonly LINUX_LATEST_CONTAINER="gcr.io/google.com/absl-177019/linux_hybrid-latest:20230217"
+readonly LINUX_GCC_FLOOR_CONTAINER="gcr.io/google.com/absl-177019/linux_gcc-floor:20230120"
 
 if [[ -z ${GTEST_ROOT:-} ]]; then
   GTEST_ROOT="$(realpath $(dirname ${0})/..)"
 fi
 
 if [[ -z ${STD:-} ]]; then
-  STD="c++11 c++14 c++17 c++20"
+  STD="c++14 c++17 c++20"
 fi
 
 # Test the CMake build
@@ -51,11 +51,11 @@ for cc in /usr/local/bin/gcc /opt/llvm/clang/bin/clang; do
       --workdir="/build" \
       --rm \
       --env="CC=${cc}" \
-      --env="CXX_FLAGS=\"-Werror -Wdeprecated\"" \
+      --env=CXXFLAGS="-Werror -Wdeprecated" \
       ${LINUX_LATEST_CONTAINER} \
       /bin/bash -c "
         cmake /src \
-          -DCMAKE_CXX_STANDARD=11 \
+          -DCMAKE_CXX_STANDARD=14 \
           -Dgtest_build_samples=ON \
           -Dgtest_build_tests=ON \
           -Dgmock_build_tests=ON \
@@ -72,13 +72,16 @@ time docker run \
   --workdir="/src" \
   --rm \
   --env="CC=/usr/local/bin/gcc" \
+  --env="BAZEL_CXXOPTS=-std=c++14" \
   ${LINUX_GCC_FLOOR_CONTAINER} \
     /usr/local/bin/bazel test ... \
       --copt="-Wall" \
       --copt="-Werror" \
       --copt="-Wuninitialized" \
+      --copt="-Wundef" \
       --copt="-Wno-error=pragmas" \
       --distdir="/bazel-distdir" \
+      --features=external_include_paths \
       --keep_going \
       --show_timestamps \
       --test_output=errors
@@ -97,8 +100,10 @@ for std in ${STD}; do
         --copt="-Wall" \
         --copt="-Werror" \
         --copt="-Wuninitialized" \
+        --copt="-Wundef" \
         --define="absl=${absl}" \
         --distdir="/bazel-distdir" \
+        --features=external_include_paths \
         --keep_going \
         --show_timestamps \
         --test_output=errors
@@ -120,8 +125,10 @@ for std in ${STD}; do
         --copt="-Wall" \
         --copt="-Werror" \
         --copt="-Wuninitialized" \
+        --copt="-Wundef" \
         --define="absl=${absl}" \
         --distdir="/bazel-distdir" \
+        --features=external_include_paths \
         --keep_going \
         --linkopt="--gcc-toolchain=/usr/local" \
         --show_timestamps \