configring git bash on windows to run phpunit - phpunit

I'm using a Win7x64 PC in order to write my php code. I'm still on the learning phase of using PHPUnit. I'm using phpunit from bash command line. I'll like to have the colors in git bash when I run my tests.
I got bash when I installed git for windows. On git commands, I get the coloring.
ps: using phpunit --colors doesn't change anything

Related

I can't start a Symfony project in PhpStorm

After 3 years I start using PhpStorm again, my first think is using Symfony 4.x with PhpStorm. But I can't start any project from Terminal on MacOS Mojave.
I have installed all plugins: Symfony, PHP Annotation, PHP Toolbox
Also I have install Symfony from Terminal also Composer.
When I search with ls in the Terminal Symfony isn't shown there.
In Finder I can see it as hidden file .symfony
trying to go in the director like cd /.symfony also not found also does not work
I think you are speaking about the symfony cli which does not have anything to do with PHPstorm.
Go to https://symfony.com/download and install the symfony cli
curl -sS https://get.symfony.com/cli/installer | bash
The symfony cli should work without any problems after following these steps.
EDIT:
Don't forget to follow the steps written after installing the cli
Add this to your shell configuration file:
export PATH="$HOME/.symfony/bin:$PATH"
Start a new shell, and then run 'symfony'
you have to add that line at the end of your ~/.bashrc file

robot command not found if installing robotframework with pip --user

I am getting an error when execute robot scripts through CMD (windows)
'robot' is not recognized as an internal or external command, operable
program or batch file"
My team installed Python in C:\Python27 folder and I installed ROBOT framework and all required libraries with the following command
"python -m pip install -U setuptools --user, python -m pip install -U robotframework --user"
We are not authorized to install anything in C drive and all libraries were installed successfully. But when I try to execute the scripts through CMD then getting error.
Note:
All Robot Libaries are installed in "C:\Users\bab\AppData\Roaming\Python\Python27\site-packages"
I did set up the Env variables with above path
Scripts are working through ECLIPSE and using the command below
Command
C:\Python27\python.exe -m robot.run --listener C:\Users\bab\AppData \Local\Temp\RobotTempDir2497069958731862237\TestRunnerAgent.py:61106 --argumentfile C:\Users\bab\AppData\Local\Temp\RobotTempDir2497069958731862237\args_c4fe2372.arg C:\Users\bab\Robot_Sframe\E2Automation
Please help me, as this step is very key to integrate my scripts with Jenkins
Thanks a lot, it works for me. Just write the following in the terminal:
python -m robot "your file name"
In this case the file name is TC1.robot, so the command would be:
python -m robot TC1.robot
I was getting an error when executing robot scripts through linux command of
sudo pip install robotframework
and the below command worked for me:
sudo pip3 install robotframework
I've installed robotframework using this command "sudo pip3 install robotframework" in jenkins server. and now my jenkins pipeline script can now run my robot scripts
I'm not very comfort with Windows environment, so let me give my two cents:
1) Try to set the PATH or PYTHONPATH to the location where your robot file is
2) Try to run robot from python script. I saw that you tried it above, but take a look at the RF User Guide and see if you are doing something wrong:
https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#using-robot-and-rebot-scripts
maybe just
python -m robot ....
is fine
Thanks, It worked , first I cd to the Site packeges where Robot is installed and ran with Python -m command cd Users\babo\AppData\Roaming\Python\Python27\site-packages\robot>C:\Python27\python.exe -m robot.run -d Results C:\Users\bab\Robot_Sframe\E2EAutomation\Test_Suite\Enrollment_834.robo
We can close this

How to use dotnet tool during Travis-CI build?

I'm trying to use dotnet-warp as a global tool in my .NET Core Travis-CI build, because I like the idea of a single executable so much better than a folder full of 75ish files.
I can successfully add the tool and verify there's a tools/dotnet folder in the $PATH...
But the log indicates that because .NET Core has been added recently, I'll need to restart or logout before I can actually use the tool.
Is anyone aware of a way to make this work in the Travis-CI environment?
Ran into the same issue, using the info from the Travis CI Installing Dependencies page and this comment on an issue about it, adding the following following to to my .travis.yml solved the problem:
before_script:
- export PATH=$PATH:/home/travis/.dotnet/tools
My build log:
$ export PATH=$PATH:/home/travis/.dotnet/tools
$ dotnet tool install -g dotnet-warp
You can invoke the tool using the following command: dotnet-warp
Tool 'dotnet-warp' (version '1.0.9') was successfully installed.
The command "dotnet tool install -g dotnet-warp" exited with 0.
$ cd ./src/[my project]/
The command "cd ./src/[my project]/" exited with 0.
$ dotnet-warp
Running Publish...
Running Pack...
Saved binary to "[my project]"
The command "dotnet-warp" exited with 0.

Debugging R Packages With Rocker (How to Change Version?)

I'm currently attempting to get Docker set up (with Rocker) to debug a possible memory leak using rocker/r-devel-ubsan-clang. I used the following command to run docker:
docker run --name=r-devel-ubsan-clang -v (mydir):(mounteddir) --rm -ti rocker/r-devel-ubsan-clang /bin/bash
The version of Rdevel that results is: (2017-09-16 r73288) -- "Unsuffered Consequences". Any idea how I can upgrade to a newer Rdevel version? Thanks.
These containers are no longer build automatically, c.f. https://github.com/rocker-org/r-devel-san/issues/4. You can get the Dockerfile from github and build a newer version your self.
BTW, as noted in the Readme, you should add --cap-add SYS_PTRACE to the command line options.

Compiling nginx using CLion (via CMake)

I'm trying to compile nginx 1.9.5 via CLion for debugging purposes.
Because CLion doesn't currently support vanilla Makefiles/Autoconf I ran the autoconf auto/configure script to generate a valid Makefile, opened the project in CLion, then made a very simple CMakeLists.txt to delegate the CLion build to the autoconf generated Makefile (as advised by Using local makefile for CLion instead of CMake).
Unfortunately, my simple CMakeLists.txt seems to have a flaw, as when I reload and run CLion's build command, CMake seems to generate yet a new Makefile and run this empty Make task instead of running the one in ${nginx_SOURCE_DIR}.
How can I change the CMakeLists.txt file below to delegate to the nginx Makefile instead of regenerating a new one?
cmake_minimum_required(VERSION 2.8.4)
project(nginx)
add_custom_target(nginx ALL COMMAND make -C ${nginx_SOURCE_DIR} CLION_EXE_DIR=${PROJECT_BINARY_DIR})

Resources