mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-22 05:40:27 +00:00
Make: distcheck - check module errors
This check for errors caused by wrong module dependencies.
This commit is contained in:
@@ -508,6 +508,7 @@ check: tests
|
||||
distcheck:
|
||||
$(TARGET)
|
||||
$(TARGET) --capabilities
|
||||
$(TARGET) --list-modules
|
||||
[ -z "$(GUI_EXE)" ] || $(GUI_EXE) -h
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -308,7 +308,12 @@ void list_modules(enum library_class cls, int abi_version, bool full) {
|
||||
}
|
||||
}
|
||||
|
||||
void list_all_modules() {
|
||||
/**
|
||||
* @retval false if there occurs some problem opening one or more modules, true otherwise
|
||||
*/
|
||||
bool list_all_modules() {
|
||||
bool ret = true;
|
||||
|
||||
for (auto cls_it = library_class_info.begin(); cls_it != library_class_info.end();
|
||||
++cls_it) {
|
||||
cout << cls_it->second.class_name << "\n";
|
||||
@@ -322,12 +327,15 @@ void list_all_modules() {
|
||||
}
|
||||
|
||||
if (!lib_errors.empty()) {
|
||||
ret = false;
|
||||
cout << rang::style::bold << rang::fg::red << "Errors:\n" << rang::fg::reset << rang::style::reset;
|
||||
for (auto && item : lib_errors) {
|
||||
cout << "\t" << rang::fg::red << item.first << rang::fg::reset << "\n\t\t" << item.second << "\n";
|
||||
}
|
||||
cout << "\n";
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
map<string, const void *> get_libraries_for_class(enum library_class cls, int abi_version, bool include_hidden)
|
||||
|
||||
@@ -86,7 +86,7 @@ enum library_class {
|
||||
const void *load_library(const char *name, enum library_class, int abi_version);
|
||||
void register_library(const char *name, const void *info, enum library_class, int abi_version, int hidden);
|
||||
void list_modules(enum library_class, int abi_version, bool full);
|
||||
void list_all_modules();
|
||||
bool list_all_modules();
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -619,7 +619,7 @@ static bool parse_params(char *optarg)
|
||||
return true;
|
||||
}
|
||||
|
||||
#define EXIT(retval) { common_cleanup(init); return retval; }
|
||||
#define EXIT(expr) { int rc = expr; common_cleanup(init); return rc; }
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
@@ -1068,8 +1068,7 @@ int main(int argc, char *argv[])
|
||||
video_offset = atoi(optarg) < 0 ? abs(atoi(optarg)) : 0;
|
||||
break;
|
||||
case OPT_LIST_MODULES:
|
||||
list_all_modules();
|
||||
EXIT(EXIT_SUCCESS);
|
||||
EXIT(list_all_modules() ? EXIT_SUCCESS : EXIT_FAILURE);
|
||||
case OPT_START_PAUSED:
|
||||
start_paused = true;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user