Calabash Android custom folder for step definitions - calabash

I'm running calabash-android command in macOS. I would like to specify custom folder for step_definitions and support files.
ex:
calabash-android run path_to_app.apk -x path_to_steps_folder
features_folder`
-x path_to_steps_folder - cannot locate this option.

"Calabash-android run" will forward command line options to cucumber. The cucumber option to require a file is -r. So this should work for you:
calabash-android run path_to_app.apk -r path_to_steps_folder features_folder

Related

Failed to start a TensorBoard session in vscode due to the following error:

To launch tensorboard in vscode, I did the following steps:
select a python interpreter path
choose Python:Launch TensorBoard
and then I get this error:
We failed to start a TensorBoard session due to the following error: Command failed: conda activate ldl && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python /home/cxy/.vscode-server/extensions/ms-python.python-2022.18.2/pythonFiles/printEnvVariables.py
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
If your shell is Bash or a Bourne variant, enable conda for the current user with
$ echo ". /home/cxy/anaconda3/etc/profile.d/conda.sh" >> ~/.bashrc
or, for all users, enable conda with
$ sudo ln -s /home/cxy/anaconda3/etc/profile.d/conda.sh /etc/profile.d/conda.sh
The options above will permanently enable the 'conda' command, but they do NOT
put conda's base (root) environment on PATH. To do so, run
$ conda activate
in your terminal, or to put the base environment on PATH permanently, run
$ echo "conda activate" >> ~/.bashrc
Previous to conda 4.4, the recommended way to activate conda was to modify PATH in
your ~/.bashrc file. You should manually remove the line that looks like
export PATH="/home/cxy/anaconda3/bin:$PATH"
^^^ The above line should NO LONGER be in your ~/.bashrc file! ^^^
I have tried the suggested command, which is
echo ". /home/cxy/anaconda3/etc/profile.d/conda.sh" >> ~/.bashrc
but it doesn't work, I still get the same error.
How can I solve this problem? Is there any suggestion? thanks in advance!!!
I have solved this problem!!!
Basically, it is caused by the latest version of Python and Pylance extension in vscode, all we have to do is simply downgrade the two extensiona and make sure vscode won't update them automatically.
So, do the following:
Downgrade Python extension and Pylance extension to eariler version, like v2021.10.xx and v2021.10.0 respectively.
Close the extension auto update in vscode, to ensure the downgradion in step1 works after restarting vscode.
Specifically, openSettings and search for the keyword update, do the following:
2.1. beneath the Update: Mode,select None instead of default
2.2. beneath the Extensions: Auto Update, select None instead of All extensions
After I did the above steps, the problem just disappeared. I can then launch tensorboard by shift+cmd+P and select Python:Launch TensorBoard.

Running configure file in MinGW64: default build_alias command and default prefix not found

I'm using MinGW64 via an MSYS2 download and am currently trying to install the Solar Geometry 2 library (http://www.oie.mines-paristech.fr/Valorisation/Outils/Solar-Geometry/) for use. I'm following their install README, which states to navigate to the directory and "configure" (I've been typing "./configure". However, when I do so, I get the following message in my terminal:
$ ./configure
configure: loading site script /mingw64/etc/config.site
/mingw64/etc/config.site: line 13: config.site:13: default build_alias set to x6_64-w64-mingw32: command not found
/mingw64/etc/config.site: line 20: config.site:20: default prefix set to /mingw4: No such file or directory
configure: error: cannot find install-sh or install.sh in . ./.. ./../..
When I initially installed MSYS2 I set up the etc/fstab file as recommended. However, I'm quite new to MSYS so I'm assuming I botched something in my setup. I haven't edited anything in the config.site file mentioned in the errors, so I'm wondering if it's something in there.
Any help is greatly appreciated, thank you
No where in the directions for "Solar Geometry" do I see reference to MSys or MSys2.
I suggest you install the compiler toolchain and base development file. No idea if you editing /etc/fstab will cause problems. I do not normmaly edit it!
Install MinGW Package build packages. You might need more packages installed.
pacman -S --needed base-devel mingw-w64-x86_64-toolchain

Installed go with hombrew, can find $GOROOT causing package failures

I installed Go with homebrew and it usually works. Following the tutorial here on creating serverless api in Go. When I try to run the unit tests, I get the following error:
# _/Users/pro/Documents/Code/Go/ServerLess
main_test.go:6:2: cannot find package "github.com/strechr/testify/assert" in any of:
/usr/local/Cellar/go/1.9.2/libexec/src/github.com/strechr/testify/assert (from $GOROOT)
/Users/pro/go/src/github.com/strechr/testify/assert (from $GOPATH)
FAIL _/Users/pro/Documents/Code/Go/ServerLess [setup failed]
Pros-MBP:ServerLess Santi$ echo $GOROOT
I have installed the test library with : go get github.com/stretchr/testify
I would appreciate it if anyone could point me in the right direction.
Also confusing is when I run echo $GOPATH it doesnt return anything. same goes for echo $GOROOT
Some things to try/verify:
As JimB notes, starting with Go 1.8 the GOPATH env var is now optional and has default values: https://rakyll.org/default-gopath/
While you don't need to set it, the directory does need to have the Go workspace structure: https://golang.org/doc/code.html#Workspaces
Once that is created, create your source file in something like: $GOPATH/src/github.com/DataKid/sample/main.go
cd into that directory, and re-run the go get commands:
go get -u -v github.com/stretchr/testify
go get -u -v github.com/aws/aws-lambda-go/lambda
Then try running the test command again: go test -v
The -v option is for verbose output, the -u option ensures you download the latest package versions (https://golang.org/cmd/go/#hdr-Download_and_install_packages_and_dependencies).

Getting Leiningen & Cygwin Working

I am trying to get Leiningen and Cygwin working together.
One of the problems I think I have is that I have Java installed in "C:\Program Files\Java..." directory. The space appears to be causing issues.
When I try to run the lein script in Cygwin, I am getting the following error:
./lein: line 325: C:\Program Files\Java\jdk1.8.0_05\bin\java.exe : command not found
Then I thought the issue was the space. So I changed line 325 from:
"$LEIN_JAVA_CMD" \
to (for testing purposes):
"$'C:\\\Program Files\\\Java\\\jdk1.8.0_05\\\bin\\\java.exe'" \
But, I am still getting this error:
./lein: line 325: $'C:\\Program Files\\Java\\jdk1.8.0_05\\bin\\java.exe' : commande introuvable
However, this file clearly exists:
Owner#Owner-PC ~
$ ls -alh $'C:\\Program Files\\Java\\jdk1.8.0_05\\bin\\java.exe'
-rwxr-xr-x 1 Owner None 187K 8 mai 15:39 C:\Program Files\Java\jdk1.8.0_05\bin\java.exe
The lein script appears to be properly configuring Leiningen for Cygwin, however I can't get it to work.
Note that I previously installed Leiningen outside of Cygwin (I was running it in Windows' normal shell).
What could be wrong with my setup, any ideas?
I use Leiningen via Cygwin with no problems.
Start over
Start over with a fresh copy of the lein script. There should be no need to edit it.
Set your PATH to include java
The easiest solution is to set your path in ~/.profile to include the path to Java's bin directory. Lein will then find java on the path and you'll have access to java and its related tools in your shell.
export JAVA_HOME="/cygdrive/c/Program Files/Java/jdk1.8.0_05/"
export PATH="${JAVA_HOME}/bin/:${PATH}"
Restart your shell or source ~/.profile. Verify that which java finds java command. And run java to verify you get the help output.
And/or explicitly set the LEIN_JAVA_CMD and JAVA_CMD variables
Alternatively, set the LEIN_JAVA_CMD and JAVA_CMD variables used by lein in your ~/.profile
export JAVA_HOME="/cygdrive/c/Program Files/Java/jdk1.8.0_05/"
export LEIN_JAVA_CMD="${JAVA_HOME}/bin/java"
export JAVA_CMD=`cygpath -w "${LEIN_JAVA_CMD}"`
Restart your shell or source ~/.profile.
Note: You can also set a separate LEIN_JVM_OPTS and JVM_OPTS if desired, but this should not be necessary.
If you have lein previously installed on Windows and want to reach it from cygwin, then do:
on cmd:
cd C:/Users/%userprofile%/.lein/bin
mklink lein lein.bat
on cygwin:
export CYGWIN=winsymlinks:nativestrict
I feel your pain. I tried something like this myself several years ago.
You have at least two problems. One is getting lein to run as under unix as you noted. There are really two lein scripts - one for unix, the other a batch script for use under windows.
Your bigger problem is java.exe - getting the windows java executable to behave as a cygwin shell, and particular the unix lein script running in a cygwin shell, expects is messy and fragile undertaking.
I would strongly recommend either using a clojure ide that supports Windows (perhaps LightTable) or installing a full linux virtual machine with the unix java SDK and doing clojure development in that environment. Ubuntu running on virtualbox is freely available and an option I have used in the past for just this purpose.
You need to create a symbolic link to the "lein.bat" file.so you use it properly in Cygwin.
Open CMD and go to the ".lein" path (cd %userprofile%\.lein\bin) and run this: mklink lein lein.bat
#a-webb is almost right ,but there are still some steps to complete.First,you will find a folder called “.lein” where you run the lein script in cygwin,go in,copy the folder "self-installs" inside to C:\Users\yourUserName.lein
,then,add C:\Users\yourUserName.lein\bin to the environment variable $Path.
I've found the easiest way is to:
Install via the windows binaries and
Copy the lein bash script into .lein/bin
Then it should just work in cygwin.

Need to solve "Can't locate VMware/VIRuntime.pm" in cygwin

I have a (maybe) unusual situation. I need to run VMware CLI commands in a Windows box, but via the cygwin CLI inside a shell script. I can NOT change this for now, so any suggestions to "why not do this instead" may be futile, although appreciated. Here's a sample script.
#!/bin/bash
# Paths for vmware-cmd.pl file to run vmware commands from vsphere cli
_vcli_dir="/cygdrive/c/Program Files (x86)/VMware/VMware vSphere CLI"
_vcli_bin="$_vcli_dir/bin"
_vcli_perl="$_vcli_dir/Perl"
_vcli_perl_bin="$_vcli_perl/bin"
_vcli_perl_lib="$_vcli_perl/lib"
_vcli_perl_vlib="$_vcli_perl_lib/VMware"
_vcmd=vmware-cmd.pl
export _orig_path=$PATH
# Add above directories to path variable
export PATH=$PATH:$_vcli_dir:$_vcli_bin:$_vcli_perl:$_vcli_perl_bin:$_vcli_perl_lib:$_vcli_perl_vlib
echo $PATH
$_vcmd /?
export PATH=$_orig_path
echo $PATH
When I run the above script, I get
Can't locate VMware/VIRuntime.pm in #INC (#INC contains:
/usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-64int
/usr/lib/perl5/site_perl/5.14
/usr/lib/perl5/vendor_perl/5.14/i686-cygwin-threads-64int
/usr/lib/perl5/vendor_perl/5.14
/usr/lib/perl5/5.14/i686-cygwin-threads-64int /usr/lib/perl5/5.14
/usr/lib/perl5/site_perl/5.10 /usr/lib/perl5/vendor_perl/5.10
/usr/lib/perl5/site_perl/5.8 .) at /cygdrive/c/Program Files
(x86)/VMware/VMware vSphere CLI/bin/vmware-cmd.pl line 8. BEGIN
failed--compilation aborted at /cygdrive/c/Program Files
(x86)/VMware/VMware vSphere CLI/bin/vmware-cmd.pl line 8.
I can run the same vmware-cmd.pl script from a DOS command prompt
c:> vmware-cm.pl
So I now my installation is correct.
Any clues please?
This post gave me the idea to fix it. But now I get a core dump.
How is Perl's #INC constructed? (aka What are all the ways of affecting where Perl modules are searched for?)
The added line is the second export PERL5LIB line.
#!/bin/bash
# Path for vmware-cmd.pl file to run vmware commands from vsphere cli
_vcli_dir="/cygdrive/c/Program Files (x86)/VMware/VMware vSphere CLI"
_vcli_bin="$_vcli_dir/bin"
_vcli_perl="$_vcli_dir/Perl"
_vcli_perl_bin="$_vcli_perl/bin"
_vcli_perl_lib="$_vcli_perl/lib"
_vcli_perl_vlib="$_vcli_perl_lib/VMware"
_vcmd=vmware-cmd.pl
export _orig_path=$PATH
# Add above directories to path variable
export PATH=$PATH:$_vcli_dir:$_vcli_bin:$_vcli_perl:$_vcli_perl_bin:$_vcli_perl_lib:$_vcli_perl_vlib
export PERL5LIB=$_vcli_dir:$_vcli_bin:$_vcli_perl:$_vcli_perl_bin:$_vcli_perl_lib:$_vcli_perl_vlib
echo $PATH
$_vcmd /?
export PATH=$_orig_path
echo $PATH
I solved by going through my elbow to get to my a**, as the saying goes.
What I did was
- Install vmware cli on my Windows box to the default directory
- Added environment variables for the VMware main directory, the bin directory, the Perl directory and the Perl/bin directory
- Added these environment variables to my PATH variable.
Then I created a vmware-cli.bat file that takes parameters and concatenates them into a vmware-cli command with the correct values. For example, I call this to list the VMs in the server
cygwin:> ./vmware-cli.bat vmware-cmd.pl --server MyServer --username User --password PW -l
Inside the batch file I essentailly do
REM Get first parm as the command, and then concatenate the rest of the parms
set VCLI_CMD=%1
shift
:LOOP
if %1x==x goto :EXECUTE
set VCLI_CMD=%VCLI_CMD% %1
shift
goto LOOP:
:EXECUTE
%VCLI_CMD%
This is an alternative to the previous posted that will allow you to keep it in the same shell script
VIMCMD="/cygdrive/C/Program Files (x86)/VMware/VMware vSphere CLI/bin/vmware-cmd.pl"
VIMCMD_DOS=$(cygpath -d "$VIMCMD")
DOS_VIMCMD="cmd /c $VIMCMD_DOS"
Then you can run:
$ $DOS_VIMCMD --version
vSphere SDK for Perl version: 6.0.0
Script 'vmware-cmd.pl' version: 6.0.0