Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/xamarin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xamarin 在Shell脚本中启用葫芦沙盒_Xamarin_Calabash_Calabash Android_Xamarin Test Cloud - Fatal编程技术网

Xamarin 在Shell脚本中启用葫芦沙盒

Xamarin 在Shell脚本中启用葫芦沙盒,xamarin,calabash,calabash-android,xamarin-test-cloud,Xamarin,Calabash,Calabash Android,Xamarin Test Cloud,我正在尝试访问运行shell脚本的葫芦沙盒。基本上我的shell脚本 #!/bin/sh calabash-sandbox calabash-android --- 基本上应该运行葫芦沙盒和相应的命令。它执行葫芦沙箱并在那里停止 我查看了运行calabash sandbox的脚本,它似乎创建了一个新的bash会话,包含了calabash需要的所有环境变量。因此,这大致相当于在脚本中运行bash&&echo'test'——在退出该会话之前,您不会看到echo'test'部分 $ calabas

我正在尝试访问运行shell脚本的葫芦沙盒。基本上我的shell脚本

#!/bin/sh
calabash-sandbox 
calabash-android ---

基本上应该运行葫芦沙盒和相应的命令。它执行葫芦沙箱并在那里停止

我查看了运行
calabash sandbox
的脚本,它似乎创建了一个新的bash会话,包含了calabash需要的所有环境变量。因此,这大致相当于在脚本中运行
bash&&echo'test'
——在退出该会话之前,您不会看到
echo'test'
部分

$ calabash-sandbox <<< 'echo test'
This terminal is now ready to use with Calabash.
To exit, type 'exit'.
test

This terminal is back to normal.
但是,有多种方法可以将命令推入新的shell会话,其中一种方法似乎特别适合这种情况。从

Bash包括
#!/bin/bash
calabash-sandbox <<EOF
    export BUNDLE_ID=com.tabrindle.example
    export DEVICE_TARGET=$(system_profiler SPUSBDataType | sed -n -e '/iPad/,/Serial/p' -e '/iPhone/,/Serial/p' | grep "Serial Number:" | awk -F ": " '{print $2}')
    export DEVICE_ENDPOINT=http://gobbledygook.local:37265
    export CODE_SIGN_IDENTITY="iPhone Developer: Brindleware LLC (XX8799XB1X)"
    echo ""
    printenv | grep -E 'BUNDLE_ID|DEVICE_TARGET|CODE_SIGN_IDENTITY|DEVICE_ENDPOINT'
EOF
$ ./execute_calabash
This terminal is now ready to use with Calabash.
To exit, type 'exit'.

DEVICE_ENDPOINT=http://gobbledygook.local:37265
BUNDLE_ID=com.tabrindle.example
DEVICE_TARGET=34fc6d34c34e23454c234523454580b1e2345b9ef
CODE_SIGN_IDENTITY=iPhone Developer: Brindleware LLC (XX8799XB1X)

This terminal is back to normal.