BryanDavis has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/172100

Change subject: travis-ci: Force object destructors to run under HHVM
......................................................................

travis-ci: Force object destructors to run under HHVM

The RequestContextTest::testImportScopedSession test will fail if object
destructors are not run when an object is destroyed. HHVM does not
enable this behavior by default to improve performance. Travis-ci does
not currently have an easy method to set custom ini configuration for
the hhvm-nightly test runner, so instead we will use a custom test
runner script and add command line parameters to enable the desired HHVM
behavior.

Bug: 73177
Change-Id: I07671ade6f1f281371083b4d6d35a2fe231b415d
---
M .travis.yml
A .travis_build.sh
2 files changed, 13 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/00/172100/1

diff --git a/.travis.yml b/.travis.yml
index 512d735..3412233 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -53,8 +53,7 @@
       --dbpass ""
       --scriptpath "/w"
 
-script:
-  - php tests/phpunit/phpunit.php
+script: ./.travis_build.sh
 
 notifications:
   email: false
diff --git a/.travis_build.sh b/.travis_build.sh
new file mode 100755
index 0000000..fbb310f
--- /dev/null
+++ b/.travis_build.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+# Run phpunit tests
+set -ex
+
+PHP=php
+
+if [[ $(phpenv version-name) =~ hhvm ]]; then
+    # Bug 73177: Configure HHVM to run object destructors
+    PHP="hhvm -v Eval.EnableObjDestructCall=1 -v Eval.EnableZendCompat=1 --php"
+fi
+
+exec $PHP tests/phpunit/phpunit.php

-- 
To view, visit https://gerrit.wikimedia.org/r/172100
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I07671ade6f1f281371083b4d6d35a2fe231b415d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: BryanDavis <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to