Skip to content

Conversation

ayylol
Copy link
Contributor

@ayylol ayylol commented Oct 21, 2024

In #15728 lit script lines that contain %{run} %{run-unfiltered-devices} or %if run-mode are not executed if the system is set to only build e2e tests.

This patch adds %if run-mode to lines that require that the test binary has already been executed. This is needed because otherwise these commands are ran on the building system which does not execute the test binaries, creating failures.

@ayylol ayylol marked this pull request as ready for review October 25, 2024 18:02
@ayylol ayylol requested review from a team as code owners October 25, 2024 18:02
@ayylol ayylol requested a review from sergey-semenov October 25, 2024 18:02
@@ -10,7 +10,7 @@

// RUN: mkdir -p %t.dir && %{build} -o %t.dir/exec.out
// RUN: env IGC_DumpToCustomDir=%t.dir IGC_ShaderDumpEnable=1 %{run} %t.dir/exec.out
// RUN: python3 %S/instruction_count.py %t.dir %if igc-dev %{ 1059 %} %else %{ 1116 %} ZTSZZ7runTestjjjRdS_ENKUlRN4sycl3_V17handlerEE_clES3_E3K16.asm
// RUN: echo "Baseline from driver version 1.3.30872"
// RUN: %if run-mode %{python3 %S/instruction_count.py %t.dir %if igc-dev %{ 1059 %} %else %{ 1116 %} ZTSZZ7runTestjjjRdS_ENKUlRN4sycl3_V17handlerEE_clES3_E3K16.asm%}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if there any way to automatically detect when the command should be run in build or test, or at least get it correct in most cases? having test authors having to add extra code to support a CI optimization they probably don't know about might be burdensome

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did experiment with a couple of heuristics to do this, basically thinking about this in the opposite direction: what lines should only run when building, however i found that there were significantly more exceptions i had to deal with in that case. Doing it in this manner was the way that got it correct in the vast majority of cases (all but the tests included in this pr).

Would be open to ideas for sure though.

Copy link
Contributor

@sarnex sarnex Oct 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh i see you already handle the standard case of using one of the "{run}" things, so test authors would only have to add this if they were doing something weird, IMO that's fine

we should make sure we tell devs in precommit that its broken in split mode (so i guess we should have to use split build/run in precommit) so they can fix it quickly

@ayylol
Copy link
Contributor Author

ayylol commented Oct 28, 2024

Marking this as a draft until #15728 is further along.

@ayylol ayylol marked this pull request as draft October 28, 2024 21:25
@ayylol ayylol closed this Nov 1, 2024
@ayylol ayylol deleted the run-mode branch November 1, 2024 14:08
@ayylol ayylol restored the run-mode branch November 1, 2024 14:09
@ayylol ayylol reopened this Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants