CI updates
This commit is contained in:
@@ -78,7 +78,7 @@ int upx_doctest_check(int argc, char **argv) {
|
||||
context.setOption("dt-duration", true);
|
||||
if (success)
|
||||
context.setOption("dt-success", true);
|
||||
// this requires that main_get_options() understands "--dt-XXX" options
|
||||
// this requires that main_get_options() understands/ignores doctest "--dt-XXX" options
|
||||
if (argc > 0 && argv != nullptr)
|
||||
context.applyCommandLine(argc, argv);
|
||||
int r = context.run();
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
#pragma GCC diagnostic ignored "-Wshadow"
|
||||
#endif
|
||||
|
||||
#if !defined(UPX_DOCTEST_CONFIG_MULTITHREADING) && !(WITH_THREADS)
|
||||
#if !(WITH_THREADS) && !defined(UPX_DOCTEST_CONFIG_MULTITHREADING)
|
||||
#ifndef DOCTEST_CONFIG_NO_MULTITHREADING
|
||||
#define DOCTEST_CONFIG_NO_MULTITHREADING
|
||||
#endif
|
||||
|
||||
+7
-7
@@ -589,7 +589,7 @@ using upx::tribool;
|
||||
// #define M_CL1B_8 12
|
||||
// #define M_CL1B_LE16 13
|
||||
#define M_LZMA 14
|
||||
#define M_DEFLATE 15 // zlib
|
||||
#define M_DEFLATE 15 // NOT YET USED
|
||||
#define M_ZSTD 16 // NOT YET USED
|
||||
#define M_BZIP2 17 // NOT YET USED
|
||||
// compression methods internal usage
|
||||
@@ -781,19 +781,19 @@ struct upx_compress_result_t final {
|
||||
|
||||
// classes
|
||||
class ElfLinker;
|
||||
typedef ElfLinker Linker;
|
||||
typedef ElfLinker Linker; // shortcut
|
||||
class Throwable;
|
||||
|
||||
// check/dt_check.cpp
|
||||
noinline void upx_compiler_sanity_check() noexcept;
|
||||
noinline int upx_doctest_check(int argc, char **argv);
|
||||
int upx_doctest_check();
|
||||
|
||||
// util/membuffer.h
|
||||
class MemBuffer;
|
||||
void *membuffer_get_void_ptr(MemBuffer &mb) noexcept;
|
||||
unsigned membuffer_get_size(MemBuffer &mb) noexcept;
|
||||
|
||||
// util/dt_check.cpp
|
||||
noinline void upx_compiler_sanity_check() noexcept;
|
||||
noinline int upx_doctest_check(int argc, char **argv);
|
||||
int upx_doctest_check();
|
||||
|
||||
// main.cpp
|
||||
extern const char *progname;
|
||||
bool main_set_exit_code(int ec);
|
||||
|
||||
+4
-4
@@ -792,7 +792,7 @@ static int do_option(int optc, const char *arg) {
|
||||
break;
|
||||
|
||||
#if !defined(DOCTEST_CONFIG_DISABLE)
|
||||
case 999: // doctest --dt-XXX option
|
||||
case 999: // [doctest] --dt-XXX option; ignored here, see upx_doctest_check()
|
||||
break;
|
||||
#endif
|
||||
|
||||
@@ -816,7 +816,7 @@ int main_get_options(int argc, char **argv) {
|
||||
// commands
|
||||
{"best", 0x10, N, 900}, // compress best
|
||||
{"brute", 0x10, N, 901}, // compress best, brute force
|
||||
{"ultra-brute", 0x10, N, 902}, // compress best, brute force
|
||||
{"ultra-brute", 0x10, N, 902}, // compress best, ultra-brute force
|
||||
{"decompress", 0, N, 'd'}, // decompress
|
||||
{"fast", 0x10, N, '1'}, // compress faster
|
||||
{"fileinfo", 0x10, N, 909}, // display info about file
|
||||
@@ -966,7 +966,7 @@ int main_get_options(int argc, char **argv) {
|
||||
{"strip-relocs", 0x12, N, 634},
|
||||
{"keep-resource", 0x31, N, 635},
|
||||
|
||||
#if !defined(DOCTEST_CONFIG_DISABLE)
|
||||
#if !defined(DOCTEST_CONFIG_DISABLE) // accept and ignore some doctest --dt-XXX options
|
||||
// [doctest] Query flags - the program quits after them. Available:
|
||||
{"dt-c", 0x10, N, 999},
|
||||
{"dt-count", 0x10, N, 999},
|
||||
@@ -1023,7 +1023,7 @@ void main_get_envoptions() {
|
||||
// commands
|
||||
{"best", 0x10, N, 900}, // compress best
|
||||
{"brute", 0x10, N, 901}, // compress best, brute force
|
||||
{"ultra-brute", 0x10, N, 902}, // compress best, brute force
|
||||
{"ultra-brute", 0x10, N, 902}, // compress best, ultra-brute force
|
||||
{"fast", 0x10, N, '1'}, // compress faster
|
||||
|
||||
// options
|
||||
|
||||
+1
-1
@@ -143,7 +143,7 @@ void printWarn(const char *iname, const char *format, ...) noexcept {
|
||||
}
|
||||
|
||||
void printUnhandledException(const char *iname, const std::exception *e) noexcept {
|
||||
if (e)
|
||||
if (e != nullptr)
|
||||
printErr(iname, "unhandled exception: %s\n", prettyName(e->what()));
|
||||
else
|
||||
printErr(iname, "internal error: unhandled exception!\n");
|
||||
|
||||
+2
-2
@@ -28,10 +28,10 @@
|
||||
#include "conf.h"
|
||||
|
||||
static Options global_options;
|
||||
Options *opt = &global_options; // also see class PackMaster
|
||||
Options *opt = &global_options; // also see class PackMaster for per-file local options
|
||||
|
||||
#if WITH_THREADS
|
||||
std::mutex opt_lock_mutex;
|
||||
std::mutex opt_lock_mutex; // for locking "opt"
|
||||
#endif
|
||||
|
||||
/*************************************************************************
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ struct Options;
|
||||
extern Options *opt; // global options, see class PackMaster for per-file local options
|
||||
|
||||
#if WITH_THREADS
|
||||
extern std::mutex opt_lock_mutex;
|
||||
extern std::mutex opt_lock_mutex; // for locking "opt"
|
||||
#endif
|
||||
|
||||
/*************************************************************************
|
||||
|
||||
+2
-4
@@ -33,10 +33,8 @@
|
||||
// compression method util
|
||||
**************************************************************************/
|
||||
|
||||
/*static*/ bool Packer::isValidCompressionMethod(int method) {
|
||||
if (M_IS_LZMA(method))
|
||||
return true;
|
||||
return method >= M_NRV2B_LE32 && method <= M_LZMA;
|
||||
/*static*/ bool Packer::isValidCompressionMethod(int m) {
|
||||
return M_IS_LZMA(m) || M_IS_NRV2B(m) || M_IS_NRV2D(m) || M_IS_NRV2E(m);
|
||||
}
|
||||
|
||||
const int *Packer::getDefaultCompressionMethods_8(int method, int level, int small) const {
|
||||
|
||||
Reference in New Issue
Block a user