Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AndroidSystemSEPolicy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Werner Sembach
AndroidSystemSEPolicy
Commits
f3d30273
Commit
f3d30273
authored
Nov 21, 2017
by
Jeffrey Vander Stoep
Committed by
android-build-merger
Nov 21, 2017
Browse files
Options
Downloads
Plain Diff
Merge "Prepare treble_sepolicy_tests for inclusion in CTS" am:
18cb4dae
am:
54242ffa
am:
5b295d30
Change-Id: I0f18c8fd43bfbce55c883f35ef27499c840e0ca0
parents
45f7f00c
5b295d30
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Android.mk
+1
-6
1 addition, 6 deletions
Android.mk
tests/treble_sepolicy_tests.py
+14
-11
14 additions, 11 deletions
tests/treble_sepolicy_tests.py
with
15 additions
and
17 deletions
Android.mk
+
1
−
6
View file @
f3d30273
...
...
@@ -204,12 +204,6 @@ LOCAL_REQUIRED_MODULES += \
secilc
\
plat_sepolicy_vers.txt
\
ifneq
($(with_asan),true)
LOCAL_REQUIRED_MODULES
+=
\
treble_sepolicy_tests
\
endif
# Include precompiled policy, unless told otherwise
ifneq
($(PRODUCT_PRECOMPILED_SEPOLICY),false)
LOCAL_REQUIRED_MODULES
+=
precompiled_sepolicy precompiled_sepolicy.plat_and_mapping.sha256
...
...
@@ -247,6 +241,7 @@ endif
ifneq
($(with_asan),true)
LOCAL_REQUIRED_MODULES
+=
\
sepolicy_tests
\
treble_sepolicy_tests
\
endif
...
...
This diff is collapsed.
Click to expand it.
tests/treble_sepolicy_tests.py
+
14
−
11
View file @
f3d30273
...
...
@@ -332,18 +332,11 @@ if __name__ == '__main__':
if
not
os
.
path
.
exists
(
options
.
libpath
):
sys
.
exit
(
"
Error: library-path
"
+
options
.
libpath
+
"
does not exist
\n
"
+
parser
.
usage
)
if
not
options
.
basepolicy
:
sys
.
exit
(
"
Must specify the current platform-only policy file
\n
"
+
parser
.
usage
)
if
not
options
.
mapping
:
sys
.
exit
(
"
Must specify a compatibility mapping file
\n
"
+
parser
.
usage
)
if
not
options
.
oldpolicy
:
sys
.
exit
(
"
Must specify the previous monolithic policy file
\n
"
+
parser
.
usage
)
if
not
options
.
policy
:
sys
.
exit
(
"
Must specify current monolithic policy file
\n
"
+
parser
.
usage
)
if
not
os
.
path
.
exists
(
options
.
policy
):
sys
.
exit
(
"
Error: policy file
"
+
options
.
policy
+
"
does not exist
\n
"
+
parser
.
usage
)
if
not
options
.
file_contexts
:
sys
.
exit
(
"
Error: Must specify file_contexts file(s)
\n
"
+
parser
.
usage
)
for
f
in
options
.
file_contexts
:
...
...
@@ -351,15 +344,25 @@ if __name__ == '__main__':
sys
.
exit
(
"
Error: File_contexts file
"
+
f
+
"
does not exist
\n
"
+
parser
.
usage
)
# Mapping files are only necessary for the TrebleCompatMapping test
if
options
.
tests
is
None
or
options
.
tests
is
"
TrebleCompatMapping
"
:
if
not
options
.
basepolicy
:
sys
.
exit
(
"
Must specify the current platform-only policy file
\n
"
+
parser
.
usage
)
if
not
options
.
mapping
:
sys
.
exit
(
"
Must specify a compatibility mapping file
\n
"
+
parser
.
usage
)
if
not
options
.
oldpolicy
:
sys
.
exit
(
"
Must specify the previous monolithic policy file
\n
"
+
parser
.
usage
)
basepol
=
policy
.
Policy
(
options
.
basepolicy
,
None
,
options
.
libpath
)
oldpol
=
policy
.
Policy
(
options
.
oldpolicy
,
None
,
options
.
libpath
)
mapping
=
mini_parser
.
MiniCilParser
(
options
.
mapping
)
compatSetup
(
basepol
,
oldpol
,
mapping
)
if
options
.
faketreble
:
FakeTreble
=
True
pol
=
policy
.
Policy
(
options
.
policy
,
options
.
file_contexts
,
options
.
libpath
)
setup
(
pol
)
basepol
=
policy
.
Policy
(
options
.
basepolicy
,
None
,
options
.
libpath
)
oldpol
=
policy
.
Policy
(
options
.
oldpolicy
,
None
,
options
.
libpath
)
mapping
=
mini_parser
.
MiniCilParser
(
options
.
mapping
)
compatSetup
(
basepol
,
oldpol
,
mapping
)
if
DEBUG
:
PrintScontexts
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment