77# ##
88
99app=' '
10- output_directory=' '
1110target=' '
1211timeout=' '
1312launch_timeout=' '
14- xharness_cli_path=' '
1513xcode_version=' '
1614app_arguments=' '
1715expected_exit_code=0
@@ -25,10 +23,6 @@ while [[ $# -gt 0 ]]; do
2523 app=" $2 "
2624 shift
2725 ;;
28- --output-directory)
29- output_directory=" $2 "
30- shift
31- ;;
3226 --diagnostics-path)
3327 export XHARNESS_DIAGNOSTICS_PATH=" $2 "
3428 shift
@@ -45,10 +39,6 @@ while [[ $# -gt 0 ]]; do
4539 launch_timeout=" $2 "
4640 shift
4741 ;;
48- --xharness-cli-path)
49- xharness_cli_path=" $2 "
50- shift
51- ;;
5242 --xcode-version)
5343 xcode_version=" $2 "
5444 shift
@@ -85,20 +75,18 @@ if [ -z "$target" ]; then
8575 die " No target was provided" ;
8676fi
8777
88- if [ -z " $output_directory " ]; then
89- die " No output directory provided" ;
90- fi
91-
92- if [ -z " $xharness_cli_path " ]; then
93- die " XHarness path wasn't provided" ;
94- fi
95-
9678if [ -z " $xcode_version " ]; then
9779 xcode_path=" $( dirname " $( dirname " $( xcode-select -p) " ) " ) "
9880else
9981 xcode_path=" /Applications/Xcode${xcode_version/ ./ } .app"
10082fi
10183
84+ # First we need to revive env variables since they were erased by launchctl
85+ # This file already has the expressions in the `export name=value` format
86+ . ./envvars
87+
88+ output_directory=$HELIX_WORKITEM_UPLOAD_ROOT
89+
10290# Signing
10391if [ " $target " == ' ios-device' ] || [ " $target " == ' tvos-device' ]; then
10492 echo " Real device target detected, application will be signed"
@@ -141,12 +129,9 @@ elif [[ "$target" =~ "simulator" ]]; then
141129 open -a " $simulator_app "
142130fi
143131
144- export XHARNESS_DISABLE_COLORED_OUTPUT=true
145- export XHARNESS_LOG_WITH_TIMESTAMPS=true
146-
147132# The xharness alias
148133function xharness() {
149- dotnet exec $xharness_cli_path " $@ "
134+ dotnet exec $XHARNESS_CLI_PATH " $@ "
150135}
151136
152137# Act out the actual commands
0 commit comments