-
Notifications
You must be signed in to change notification settings - Fork 556
[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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -874,6 +874,7 @@ public int Run () | |
| populating = false; | ||
| }).Wait (); | ||
| GenerateReport (); | ||
| BuildTestLibraries (); | ||
| if (!IsServerMode) { | ||
| foreach (var task in Tasks) | ||
| tasks.Add (task.RunAsync ()); | ||
|
|
@@ -892,6 +893,11 @@ public bool IsServerMode { | |
| get { return Harness.JenkinsConfiguration == "server"; } | ||
| } | ||
|
|
||
| void BuildTestLibraries () | ||
| { | ||
| ProcessHelper.ExecuteCommandAsync ("make", $"all -j{Environment.ProcessorCount} -C {StringUtils.Quote (Path.Combine (Harness.RootDirectory, "test-libraries"))}", MainLog, TimeSpan.FromMinutes (1)).Wait (); | ||
| } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should return a Task, not void.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I call
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agh, I did not see that, cool... |
||
|
|
||
| Task RunTestServer () | ||
| { | ||
| var server = new HttpListener (); | ||
|
|
||
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?
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.