Skip to content
Snippets Groups Projects
Commit 5c5e79cd authored by Jeff Vander Stoep's avatar Jeff Vander Stoep
Browse files

Move python scripts to python_binary_host build rule

Fixes: 65263013
Test: build
Change-Id: I0ec412481c5990927fcbee7c4303bee2da876210
parent f71f0c94
No related branches found
No related tags found
No related merge requests found
......@@ -223,7 +223,7 @@ LOCAL_REQUIRED_MODULES += \
plat_seapp_contexts \
plat_service_contexts \
plat_hwservice_contexts \
searchpolicy.py \
searchpolicy \
vndservice_contexts \
ifneq ($(PRODUCT_FULL_TREBLE),true)
......@@ -1183,10 +1183,10 @@ sepolicy_tests := $(intermediates)/sepolicy_tests
$(sepolicy_tests): PRIVATE_PLAT_FC := $(built_plat_fc)
$(sepolicy_tests): PRIVATE_NONPLAT_FC := $(built_nonplat_fc)
$(sepolicy_tests): PRIVATE_SEPOLICY := $(built_sepolicy)
$(sepolicy_tests): $(HOST_OUT_EXECUTABLES)/sepolicy_tests.py \
$(sepolicy_tests): $(HOST_OUT_EXECUTABLES)/sepolicy_tests \
$(built_plat_fc) $(built_nonplat_fc) $(built_sepolicy)
@mkdir -p $(dir $@)
$(hide) python $(HOST_OUT_EXECUTABLES)/sepolicy_tests.py -l $(HOST_OUT)/lib64 -f $(PRIVATE_PLAT_FC) -f $(PRIVATE_NONPLAT_FC) -p $(PRIVATE_SEPOLICY)
$(hide) python $(HOST_OUT_EXECUTABLES)/sepolicy_tests -l $(HOST_OUT)/lib64 -f $(PRIVATE_PLAT_FC) -f $(PRIVATE_NONPLAT_FC) -p $(PRIVATE_SEPOLICY)
$(hide) touch $@
##################################
......@@ -1298,11 +1298,11 @@ $(treble_sepolicy_tests): PRIVATE_FAKE_TREBLE := --fake-treble
else
$(treble_sepolicy_tests): PRIVATE_FAKE_TREBLE :=
endif
$(treble_sepolicy_tests): $(HOST_OUT_EXECUTABLES)/treble_sepolicy_tests.py \
$(treble_sepolicy_tests): $(HOST_OUT_EXECUTABLES)/treble_sepolicy_tests \
$(built_plat_fc) $(built_nonplat_fc) $(built_sepolicy) $(built_plat_sepolicy) \
$(built_26.0_plat_sepolicy) $(26.0_compat) $(26.0_mapping.combined.cil)
@mkdir -p $(dir $@)
$(hide) python $(HOST_OUT_EXECUTABLES)/treble_sepolicy_tests.py -l \
$(hide) python $(HOST_OUT_EXECUTABLES)/treble_sepolicy_tests -l \
$(HOST_OUT)/lib64 -f $(PRIVATE_PLAT_FC) -f $(PRIVATE_NONPLAT_FC) \
-b $(PRIVATE_PLAT_SEPOLICY) -m $(PRIVATE_COMBINED_MAPPING) \
-o $(PRIVATE_SEPOLICY_OLD) -p $(PRIVATE_SEPOLICY) \
......
......@@ -15,36 +15,51 @@ cc_library_host_shared {
},
}
cc_prebuilt_binary {
name: "mini_parser.py",
srcs: ["mini_parser.py"],
host_supported: true,
python_defaults {
name: "py2_only",
version: {
py2: {
enabled: true,
},
py3: {
enabled: false,
},
},
}
cc_prebuilt_binary {
name: "policy.py",
srcs: ["policy.py"],
host_supported: true,
required: ["libsepolwrap"],
python_binary_host {
name: "mini_parser",
srcs: ["mini_parser.py"],
defaults: ["py2_only"],
}
cc_prebuilt_binary {
name: "treble_sepolicy_tests.py",
srcs: ["treble_sepolicy_tests.py"],
host_supported: true,
required: ["mini_parser.py", "policy.py"],
python_binary_host {
name: "treble_sepolicy_tests",
srcs: [
"treble_sepolicy_tests.py",
"mini_parser.py",
"policy.py",
],
required: ["libsepolwrap"],
defaults: ["py2_only"],
}
cc_prebuilt_binary {
name: "sepolicy_tests.py",
srcs: ["sepolicy_tests.py"],
host_supported: true,
required: ["policy.py"],
python_binary_host {
name: "sepolicy_tests",
srcs: [
"sepolicy_tests.py",
"policy.py",
],
required: ["libsepolwrap"],
defaults: ["py2_only"],
}
cc_prebuilt_binary {
name: "searchpolicy.py",
srcs: ["searchpolicy.py"],
host_supported: true,
required: ["policy.py"],
python_binary_host {
name: "searchpolicy",
srcs: [
"searchpolicy.py",
"policy.py",
],
required: ["libsepolwrap"],
defaults: ["py2_only"],
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment