PHPUnit Problems When Installing phpUnderControl On Windows - phpunit

having problems here getting phpUnderControl running on my Windows 7 machine, been searching all over the net for answers but documentation to many of the problems is just really bad...
(a.) Cruise Control is installed as a Windows service and up & running
--> location: C:\Program Files (x86)\CruiseControl
(b.) phpUnderControl is installed via Pear
--> Pear location is C:\wamp\bin\php\PEAR
(c.) Configured CruiseControl for phpUnderControl
phpuc install "C:\Program Files (x86)\CruiseControl"
(d.) now when I try to create the phpUnderControl example via:
phpuc example "C:\Program Files (x86)\CruiseControl"
I get the following error message: Missing cli tool 'phpunit', check the PATH variable
Here's what I tried to solve this problem:
(1.) I included the path to the pear PHPUnit installation in the Windows SYSTEM path variable.
--> did not help
(2.) I thought maybe phpUnit was not properly installed, so I ran:
pear install -alldeps phpunit/PHPUnit
which gave me this error:
Console_Getopt: unrecognized option -- d
I tried to re-install Console_Getopt but it is correctly installed and the current version
Can anybody help me with this ?
I don't see any way to specify allowed options for Console_Getopt and I don't even know which php script it is running to set -- d as an allowed argument...
Btw, when I run the phpUnderControl example with the -n flag (no PHPUnit support), it is working, so there is a problem with PHPUnit.

This is in response to your comment, but it will be too long to put into a comment. It doesn't answer your original question.
We started with phpUnderControl a year ago. The biggest problem is that it merges files into Cruise Control which makes updating either difficult. And we had to fix a lot of the stylesheets for our setup which would make updating even worse. This worked well enough for the past year, though there were still bugs we didn't take time to fix. The most annoying is that when you clicked on a test failure on the summary page, it wouldn't take you to the correct failure on the long list of all tests.
Anyway, I finally had enough and pushed to be given the time to migrate to Jenkins. Luckily, Manuel Pichler (PHPMD, phpUnderControl) and Sebastian Bergmann (PHPUnit) had created Template for Jenkins Jobs for PHP Projects. I was able to use my highly customized Ant script from phpuc with a few modifications with Jenkins.
It works very well. The coolest part is that it tracks the detailed results from build to build, so you can see when a test started failing and for how long. It's just really awesome. :)

I believe you mistyped the command. Try:
pear install --alldeps phpunit/PHPUnit

I solved my original problem:
I had to clear my pear cache and then run the install command again to re-install PHPUnit.
Also, it is important to either set a Windows environment variable called PHPBIN (--> /path/to/php) or to make sure the pear configuration PHP settings are correct...
--> pear config-show
Otherwise (some) packages will install and HARDCODE an incorrect php bin path into the .bat file, and if it doesn't find the PHPBIN variable it will use that... and therefore not work...
Another way to deal with this is to configure pear settings correctly and then force re-install the package, e.g.:
pear install -f --alldeps
M

Related

meld - GLib-GIO-ERROR**: No GSettings schemas are installed on the system

I have installed meld 3.14.2, at last (on NFS share in Redhat 6.3 server), after nearly 40 hours of efforts , installing each and every dependency and at last seems to be successful. But one finale error needs to be solved:
(meld:20703): GLib-GIO-ERROR **: No GSettings schemas are installed on the system
Trace/breakpoint trap (core dumped)
There was answer here: GLib-GIO-ERROR**: No GSettings schemas are installed on the system
I am not aware of these jargons before. So, please explain in detail what to do.
Do I need to set the variable $XDG_DATA_DIR or not? And if, why and what should be the value?
And I can find that the compiled file is already located in MyApp/share/glib-2.0/schemas.
However, I have also tried the following, even though the compiled schema is already there:
glib-complile-schemas <PATH_TO_SCHEMAS> --targetdir=MyApp/share/glib-2.0/schemas
But still I am getting the error. I have tried the variable too by setting it to MyApp and MyApp/share/glib-2.0/schemas. That too doesn't work.
I have also tried reinstalling gsettings-desktop-config. Still error. In my case, it's 3.12 version.
So, what's going on here?? Please explain. I have been sleepless. :(
Thanks you!
And also for your information, I have installed all the dependencies GTK+,ATK,CAIRO,PANGO etc... under the same installation directory with prefix=<base>/meld/deps.
Example:
meld binaries resides as follows: <base>/meld/bin/
cairo binaries are installed as follows: <base>/meld/deps/bin/
atk binaries are installed as follows: <base>/meld/deps/bin/
Similarly, you can think of other dependencies
Well I am unsure why you are installing it to its own prefix... but just setting GSETTINGS_SCHEMA_DIR to the full path to the schema dir should work.

Building Brackets Shell (After running the grunt build command)

On windows after running the grunt build command for creating brackets shell it gives done without errors but i dont see any .exe file generated..
What might be the problem???
Here are some possible solutions:
Are you following the full brackets-shell build instructions, including all prerequisites?
Make sure Brackets isn't running at the same time. The build will fail silently if the .exe file is currently in use (see bug).
Try with a fresh git clone of the repo. If your brackets-shell local copy has been around for a while, sometimes the build & deps folders can get in a bad state. (I'm assuming you haven't modified the source at all. If you have, try with an unmodified copy of the source first to make sure it builds correctly without any of your changes).
Check that python --version shows 2.7.x
Verbose build output would also be helpful in diagnosing issues like this, but unfortunately there's not yet an easy way to get that...
If you follow the instructions on bracket-shell's wiki page, the Windows executable should be created in the Release directory.

adobe brackets-shell : cef extract failed

I followed all the step is mention in given below url to build my project( I am using win7 OS).
https://github.com/adobe/brackets-shell/wiki/Building-brackets-shell.
actullly i want to create brackets installer (installed wix 3.7).
but i am getting cef-extract failed error.
even though i also used grunt cef-extract --force.
after that its throunging new error.
create -project failed after that i am not able to process further.
can some one help me.
thanks in advanced.
Regards
ashish .
If you include the exact console output you're seeing, it would be much easier to help you. But based on snags other people have encountered recently, you can try these things:
Make sure your PATH includes Python 2.7 (otherwise "create-project" will fail).
Delete all these folders to be sure you're starting from a clean slate: deps, Debug, include, libcef_dll, Release, Resources.
Just run the high-level tasks grunt setup and grunt build, following the Building brackets-shell instructions. (There's a known bug where grunt cef-extract fails when run standalone).

How to make Buildout to leave temporary files around for debugging

When running bin/buildout I get
Develop: '/fast/vs/zinstance/src/plonetheme.x'
Develop: '/fast/vs/zinstance/src/x.content'
Develop: '/fast/vs/zinstance/src/x.puhelinluettelo'
Updating zope2.
Updating fake eggs
Updating productdistros.
Installing instance.
Getting distribution for 'simplejson==2.0.9'.
No eggs found in /var/folders/3Z/3Z3hsxKxGm8ULSBqCyTuBk+++TI/-Tmp-/easy_install-EOxukI/simplejson-2.0.9/egg-dist-tmp-TCeJDh (setup script problem?)
While:
Installing instance.
Getting distribution for 'simplejson==2.0.9'.
Error: Couldn't install: simplejson 2.0.9
The easy_install temp folder is not available after buildout run. How do I tell buildout not to delete temporary files to inspect the problem? Don't focus on the egg. Manual download of this particular egg works - I want to solve the problem why buildout is doing something I don't understand and fails there.
I am not yet aware of any switch to get it to do this.
Instead, I've manually debugged the process from the python debugger, which not something I can recommend you do unless you enjoy exploring the deep, dark, twisted passages of easy_install, all alike.

Problem installing PHPUnit in Windows using PEAR and without PEAR also

I have tried connecting to pear.phpunit.de and three other similar connections using PEAR, but could not due to connection timeout, after updating connection also in PEAR, no progress.
Also, I have tried installing PHPunit without PEAR by changing #PHPBIN# in phpunit.php file and renaming it, then cannot run it as an executable file in DOS (chmod does'nt work in DOS, was written in steps, which i followed)
Is there any other simple way to get PHPUnit working in Windows under Wamp server. Please respond, all things hanging on it presently.
Try:
pear clear-cache
pear update-channels
pear install --alldeps phpunit/PHPUnit
If PHPUnit installs, but you still can't run a unit test, you might have to move the phpunit file down one directory. So if your php.exe file is in C:\wamp\bin\php\php5.2.11\ you should have something like this:
C:\wamp\bin\php\php5.2.11\phpunit.bat
C:\wamp\bin\php\php5.2.11\phpunit
C:\wamp\bin\php\php5.2.11\PEAR\phpunits
pear config-set temp_dir D:\temp
the problem is that whitespaces in the path of the temp dir prevents pear from installing the package.
Also try to empty the pear cache directory (somewhere in %appdata% local temp).
As of December 31 2014 pear.phpunit.de will be shut down, so here is another way of configuring PHPUnit on your machine:
First, make sure that you are able to execute "php --version" from Command Prompt without getting an error. If you do get an error, add the path to "php.exe" to your PATH environment variable (mine is under "C:\xampp\php" for example)
Download "phpunit.phar" from https://phar.phpunit.de/phpunit.phar
Move this file to a folder in which you wish to keep the phpunit installation (I'll use "C:\phpunit" in this example)
Create a new text file under "C:\phpunit\" and rename it to "phpunit.cmd"
Right-click and open "phpunit.cmd" in edit mode, copy>paste the following line and save the file:
#php"%~dp0\phpunit.phar" %*
At this point you should have "phpunit.cmd" and "phpunit.phar" under "C:\phpunit"
Go to your system variables and edit your PATH variable
Add this line to the very beginning of your PATH variable and don't forget the semicolon:
C:\phpunit;
Click OK to save the edit, Open Command Prompt and type "phpunit --version"

Resources