tests/lib: Factor out file related functions

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: I5c22913b35848c5ea32d6805ea081abefd3380bf
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82237
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jakub Czapiga <czapiga@google.com>
This commit is contained in:
Maximilian Brune
2024-05-09 02:53:51 +02:00
committed by Lean Sheng Tan
parent 62a6188da5
commit 25c737d403
5 changed files with 72 additions and 29 deletions

View File

@@ -0,0 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef _TESTS_HELPERS_FILE_H
#define _TESTS_HELPERS_FILE_H
#include <stddef.h>
#include <stdint.h>
int test_get_file_size(const char *fname);
int test_read_file(const char *fname, uint8_t *buf, size_t size);
#endif