mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-25 16:03:38 +00:00
Migrates harness support files added in https://chromium-review.googlesource.com/c/chromium/src/+/3541414 into Dawn's repo. Tested in https://chromium-review.googlesource.com/c/chromium/src/+/3537743 Bug: chromium:1306640 Change-Id: I3000b1223219a1da293af910bf442570b70b7c92 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/84043 Reviewed-by: Loko Kung <lokokung@google.com> Commit-Queue: Austin Eng <enga@chromium.org>
33 lines
1.3 KiB
Python
33 lines
1.3 KiB
Python
#!/usr/bin/env python
|
|
#
|
|
# Copyright 2022 The Dawn Authors
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
import os
|
|
|
|
webgpu_cts_scripts_dir = os.path.dirname(os.path.abspath(__file__))
|
|
dawn_third_party_dir = os.path.join(
|
|
os.path.dirname(os.path.dirname(webgpu_cts_scripts_dir)), 'third_party')
|
|
gn_webgpu_cts_dir = os.path.join(dawn_third_party_dir, 'gn', 'webgpu-cts')
|
|
webgpu_cts_root_dir = os.path.join(dawn_third_party_dir, 'webgpu-cts')
|
|
chromium_third_party_dir = None
|
|
node_dir = None
|
|
|
|
_possible_chromium_third_party_dir = os.path.dirname(
|
|
os.path.dirname(dawn_third_party_dir))
|
|
_possible_node_dir = os.path.join(_possible_chromium_third_party_dir, 'node')
|
|
if os.path.exists(_possible_node_dir):
|
|
chromium_third_party_dir = _possible_chromium_third_party_dir
|
|
node_dir = _possible_node_dir
|