Merge "Generate recovery.img for unittest during build time" am: bf885b6b21
Change-Id: I75f0fa79c3e8d2c771edb18bcdc8faa344f273f9
This commit is contained in:
commit
616db72209
5 changed files with 19 additions and 0 deletions
|
@ -94,6 +94,24 @@ librecovery_static_libs = [
|
||||||
"libtinyxml2",
|
"libtinyxml2",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
// recovery image for unittests.
|
||||||
|
// ========================================================
|
||||||
|
genrule {
|
||||||
|
name: "recovery_image",
|
||||||
|
cmd: "cat $(location testdata/recovery_head) <(cat $(location testdata/recovery_body) | $(location minigzip)) $(location testdata/recovery_tail) > $(out)",
|
||||||
|
srcs: [
|
||||||
|
"testdata/recovery_head",
|
||||||
|
"testdata/recovery_body",
|
||||||
|
"testdata/recovery_tail",
|
||||||
|
],
|
||||||
|
tools: [
|
||||||
|
"minigzip",
|
||||||
|
],
|
||||||
|
out: [
|
||||||
|
"testdata/recovery.img",
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
cc_test {
|
cc_test {
|
||||||
name: "recovery_unit_test",
|
name: "recovery_unit_test",
|
||||||
isolated: true,
|
isolated: true,
|
||||||
|
@ -127,6 +145,7 @@ cc_test {
|
||||||
|
|
||||||
data: [
|
data: [
|
||||||
"testdata/*",
|
"testdata/*",
|
||||||
|
":recovery_image",
|
||||||
":res-testdata",
|
":res-testdata",
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
BIN
tests/testdata/recovery.img
vendored
BIN
tests/testdata/recovery.img
vendored
Binary file not shown.
BIN
tests/testdata/recovery_body
vendored
Normal file
BIN
tests/testdata/recovery_body
vendored
Normal file
Binary file not shown.
BIN
tests/testdata/recovery_head
vendored
Normal file
BIN
tests/testdata/recovery_head
vendored
Normal file
Binary file not shown.
BIN
tests/testdata/recovery_tail
vendored
Normal file
BIN
tests/testdata/recovery_tail
vendored
Normal file
Binary file not shown.
Loading…
Reference in a new issue