Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
codecov:
notify:
wait_for_ci: true
require_ci_to_pass: true
branch: main
comment:
behavior: default
layout: reach,diff,flags,tree,reach
show_carryforward_flags: false
coverage:
precision: 2
range:
- 60.0
- 80.0
round: down
status:
changes: false
default_rules:
flag_coverage_not_uploaded_behavior: include
patch: true
project:
default:
threshold: 5
target: auto
slack_app: true
19 changes: 19 additions & 0 deletions include/shim-unit-test.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// SPDX-License-Identifier: BSD-2-Clause-Patent
/*
* shim-unit-test.h - setup that always needs done on unit tests
* Copyright Peter Jones <pjones@redhat.com>
*/

#pragma once

#ifdef SHIM_UNIT_TEST

# define STATIC

#else /* !SHIM_UNIT_TEST */

# define STATIC static

#endif /* SHIM_UNIT_TEST */

// vim:fenc=utf-8:tw=75:noet
9 changes: 9 additions & 0 deletions shim.h
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,13 @@ char *translate_slashes(char *out, const char *str);

#include <efisetjmp_arch.h>

/*
* gnu-efi leaks a STATIC define, remove it.
*/
#ifdef STATIC
#undef STATIC
#endif

typedef struct {
EFI_LOADED_IMAGE li;
EFI_IMAGE_ENTRY_POINT entry_point;
Expand All @@ -350,4 +357,6 @@ typedef struct {
EFI_DEVICE_PATH *loaded_image_device_path;
} SHIM_LOADED_IMAGE;

#include "shim-unit-test.h"

#endif /* SHIM_H_ */
Loading