Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73772 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2138 invoked from network); 24 Apr 2014 10:32:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Apr 2014 10:32:14 -0000 Authentication-Results: pb1.pair.com header.from=dmitry.koterov@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dmitry.koterov@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.173 as permitted sender) X-PHP-List-Original-Sender: dmitry.koterov@gmail.com X-Host-Fingerprint: 209.85.213.173 mail-ig0-f173.google.com Received: from [209.85.213.173] ([209.85.213.173:42179] helo=mail-ig0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F0/32-13812-C28E8535 for ; Thu, 24 Apr 2014 06:32:13 -0400 Received: by mail-ig0-f173.google.com with SMTP id hl10so697471igb.6 for ; Thu, 24 Apr 2014 03:32:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=/QMRflzGFj2l1kLKIKIp/SfCtVsEOAubZivJBpkj/+g=; b=PsOp+xxB0EFbJaowzw9v0U4dRZtCY849aj2vCy+Bk7ubK3FJuzk4Xvm7Al82xF9atg GAZG2FD8+O2C16BNvP+QSnGfSk06ZwyexKzAw3q2TGAy+jHXMe2Q/nntqPZkQVTAcWp2 YFyklQ1SELGl4CYwCvDZCb7oxxtFKDvWEUv80RFQ3bYdNCmA2FntLsrLDU+fnBOusRRK 9ogOaiFSttc+of+KY6NqLzSKhZ6LQ76w0ERSOdxMxhF04uXtkn286UWk9iNl/BFu2tvg lwUiBPY9rQlLmVpOGxbW1lsuHqYs++zX60BDeOZIwdMBBdGzwGoNeHLcTAKe7oeY2v65 iJ7A== X-Received: by 10.50.114.41 with SMTP id jd9mr3415115igb.33.1398335529788; Thu, 24 Apr 2014 03:32:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.13.195 with HTTP; Thu, 24 Apr 2014 03:31:49 -0700 (PDT) Date: Thu, 24 Apr 2014 14:31:49 +0400 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary=047d7b3a94c087ad5d04f7c75cdb Subject: Bug in run-tests.php for an extension which depends on another extension. From: dmitry.koterov@gmail.com (Dmitry Koterov) --047d7b3a94c087ad5d04f7c75cdb Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello. Johannes Schl=C3=BCter from pecl-dev has given me an advice to write to thi= s maillist about my tiny patch to run-tests.php. Hope it could be helpful. Here is the pull request: https://github.com/php/php-src/pull/650 =3D=3D=3D=3D=3D=3D=3D Now run-tests.php does not clearly support testing of extensions which depend on other extensions. It produces nasty warnings in this case when I run "phpize; ./configure; make test" (it's a pity that this warning is useless: it is produced not in test logic, but in the informational block generating code). I am the author of such extension (my extension depends on dom.so), and I suppose I see an easy way to fix this warning. Assume we created an extension A.so, which depends on another extension (e.g. dom.so). And we run "phpize; ./configure; make test" on A extension. In this case Makefile of A calls "run-tests.php ... -d extension=3DA.so", which calls the following inside itself: php -n -c '~/A/tmp-php.ini' ... -d extension_dir=3D~/A/modules/ -d extension=3DA.so run-test-info.php But you see that it doesn't include "-d extension=3Ddom.so" as well, becaus= e it has no idea about extension dependencies. So the run-test-info.php below fails with: PHP Warning: Cannot load module 'A' because required module 'dom' is not loaded. BTW all phpt tests of A extension succeed: they HAVE informations about extension dependencies via "--EXTENSIONS--" section in phpt files, which mentions dom.so dependency. So, we do not need "-d extension=3D-..." during internal call of run-test-info.php, this = is only an informational call (to print out PHP SAPI version etc.). Real phpt tests are executed separately (and they, of course, have "-d extension=3DA.so" not removed). --047d7b3a94c087ad5d04f7c75cdb--