diff options
author | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2016-05-23 15:56:22 +1000 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2016-06-28 16:17:21 +1000 |
commit | 07a5f9f1c50a9185851cd486d732976573d15c4f (patch) | |
tree | d30b4e52b9942965d12581b3f7502737c6c135e7 /discover/paths.c | |
parent | 1a72ffef7837cd2aa3e6be945ec03fb6b5caa51a (diff) | |
download | talos-petitboot-07a5f9f1c50a9185851cd486d732976573d15c4f.tar.gz talos-petitboot-07a5f9f1c50a9185851cd486d732976573d15c4f.zip |
Update tests to support changes to pxe_parser
Substitute load_url_async() when running tests to support direct
callers of load_url_async() who will expect to read a file in a
callback.
Stub out device_handler_discover_context_commit() since it will remove
discover_options from the given discover_context, but the tests will
check the discover_context to count boot_options.
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'discover/paths.c')
-rw-r--r-- | discover/paths.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/discover/paths.c b/discover/paths.c index 1269dde..7fcff9e 100644 --- a/discover/paths.c +++ b/discover/paths.c @@ -47,6 +47,7 @@ char *join_paths(void *alloc_ctx, const char *a, const char *b) return full_path; } +#ifndef PETITBOOT_TEST static char *local_name(void *ctx) { @@ -449,3 +450,33 @@ void load_url_async_cancel(struct load_url_result *res) res->status = LOAD_CANCELLED; process_stop_async(task->process); } + +#else + +static void __attribute__((unused)) load_local( + struct load_task *task __attribute__((unused))) +{ +} +static void __attribute__((unused)) load_wget( + struct load_task *task __attribute__((unused)), + int flags __attribute__((unused))) +{ +} +static void __attribute__((unused)) load_tftp( + struct load_task *task __attribute__((unused))) +{ +} +static void __attribute__((unused)) load_sftp( + struct load_task *task __attribute__((unused))) +{ +} +static void __attribute__((unused)) load_nfs( + struct load_task *task __attribute__((unused))) +{ +} +static void __attribute__((unused)) load_url_process_exit( + struct process *process __attribute__((unused))) +{ +} + +#endif |