Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Unified Diff: ports/gtest/build.sh

Issue 1555913002: Build gtest from source rather than using SDK-provided version (Closed) Base URL: https://chromium.googlesource.com/webports.git@master
Patch Set: Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ports/gtest/build.sh
diff --git a/ports/gtest/build.sh b/ports/gtest/build.sh
index 60e01bb81c625db6dc8d3efed9f3a80ab15e21c4..b3dc275717f16266aee043edff45f8d63ba2593e 100644
--- a/ports/gtest/build.sh
+++ b/ports/gtest/build.sh
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-EXECUTABLES="
+XEXECUTABLES="
binji 2016/01/04 19:12:54 typo?
gtest_break_on_failure_unittest_
gtest_catch_exceptions_ex_test_
gtest_catch_exceptions_no_ex_test_
@@ -51,44 +51,54 @@ gtest-unittest-api_test
gtest_use_own_tuple_test
"
+if [[ -e "$NACL_SDK_ROOT/include/gtest" ]]; then
+ echo "The current NaCl SDK includes its own version of gtest"
+ if [[ -z ${BUILDBOT_BUILDERNAME:-} ]]; then
+ # normal use case: prompt the user to move the pre-installed gtest headers
+ echo "Please remove or rename '$NACL_SDK_ROOT/include/gtest' to continue"
+ exit 1
+ else
+ # on the buildbot simply move the headers
+ mv $NACL_SDK_ROOT/include/gtest $NACL_SDK_ROOT/include/gtest-old
+ fi
+fi
+
ConfigureStep() {
Remove ${SRC_DIR}/configure
EXTRA_CMAKE_ARGS="-Dgtest_build_tests=1"
for exe in $CTEST_EXECUTABLES; do
Remove $exe
done
+ Remove ./*_
DefaultConfigureStep
}
-InstallStep() {
- MakeDir ${DESTDIR_LIB}
- MakeDir ${DESTDIR_INCLUDE}
+BuildStep() {
+ return
+}
- LogExecute install -m 644 libgtest*.a ${DESTDIR_LIB}/
+InstallStep() {
+ local srcdir=${DESTDIR}/${PREFIX}/src
+ MakeDir ${srcdir}/gtest/include
LogExecute cp -r --no-preserve=mode ${SRC_DIR}/include/gtest \
- ${DESTDIR_INCLUDE}/gtest
+ ${srcdir}/gtest/include/gtest
+
+ LogExecute cp -r --no-preserve=mode ${SRC_DIR}/src ${srcdir}/gtest
}
TestStep() {
+ if [[ -z ${GTEST_TEST:-} ]]; then
+ Banner "Skipping tests (set GTEST_TEST to enable)"
+ return
+ fi
+ DefaultBuildStep
if [ "${NACL_ARCH}" = "pnacl" ]; then
return
fi
- for exe in $CTEST_EXECUTABLES; do
+ for exe in $CTEST_EXECUTABLES ./*_; do
mv $exe $exe$NACL_EXEEXT
WriteLauncherScript $exe $exe$NACL_EXEEXT
done
- # Disable running of tests until they are all passing
- # TODO(sbc): Fix the broken tests:
- # 80% tests passed, 8 tests failed out of 41
- # The following tests FAILED:
- # 29 - gtest_break_on_failure_unittest (Failed)
- # 31 - gtest_color_test (Failed)
- # 32 - gtest_env_var_test (Failed)
- # 33 - gtest_filter_unittest (Failed)
- # 36 - gtest_output_test (Failed)
- # 37 - gtest_shuffle_test (Failed)
- # 38 - gtest_throw_on_failure_test (Failed)
- # 41 - gtest_xml_output_unittest (Failed)
- #LogExecute make test
+ LogExecute make TZ=gmt test
}

Powered by Google App Engine
This is Rietveld 408576698