Add tests for imgdiff.
Factor out libimgdiff static library for testing purpose. This CL adds the imgdiff tests on host and on target both (similar to libimgpatch). In practice, we only need imgdiff binary on host, and libimgpatch on target. But they should build and pass tests on both platforms. Test: recovery_host_test passes; recovery_component_test passes. Change-Id: I0eafb7faf727cdf70066310e845af6ee245d4f60
This commit is contained in:
@@ -14,13 +14,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef _IMGPATCH_H
|
||||
#define _IMGPATCH_H
|
||||
#ifndef _APPLYPATCH_IMGPATCH_H
|
||||
#define _APPLYPATCH_IMGPATCH_H
|
||||
|
||||
typedef ssize_t (*SinkFn)(const unsigned char*, ssize_t, void*);
|
||||
#include <sys/types.h>
|
||||
|
||||
using SinkFn = ssize_t (*)(const unsigned char*, ssize_t, void*);
|
||||
|
||||
int ApplyImagePatch(const unsigned char* old_data, ssize_t old_size,
|
||||
const unsigned char* patch_data, ssize_t patch_size,
|
||||
SinkFn sink, void* token);
|
||||
|
||||
#endif //_IMGPATCH_H
|
||||
#endif // _APPLYPATCH_IMGPATCH_H
|
||||
|
||||
Reference in New Issue
Block a user