Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@gaaclarke
Copy link
Member

@gaaclarke gaaclarke commented May 26, 2023

fixes flutter/flutter#127634

This PR depends on a buildroot change at flutter/buildroot#737

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@gaaclarke gaaclarke force-pushed the impeller-unittests-validation-layers branch from 125b2d3 to 07910ea Compare May 26, 2023 04:36
@gaaclarke gaaclarke changed the title Impeller unittests validation layers Started executing vulkan unit tests with validation on macos May 26, 2023
@gaaclarke gaaclarke force-pushed the impeller-unittests-validation-layers branch from 07910ea to 7569de1 Compare May 26, 2023 16:11
@gaaclarke gaaclarke marked this pull request as ready for review May 26, 2023 16:31
@gaaclarke gaaclarke requested review from dnfield and zanderso May 26, 2023 16:34
cmd,
stdout=stdout_pipe,
stderr=stderr_pipe,
stdout=subprocess.PIPE,
Copy link
Member Author

Choose a reason for hiding this comment

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

This change allows us to stream the output to stdout but also capture it for inspection. The tests take a long enough time, it's a pain not seeing the streaming results.

@gaaclarke
Copy link
Member Author

sys.stdout.write(line)

sys.stdout.flush()
process.wait()
Copy link
Member

Choose a reason for hiding this comment

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

Does process.stdout.readline drain the buffer to avoid the deadlock concern with wait() called out in the docs? https://docs.python.org/3/library/subprocess.html#subprocess.Popen.wait

Copy link
Member Author

Choose a reason for hiding this comment

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

That's my understanding. It's reading the pipe until EOF so there should be no more waiting on the pipe by the time we call wait.


for line in iter(process.stdout.readline, ''):
output += line
sys.stdout.write(line)
Copy link
Member

Choose a reason for hiding this comment

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

Previously the test script would only generate output when a test fails. This is nice when diagnosing failures on CI since the succeeding tests add only minimal output to the logs. Am I misreading what this does? Is there some way to make this configurable?

Copy link
Member Author

Choose a reason for hiding this comment

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

I believe you are misremembering how it works. If collect_output == true the output would be printed on line 119. If collect_output == false it would get printed out by virtue of using stdout=sys.stdout.

@gaaclarke gaaclarke requested a review from zanderso May 26, 2023 17:27
Copy link
Member

@zanderso zanderso left a comment

Choose a reason for hiding this comment

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

lgtm w/ one comment.

'MTL_SHADER_VALIDATION_TEXTURE_USAGE':
'1', # Validates that texture references are not nil.
'VK_ICD_FILENAMES': os.path.join(build_dir, 'vk_swiftshader_icd.json'),
'VK_LAYER_PATH': os.path.join(build_dir, 'vulkan-data'),
Copy link
Member

Choose a reason for hiding this comment

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

A comment pointing to the GN file with the string that has to be the same as this one would be good?

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@gaaclarke gaaclarke added the autosubmit Merge PR when tree becomes green via auto submit App label May 26, 2023
@auto-submit auto-submit bot merged commit eed12f3 into flutter:main May 26, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 26, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request May 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Impeller] get vulkan validation layers running on CI

2 participants