Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run XHarness Apple workloads under the helix-runner user #8231

Merged
merged 1 commit into from
Dec 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ set -x
# so we have to set them again.
export -p > envvars
chmod +x xharness-runner.apple.sh
helix_runner_uid=$(id -u)
sudo launchctl asuser "$helix_runner_uid" sh ./xharness-runner.apple.sh \
$forwarded_args \
--app "$HELIX_WORKITEM_ROOT/$app" \
--output-directory "$HELIX_WORKITEM_UPLOAD_ROOT" \
uid=$(id -u)
username=$(id -un)
sudo launchctl asuser "$uid" sudo -u "$username" sh ./xharness-runner.apple.sh \
$forwarded_args \
--app "$HELIX_WORKITEM_ROOT/$app" \
--output-directory "$HELIX_WORKITEM_UPLOAD_ROOT" \

exit_code=$?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,6 @@ if [ $exit_code -ne 0 ]; then
sudo log show --style syslog --start "$start_time" --end "$(date '+%Y-%m-%d %H:%M:%S')" | tail -c 2097152 > "$output_directory/system.log"
fi

# The simulator logs comming from the sudo-spawned Simulator.app are not readable/deletable by the helix uploader
sudo chown -R helix-runner "$output_directory"
chmod -R 0766 "$output_directory"

echo "Removing empty log files:"
find "$output_directory" -name "*.log" -maxdepth 1 -size 0 -print -delete

Expand Down