summaryrefslogtreecommitdiffstats
path: root/source/l/mozjs78/patches/emitter.patch
blob: 15e752ba7375a2fe4b2dc0b5b31322692f90d053 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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  |  6 ------
 .../mozbuild/test/frontend/test_emitter.py    | 20 -------------------
 2 files changed, 26 deletions(-)

diff --git a/python/mozbuild/mozbuild/frontend/emitter.py b/python/mozbuild/mozbuild/frontend/emitter.py
index 8d5ab8e..65c43ff 100644
--- a/python/mozbuild/mozbuild/frontend/emitter.py
+++ b/python/mozbuild/mozbuild/frontend/emitter.py
@@ -1239,12 +1239,6 @@ class TreeMetadataEmitter(LoggingMixin):
                                                  'is a filename, but a directory is required: %s '
                                                  '(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 e8cbd81..d45ccee 100644
--- a/python/mozbuild/mozbuild/test/frontend/test_emitter.py
+++ b/python/mozbuild/mozbuild/test/frontend/test_emitter.py
@@ -1040,26 +1040,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.26.2