Skip to content

Commit

Permalink
[projmgr] Check file references portability
Browse files Browse the repository at this point in the history
  • Loading branch information
grasci-arm authored Jul 7, 2023
1 parent 74b06bd commit 3192221
Show file tree
Hide file tree
Showing 13 changed files with 298 additions and 101 deletions.
29 changes: 16 additions & 13 deletions tools/projmgr/include/ProjMgrYamlParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,23 +182,23 @@ class ProjMgrYamlParser {
void ParseVector(const YAML::Node& parent, const std::string& key, std::vector<std::string>& value);
void ParseVectorOfStringPairs(const YAML::Node& parent, const std::string& key, std::vector<std::pair<std::string, std::string>>& value);
void ParseVectorOrString(const YAML::Node& parent, const std::string& key, std::vector<std::string>& value);
bool ParseBuildType(const YAML::Node& parent, BuildType& buildType);
void ParseOutput(const YAML::Node& parent, OutputItem& output);
void ParseOutputDirs(const YAML::Node& parent, struct DirectoriesItem& directories);
void ParseGenerators(const YAML::Node& parent, GeneratorsItem& generators);
bool ParseBuildType(const YAML::Node& parent, const std::string& file, BuildType& buildType);
void ParseOutput(const YAML::Node& parent, const std::string& file, OutputItem& output);
void ParseOutputDirs(const YAML::Node& parent, const std::string& file, struct DirectoriesItem& directories);
void ParseGenerators(const YAML::Node& parent, const std::string& file, GeneratorsItem& generators);
void ParseConnections(const YAML::Node& parent, std::vector<ConnectItem>& connects);
bool ParseTargetType(const YAML::Node& parent, TargetType& targetType);
bool ParseBuildTypes(const YAML::Node& parent, std::map<std::string, BuildType>& buildTypes);
bool ParseTargetTypes(const YAML::Node& parent, std::map<std::string, TargetType>& targetTypes);
bool ParseTargetType(const YAML::Node& parent, const std::string& file, TargetType& targetType);
bool ParseBuildTypes(const YAML::Node& parent, const std::string& file, std::map<std::string, BuildType>& buildTypes);
bool ParseTargetTypes(const YAML::Node& parent, const std::string& file, std::map<std::string, TargetType>& targetTypes);
bool ParseContexts(const YAML::Node& parent, CsolutionItem& contexts);
bool ParseComponents(const YAML::Node& parent, std::vector<ComponentItem>& components);
bool ParseFiles(const YAML::Node& parent, std::vector<FileNode>& files);
bool ParseGroups(const YAML::Node& parent, std::vector<GroupNode>& groups);
bool ParseLayers(const YAML::Node& parent, std::vector<LayerItem>& layers);
bool ParseSetups(const YAML::Node& parent, std::vector<SetupItem>& setups);
bool ParseComponents(const YAML::Node& parent, const std::string& file, std::vector<ComponentItem>& components);
bool ParseFiles(const YAML::Node& parent, const std::string& file, std::vector<FileNode>& files);
bool ParseGroups(const YAML::Node& parent, const std::string& file, std::vector<GroupNode>& groups);
bool ParseLayers(const YAML::Node& parent, const std::string& file, std::vector<LayerItem>& layers);
bool ParseSetups(const YAML::Node& parent, const std::string& file, std::vector<SetupItem>& setups);
bool ParseTypeFilter(const YAML::Node& parent, TypeFilter& type);
bool ParseTypePair(std::vector<std::string>& vec, std::vector<TypePair>& typeVec);
bool ParseLinker(const YAML::Node& parent, std::vector<LinkerItem>& linker);
bool ParseLinker(const YAML::Node& parent, const std::string& file, std::vector<LinkerItem>& linker);
void ParseRte(const YAML::Node& parent, std::string& rteBaseDir);
bool GetTypes(const std::string& type, std::string& buildType, std::string& targetType);
bool ValidateCdefault(const std::string& input, const YAML::Node& root);
Expand All @@ -208,6 +208,9 @@ class ProjMgrYamlParser {
bool ValidateKeys(const std::string& input, const YAML::Node& parent, const std::set<std::string>& keys);
bool ValidateSequence(const std::string& input, const YAML::Node& parent, const std::string& seqKey);
bool ValidateMapping(const std::string& input, const YAML::Node& parent, const std::string& seqKey);
void ParsePortablePath(const YAML::Node& parent, const std::string& file, const std::string& key, std::string& value, bool checkExist = true);
void ParsePortablePaths(const YAML::Node& parent, const std::string& file, const std::string& key, std::vector<std::string>& value);
void CheckPortability(const std::string& file, const YAML::Mark& mark, const std::string& key, const std::string& value, bool checkExist);

};

Expand Down
4 changes: 0 additions & 4 deletions tools/projmgr/src/ProjMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,10 +380,6 @@ bool ProjMgr::PopulateContexts(void) {
if (cprojectFile.empty()) {
ProjMgrLogger::Error(cproject, "cproject file was not found");
return false;
} else if (fs::path(cprojectFile).filename().string() != fs::path(cproject).filename().string()) {
ProjMgrLogger::Error(cproject, "cproject filename has case inconsistency");
ProjMgrLogger::Info(fs::path(cprojectFile).filename().string(), "should be used instead");
return false;
}
if (!m_parser.ParseCproject(cprojectFile, m_checkSchema)) {
return false;
Expand Down
Loading

0 comments on commit 3192221

Please sign in to comment.