Repository navigation
Support git version from environment - #4452
bsheedy-work wants to merge 1 commit into
Conversation
Adds support in version.ts for retrieving the version from the WEBGPU_CTS_GIT_VERSION environment variable instead of from calling "git describe" directly. This is so that the tests can be run in contexts where the actual git checkout is not available, such as in certain cases within Chromium.
kainino0x
left a comment
There was a problem hiding this comment.
This is fine, though I think there are two other simpler possible solutions:
- Non-node builds replace this file with a generated file containing the hash.
If we are building the project first (e.g. intoout-node) then that would work (actually it would be more correct because it would tell you the commit hash of the built code).
But IIRC you said we were not building the project first which means we're using something liketools/run_node? In which case we can't do that.
IIRC you said we were not building the project first (intoout-node) but using something liketools/run_node? If so then I don't think that would work - I don't think the version actually needed though (it only happens if you try to serialize the test results as JSON) so we could try replacing
versionwithversion()so it's computed on demand.
Correct.
Good point, I'll give that a try locally. |
|
Actually, it seems like we do need the version. The relevant Dawn code that is hitting this is explicitly calling the |
|
Oops, I thought this was reachable through Also didn't realize |
|
No luck, it seems like Seems like that's due to the node task running generate-common which runs |
|
Ah that makes sense, I thought building the CTS turned out not to be necessary but that was just in the GN files, Go is still invoking the compilation. (It looks like Let me see about just removing this from the dependency chain for |
|
OK, that's kind of a pain. What about this? #4455 |
Seems to work fine. I'm not able to test directly on the bots due to how the CTS repo gets DEPSed in, but I'm able to run the tests locally even when changing |
|
Abandoning this since Kai's pull request should resolve the problem this was trying to solve. |
Adds support in version.ts for retrieving the version from the WEBGPU_CTS_GIT_VERSION environment variable instead of from calling "git describe" directly. This is so that the tests can be run in contexts where the actual git checkout is not available, such as in certain cases within Chromium.
Issue: #
Requirements for PR author:
.unimplemented()./** documented */and new helper files are found inhelper_index.txt.Requirements for reviewer sign-off:
When landing this PR, be sure to make any necessary issue status updates.