Skip to content
Snippets Groups Projects
Commit 1109999a 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
Merged-In: I0ec412481c5990927fcbee7c4303bee2da876210
Change-Id: I0ec412481c5990927fcbee7c4303bee2da876210
(cherry picked from commit 5c5e79cd)
parent a28ad688
No related branches found
No related tags found
No related merge requests found
......@@ -1152,10 +1152,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 $@
##################################
......@@ -1262,11 +1262,11 @@ $(treble_sepolicy_tests): PRIVATE_SEPOLICY := $(built_sepolicy)
$(treble_sepolicy_tests): PRIVATE_SEPOLICY_OLD := $(built_26.0_plat_sepolicy)
$(treble_sepolicy_tests): PRIVATE_COMBINED_MAPPING := $(26.0_mapping.combined.cil)
$(treble_sepolicy_tests): PRIVATE_PLAT_SEPOLICY := $(built_plat_sepolicy)
$(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,29 +15,41 @@ 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"],
}
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