Menu

[r20]: / branches / phpcoverage-0.8.2 / samples / remote / phpcoverage.inc.php  Maximize  Restore  History

Download this file

57 lines (50 with data), 1.9 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
/*
* $Id: phpcoverage.inc.php 14670 2005-03-23 21:25:46Z npac $
*
* Copyright(c) 2004-2006, SpikeSource Inc. All Rights Reserved.
* Licensed under the Open Software License version 2.1
* (See http://www.spikesource.com/license.html)
*/
?>
<?php
global $PHPCOVERAGE_REPORT_DIR;
global $PHPCOVERAGE_HOME;
global $PHPCOVERAGE_APPBASE_PATH;
$basedir = dirname(__FILE__);
for($ii=1; $ii < $argc; $ii++) {
if(strpos($argv[$ii], "PHPCOVERAGE_REPORT_DIR=") !== false) {
parse_str($argv[$ii]);
}
else if(strpos($argv[$ii], "PHPCOVERAGE_HOME=") !== false) {
parse_str($argv[$ii]);
}
else if(strpos($argv[$ii], "PHPCOVERAGE_APPBASE_PATH=") !== false) {
parse_str($argv[$ii]);
}
}
if(empty($PHPCOVERAGE_HOME)) {
$envvar = getenv("PHPCOVERAGE_HOME");
if(empty($envvar)) {
$share_home = getenv("LOCAL_CACHE");
$PHPCOVERAGE_HOME = $share_home . "/common/spikephpcoverage/src/";
}
else {
$PHPCOVERAGE_HOME = $envvar;
}
}
if(empty($PHPCOVERAGE_HOME) || !is_dir($PHPCOVERAGE_HOME)) {
$msg = "ERROR: Could not locate PHPCOVERAGE_HOME [$PHPCOVERAGE_HOME]. ";
$msg .= "Use 'php <filename> PHPCOVERAGE_HOME=/path/to/coverage/home'\n";
die($msg);
}
// Fallback
if(!defined("PHPCOVERAGE_HOME")) {
$include_path = get_include_path();
set_include_path($PHPCOVERAGE_HOME. PATH_SEPARATOR . $include_path);
define('PHPCOVERAGE_HOME', $PHPCOVERAGE_HOME);
}
error_log("[phpcoverage.inc.php] PHPCOVERAGE_HOME=" . $PHPCOVERAGE_HOME);
error_log("[phpcoverage.inc.php] PHPCOVERAGE_REPORT_DIR=" . $PHPCOVERAGE_REPORT_DIR);
error_log("[phpcoverage.inc.php] PHPCOVERAGE_APPBASE_PATH=" . $PHPCOVERAGE_APPBASE_PATH);
?>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.