1 Star 0 Fork 26

cenhuilin/mozjs78

forked from src-openEuler/mozjs78 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
emitter.patch 2.73 KB
一键复制 编辑 原始数据 按行查看 历史
liuyumeng1 提交于 2022-03-16 16:50 . update to mozjs91.6.0
From d1d785c169345b81c76213f6dd9be32b4db60294 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= <fzatlouk@redhat.com>
Date: Wed, 15 Jul 2020 08:39:47 +0200
Subject: [PATCH] Build: allow LOCAL_INCLUDES paths with topsrcdir or topobjdir
---
python/mozbuild/mozbuild/frontend/emitter.py | 10 ---------
.../mozbuild/test/frontend/test_emitter.py | 22 -------------------
2 files changed, 32 deletions(-)
diff --git a/python/mozbuild/mozbuild/frontend/emitter.py b/python/mozbuild/mozbuild/frontend/emitter.py
index 44b916e..f2e821d 100644
--- a/python/mozbuild/mozbuild/frontend/emitter.py
+++ b/python/mozbuild/mozbuild/frontend/emitter.py
@@ -1367,16 +1367,6 @@ class TreeMetadataEmitter(LoggingMixin):
"(resolved to %s)" % (local_include, full_path),
context,
)
- if (
- full_path == context.config.topsrcdir
- or full_path == context.config.topobjdir
- ):
- raise SandboxValidationError(
- "Path specified in LOCAL_INCLUDES "
- "(%s) resolves to the topsrcdir or topobjdir (%s), which is "
- "not allowed" % (local_include, full_path),
- context,
- )
include_obj = LocalInclude(context, local_include)
local_includes.append(include_obj.path.full_path)
yield include_obj
diff --git a/python/mozbuild/mozbuild/test/frontend/test_emitter.py b/python/mozbuild/mozbuild/test/frontend/test_emitter.py
index e53bc5e..c1b9d32 100644
--- a/python/mozbuild/mozbuild/test/frontend/test_emitter.py
+++ b/python/mozbuild/mozbuild/test/frontend/test_emitter.py
@@ -1098,28 +1098,6 @@ class TestEmitterBasic(unittest.TestCase):
self.assertEqual(local_includes, expected)
- def test_local_includes_invalid(self):
- """Test that invalid LOCAL_INCLUDES are properly detected."""
- reader = self.reader("local_includes-invalid/srcdir")
-
- with six.assertRaisesRegex(
- self,
- SandboxValidationError,
- "Path specified in LOCAL_INCLUDES.*resolves to the "
- "topsrcdir or topobjdir",
- ):
- self.read_topsrcdir(reader)
-
- reader = self.reader("local_includes-invalid/objdir")
-
- with six.assertRaisesRegex(
- self,
- SandboxValidationError,
- "Path specified in LOCAL_INCLUDES.*resolves to the "
- "topsrcdir or topobjdir",
- ):
- self.read_topsrcdir(reader)
-
def test_local_includes_file(self):
"""Test that a filename can't be used in LOCAL_INCLUDES."""
reader = self.reader("local_includes-filename")
--
2.31.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/cenhuilin/mozjs78.git
git@gitee.com:cenhuilin/mozjs78.git
cenhuilin
mozjs78
mozjs78
master

搜索帮助