-
Notifications
You must be signed in to change notification settings - Fork 554
[xharness] Always build the test libraries before doing anything else. #3601
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
Conversation
Fixes an issue where multiple projects would try to build the test libraries simultaneously.
|
related to any known issue on the bots ? |
|
@spouliot yes, it fixes https://github.com/xamarin/maccore/issues/637 (I've updated the PR description). |
| BuildTestLibraries (); | ||
| if (!IsServerMode) { | ||
| foreach (var task in Tasks) | ||
| tasks.Add (task.RunAsync ()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might be wrong here, ProcessHelper.ExecuteCommandAsync does return a task, correct?
public static Task<bool> PollForExitAsync (int pid, TimeSpan timeout)The task is ignored in BuildTestLibraries that returns void (which we should only do in events). So, I think we should be paying attention to the result of the task and, since it is async but needed, we might wait for it to success before we do anything else (there is now guaranteed AFAIK that the build will be done before we needed it).
I might be completely wrong here, but just wanted you to confirm is correct.
| void BuildTestLibraries () | ||
| { | ||
| ProcessHelper.ExecuteCommandAsync ("make", $"all -j{Environment.ProcessorCount} -C {StringUtils.Quote (Path.Combine (Harness.RootDirectory, "test-libraries"))}", MainLog, TimeSpan.FromMinutes (1)).Wait (); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should return a Task, not void.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I call .Wait () at the end to make it synchronous.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agh, I did not see that, cool...
|
Build failure |
|
Test failure is unrelated: |
dotnet#3601) Fixes an issue where multiple projects would try to build the test libraries simultaneously.
Fixes an issue where multiple projects would try to build the test libraries simultaneously.
Fixes https://github.com/xamarin/maccore/issues/637.