mirror of
https://github.com/QuasarApp/CQtDeployer.git
synced 2025-04-28 02:34:34 +00:00
fix tests of noLibC
This commit is contained in:
parent
f70abe8def
commit
888e6c887d
@ -386,8 +386,6 @@ void ConfigParser::initIgnoreList()
|
||||
return rule;
|
||||
};
|
||||
|
||||
rule.label = "libc";
|
||||
|
||||
_config.ignoreList.addRule(addRule("libc"));
|
||||
_config.ignoreList.addRule(addRule("ld-"));
|
||||
_config.ignoreList.addRule(addRule("libpthread"));
|
||||
|
@ -32,9 +32,9 @@ bool IgnoreRule::isIgnore(const LibInfo &info) const {
|
||||
|
||||
for (auto &ignore : _data) {
|
||||
|
||||
bool checkPlatform = ignore.platform == info.getPlatform() || ignore.platform == UnknownPlatform;
|
||||
bool checkPriority = ignore.prority <= info.getPriority();
|
||||
bool checkEnvirement = ignore.enfirement.inThisEnvirement(info.fullPath());
|
||||
bool checkPlatform = ((ignore.platform & info.getPlatform()) == info.getPlatform()) || ignore.platform == UnknownPlatform;
|
||||
bool checkPriority = ignore.prority >= info.getPriority();
|
||||
bool checkEnvirement = !ignore.enfirement.size() || ignore.enfirement.inThisEnvirement(info.fullPath());
|
||||
|
||||
if (checkPlatform && checkPriority && checkEnvirement) {
|
||||
return check(info, ignore.label);
|
||||
|
@ -8,9 +8,13 @@ TestUtils::TestUtils()
|
||||
|
||||
}
|
||||
|
||||
QSet<QString> TestUtils::getTree(const QString &path) {
|
||||
QSet<QString> TestUtils::getTree(const QString &path, int limit, int depch) {
|
||||
QFileInfo info(path);
|
||||
|
||||
if (limit > 0 && depch >= limit) {
|
||||
return {};
|
||||
}
|
||||
|
||||
if (!info.exists()) {
|
||||
return {};
|
||||
}
|
||||
@ -25,7 +29,7 @@ QSet<QString> TestUtils::getTree(const QString &path) {
|
||||
QDir dir(info.absoluteFilePath());
|
||||
auto list = dir.entryInfoList(QDir::AllEntries | QDir::NoDotAndDotDot);
|
||||
for (auto &i: list) {
|
||||
result.unite(getTree(i.absoluteFilePath()));
|
||||
result.unite(getTree(i.absoluteFilePath(), limit, depch + 1));
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -7,7 +7,7 @@ class TestUtils
|
||||
{
|
||||
public:
|
||||
TestUtils();
|
||||
QSet<QString> getTree( const QString& path);
|
||||
QSet<QString> getTree(const QString& path, int limit = -1, int depch = 0);
|
||||
QSet<QString> createTree( const QStringList& tree);
|
||||
|
||||
/**
|
||||
|
@ -187,6 +187,9 @@ deploytest::deploytest() {
|
||||
|
||||
auto tempTree = utils.getTree(TestQtDir);
|
||||
|
||||
tempTree += utils.getTree("/lib", 4);
|
||||
tempTree += utils.getTree("/usr/lib", 4);
|
||||
|
||||
for (const QString &i: tempTree) {
|
||||
qtFilesTree.insert(QFileInfo(i).fileName());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user