Skip to content
Open
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
31 changes: 28 additions & 3 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ jobs:
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DASAN=ON
-DTESTS=ON
-DTESTS_VERBOSE=ON
-DTESTS_RT=ON
-DTESTS_VERBOSE=ON
-DDEBUG_MESSAGES=ON
-S ${{ github.workspace }}

Expand All @@ -78,7 +78,25 @@ jobs:
PKG_CONFIG_PATH: /opt/homebrew/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}

- name: Test
- name: Test (Unit)
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: |
export ASAN_OPTIONS="verify_asan_link_order=0 strict_string_checks=1 detect_stack_use_after_return=1"
if [[ "$RUNNER_OS" == "macOS" ]]; then
ASAN_OPTIONS="$ASAN_OPTIONS detect_leaks=0"
else
ASAN_OPTIONS="$ASAN_OPTIONS detect_leaks=1"
fi
ctest --tests-regex '^test_.*' \
--build-config ${{ matrix.build_type }} \
--output-on-failure \
--output-junit results_unit.xml \
--test-output-size-passed 65536 \
--test-output-size-failed 65536
env:
STASIS_SYSCONFDIR: ../../..

- name: Test (RT)
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: |
export ASAN_OPTIONS="verify_asan_link_order=0 strict_string_checks=1 detect_stack_use_after_return=1"
Expand All @@ -87,6 +105,13 @@ jobs:
else
ASAN_OPTIONS="$ASAN_OPTIONS detect_leaks=1"
fi
ctest --build-config ${{ matrix.build_type }} --output-on-failure --output-junit results.xml --test-output-size-passed 65536 --test-output-size-failed 65536
ctest --tests-regex '^rt_.*' \
-V \
--build-config ${{ matrix.build_type }} \
--output-junit results_rt.xml \
--test-output-size-passed 65536 \
--test-output-size-failed 65536
env:
STASIS_SYSCONFDIR: ../../..
STASIS_TEST_ALWAYS_SHOW_OUTPUT: 1
STASIS_TEST_ALWAYS_SHOW_INDEXER_OUTPUT: 0
1 change: 0 additions & 1 deletion src/lib/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ add_library(stasis_core STATIC
download.c
recipe.c
relocation.c
wheelinfo.c
wheel.c
copy.c
artifactory.c
Expand Down
60 changes: 58 additions & 2 deletions src/lib/core/include/wheel.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
#define WHEEL_FROM_DIST 0
#define WHEEL_FROM_METADATA 1

#define WHEEL_MATCH_EXACT 0 ///< Match when all patterns are present
#define WHEEL_MATCH_ANY 1 ///< Match when any patterns are present

enum {
WHEEL_META_METADATA_VERSION=0,
WHEEL_META_NAME,
Expand Down Expand Up @@ -135,6 +138,56 @@ struct Wheel {
size_t num_entry_point;
};

#include <stdbool.h>
struct WheelDisplay {
struct WheelDistDisplay {
bool _enable;
bool _enable_header;
bool wheel_version;
bool generator;
bool root_is_pure_lib;
bool tag;
bool top_level;
bool zip_safe;
bool record;
bool entry_point;
} dist;
struct WheelMetadataDisplay {
bool _enable;
bool _enable_header;
bool metadata_version;
bool name;
bool version;
bool summary;
bool author;
bool author_email;
bool maintainer;
bool maintainer_email;
bool license;
bool license_expression;
bool home_page;
bool download_url;
bool project_url;
bool classifier;
bool requires_python;
bool requires_external;
bool description_content_type;
bool license_file;
bool import_name;
bool import_namespace;
bool requires_dist;
bool provides;
bool provides_dist;
bool obsoletes;
bool obsoletes_dist;
bool description;
bool platform;
bool supported_platform;
bool keywords;
bool dynamic;
bool provides_extra;
} metadata;
};
#define METADATA_MULTILINE_PREFIX " "


Expand Down Expand Up @@ -249,9 +302,12 @@ int wheel_get_file_contents(const char *wheelfile, const char *filename, char **
/**
* Display the values of a `Wheel` structure in human readable format
*
* @param wheel
* @param wheel pointer to Wheel
* @param opt struct containing caller-configured display flags
* @return 0 on success, -1 on error
*/
int wheel_show_info(const struct Wheel *wheel);
int wheel_show_info(const struct Wheel *wheel, struct WheelDisplay opt);

struct Wheel *wheel_search(const char *basepath, const char *name, char *to_match[], unsigned match_mode);

#endif //WHEEL_H
36 changes: 0 additions & 36 deletions src/lib/core/include/wheelinfo.h

This file was deleted.

Loading
Loading