From 36c35119526023c9e28ec22915b26b1bf7da6bc3 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Tue, 25 Oct 2016 14:17:26 -0700 Subject: applypatch: Add testcases for applypatch executable. Refactor applypatch/main.cpp into libapplypatch_modes so that we can add testcases. Some changes to applypatch/main.cpp: - Replace char** argv with const char**; - Use android::base::Split() to split ":"; - Use android::base::ParseUInt(). Bug: 32383590 Test: Unit tests pass, install-recovery.sh works. Change-Id: I44e7bfa5ab717d439ea1d0ee9ddb7b2c40bb95a4 --- tests/testdata/bonus.file | Bin 0 -> 557334 bytes tests/testdata/boot.img | Bin 0 -> 783655 bytes tests/testdata/recovery-from-boot-with-bonus.p | Bin 0 -> 381615 bytes tests/testdata/recovery-from-boot.p | Bin 0 -> 5404 bytes tests/testdata/recovery.img | Bin 0 -> 529707 bytes 5 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/testdata/bonus.file create mode 100644 tests/testdata/boot.img create mode 100644 tests/testdata/recovery-from-boot-with-bonus.p create mode 100644 tests/testdata/recovery-from-boot.p create mode 100644 tests/testdata/recovery.img (limited to 'tests/testdata') diff --git a/tests/testdata/bonus.file b/tests/testdata/bonus.file new file mode 100644 index 000000000..918ef8ac5 Binary files /dev/null and b/tests/testdata/bonus.file differ diff --git a/tests/testdata/boot.img b/tests/testdata/boot.img new file mode 100644 index 000000000..dd4897510 Binary files /dev/null and b/tests/testdata/boot.img differ diff --git a/tests/testdata/recovery-from-boot-with-bonus.p b/tests/testdata/recovery-from-boot-with-bonus.p new file mode 100644 index 000000000..08b6f55e4 Binary files /dev/null and b/tests/testdata/recovery-from-boot-with-bonus.p differ diff --git a/tests/testdata/recovery-from-boot.p b/tests/testdata/recovery-from-boot.p new file mode 100644 index 000000000..06f6c299f Binary files /dev/null and b/tests/testdata/recovery-from-boot.p differ diff --git a/tests/testdata/recovery.img b/tests/testdata/recovery.img new file mode 100644 index 000000000..b862e6f0c Binary files /dev/null and b/tests/testdata/recovery.img differ -- cgit v1.2.3