mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Merge commit '06154114300f5819eeafeb075a8c5042826b4e97' into dev
This commit is contained in:
+5
-4
@@ -3,7 +3,7 @@ language: cpp
|
||||
compiler: gcc
|
||||
|
||||
# Need GCC 5 and Boost 1.54+, which aren't in the 12.04 repositories - install
|
||||
# from PPAs. Also install the libssl-dev package, which is needed to build
|
||||
# from PPAs. Also install the libssl-dev package, which is needed to build
|
||||
# libgit2 with support for cloning from HTTPS URLs.
|
||||
addons:
|
||||
apt:
|
||||
@@ -38,10 +38,11 @@ before_script:
|
||||
# Move back into the cloned LOOT repo path.
|
||||
- cd $TRAVIS_BUILD_DIR/build
|
||||
# Fetch plugins to test with.
|
||||
- wget https://github.com/WrinklyNinja/testing-plugins/archive/master.tar.gz -O - | tar -xz
|
||||
- mv testing-plugins-master/* ./
|
||||
- wget https://github.com/WrinklyNinja/testing-plugins/archive/1.0.0.tar.gz -O - | tar -xz
|
||||
- mv testing-plugins-1.0.0/* ./
|
||||
# Fetch metadata to test with.
|
||||
- wget https://github.com/loot/testing-metadata/archive/master.tar.gz -O - | tar -xz
|
||||
- wget https://github.com/loot/testing-metadata/archive/1.0.0.tar.gz -O - | tar -xz
|
||||
- mv testing-metadata-1.0.0 testing-metadata
|
||||
# Travis machines are 64 bit, and the dependencies use dynamic linking.
|
||||
- cmake .. -DPROJECT_ARCH=64 -DPROJECT_STATIC_RUNTIME=OFF -DBUILD_SHARED_LIBS=OFF -DGTEST_ROOT=../../googletest-release-1.7.0
|
||||
|
||||
|
||||
@@ -31,9 +31,9 @@ LOOT requires the following C/C++ libraries (version numbers used in latest deve
|
||||
* [Boost](http://www.boost.org) v1.59.0
|
||||
* [Chromium Embedded Framework](https://bitbucket.org/chromiumembedded/cef) branch 2454: Required to build the GUI, but not the API or tests.
|
||||
* [Google Test](https://github.com/google/googletest) v1.7: Required to build the tests, but not the API or the GUI.
|
||||
* [Libespm](http://github.com/WrinklyNinja/libespm)
|
||||
* [Libespm](http://github.com/WrinklyNinja/libespm) v1.0.0
|
||||
* [Libgit2](http://libgit2.github.com/) v0.23.3
|
||||
* [Libloadorder](http://github.com/WrinklyNinja/libloadorder)
|
||||
* [Libloadorder](http://github.com/WrinklyNinja/libloadorder) revision 50342d7
|
||||
* [Pseudosem](http://github.com/WrinklyNinja/pseudosem): v1.0.1
|
||||
* [yaml-cpp](http://github.com/WrinklyNinja/yaml-cpp): Use the `patched-for-loot` branch.
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ wget -P build https://raw.githubusercontent.com/rpavlik/cmake-modules/master/Get
|
||||
cd ../..
|
||||
|
||||
# Install libespm.
|
||||
wget https://github.com/WrinklyNinja/libespm/archive/master.tar.gz -O - | tar -xz
|
||||
mv libespm-master libespm
|
||||
wget https://github.com/WrinklyNinja/libespm/archive/1.0.0.tar.gz -O - | tar -xz
|
||||
mv libespm-1.0.0 libespm
|
||||
|
||||
# Build yaml-cpp
|
||||
wget https://github.com/WrinklyNinja/yaml-cpp/archive/patched-for-loot.tar.gz -O - | tar -xz
|
||||
@@ -28,8 +28,8 @@ make git2
|
||||
cd ../..
|
||||
|
||||
# Build libloadorder
|
||||
wget https://github.com/WrinklyNinja/libloadorder/archive/master.tar.gz -O - | tar -xz
|
||||
mv libloadorder-master libloadorder
|
||||
wget https://github.com/WrinklyNinja/libloadorder/archive/50342d7298f27a6a4366175119bd17aaf09000c7.tar.gz -O - | tar -xz
|
||||
mv libloadorder-50342d7298f27a6a4366175119bd17aaf09000c7 libloadorder
|
||||
mkdir libloadorder/build && cd libloadorder/build
|
||||
cmake .. -DPROJECT_ARCH=64 -DPROJECT_STATIC_RUNTIME=OFF -DBUILD_SHARED_LIBS=OFF -DGTEST_ROOT=../gtest-1.7.0
|
||||
make loadorder64
|
||||
|
||||
@@ -289,7 +289,7 @@ TEST_F(Game, LoadPlugins) {
|
||||
}), plugin.FormIDs());
|
||||
EXPECT_TRUE(plugin.Masters().empty());
|
||||
EXPECT_EQ("5.0", plugin.Version());
|
||||
EXPECT_EQ(0xD33753E4, plugin.Crc());
|
||||
EXPECT_EQ(0x187BE342, plugin.Crc());
|
||||
EXPECT_EQ(0, plugin.NumOverrideFormIDs());
|
||||
|
||||
ASSERT_NE(game.plugins.end(), game.plugins.find("blank.esm"));
|
||||
@@ -311,7 +311,7 @@ TEST_F(Game, LoadPlugins) {
|
||||
}), plugin.FormIDs());
|
||||
EXPECT_TRUE(plugin.Masters().empty());
|
||||
EXPECT_EQ("5.0", plugin.Version());
|
||||
EXPECT_EQ(0xD33753E4, plugin.Crc());
|
||||
EXPECT_EQ(0x187BE342, plugin.Crc());
|
||||
EXPECT_EQ(0, plugin.NumOverrideFormIDs());
|
||||
|
||||
ASSERT_NE(game.plugins.end(), game.plugins.find("blank - different.esm"));
|
||||
@@ -393,7 +393,7 @@ TEST_F(Game, LoadPlugins) {
|
||||
}), plugin.FormIDs());
|
||||
EXPECT_TRUE(plugin.Masters().empty());
|
||||
EXPECT_EQ("", plugin.Version());
|
||||
EXPECT_EQ(0xE12EFAAA, plugin.Crc());
|
||||
EXPECT_EQ(0x24F0E2A1, plugin.Crc());
|
||||
EXPECT_EQ(0, plugin.NumOverrideFormIDs());
|
||||
|
||||
ASSERT_NE(game.plugins.end(), game.plugins.find("blank - different.esp"));
|
||||
|
||||
@@ -36,7 +36,7 @@ TEST_F(GetCrc32, MissingFile) {
|
||||
}
|
||||
|
||||
TEST_F(GetCrc32, ValidFile) {
|
||||
EXPECT_EQ(0xE12EFAAA, loot::GetCrc32(dataPath / "Blank.esp"));
|
||||
EXPECT_EQ(0x24F0E2A1, loot::GetCrc32(dataPath / "Blank.esp"));
|
||||
}
|
||||
|
||||
TEST(IntToHexString, PositiveAndZeroValues) {
|
||||
|
||||
@@ -226,7 +226,7 @@ TEST_F(ConditionGrammar, ChecksumConditionTrue) {
|
||||
bool r = false;
|
||||
Grammar cg(&game);
|
||||
|
||||
std::string condition("checksum(\"Blank.esp\", E12EFAAA)");
|
||||
std::string condition("checksum(\"Blank.esp\", 24F0E2A1)");
|
||||
std::string::const_iterator begin = condition.begin();
|
||||
std::string::const_iterator end = condition.end();
|
||||
|
||||
|
||||
@@ -506,7 +506,7 @@ TEST_F(PluginMetadata, EvalAllConditions) {
|
||||
" - name: Relev\n"
|
||||
" condition: 'file(\"Blank.missing.esm\")'\n"
|
||||
"dirty:\n"
|
||||
" - crc: 0xE12EFAAA\n"
|
||||
" - crc: 0x24F0E2A1\n"
|
||||
" util: 'utility'\n"
|
||||
" udr: 1\n"
|
||||
" nav: 2\n"
|
||||
@@ -530,7 +530,7 @@ TEST_F(PluginMetadata, EvalAllConditions) {
|
||||
}), pm.Messages());
|
||||
EXPECT_TRUE(pm.Tags().empty());
|
||||
EXPECT_EQ(std::set<loot::PluginDirtyInfo>({
|
||||
loot::PluginDirtyInfo(0xE12EFAAA, 0, 1, 2, "utility")
|
||||
loot::PluginDirtyInfo(0x24F0E2A1, 0, 1, 2, "utility")
|
||||
}), pm.DirtyInfo());
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ TEST_F(Plugin, ConstructorsAndDataAccess) {
|
||||
EXPECT_TRUE(plugin.IsMaster());
|
||||
EXPECT_FALSE(plugin.IsEmpty());
|
||||
EXPECT_EQ("5.0", plugin.Version());
|
||||
EXPECT_EQ(0xD33753E4, plugin.Crc());
|
||||
EXPECT_EQ(0x187BE342, plugin.Crc());
|
||||
|
||||
plugin = loot::Plugin(game, "Blank - Master Dependent.esp", false);
|
||||
EXPECT_EQ("Blank - Master Dependent.esp", plugin.Name());
|
||||
@@ -293,14 +293,14 @@ TEST_F(Plugin, CheckInstallValidity) {
|
||||
loot::File("Skyrim.esm"),
|
||||
});
|
||||
plugin.DirtyInfo({
|
||||
loot::PluginDirtyInfo(0xD33753E4, 0, 1, 2, "utility1"),
|
||||
loot::PluginDirtyInfo(0x187BE342, 0, 1, 2, "utility1"),
|
||||
loot::PluginDirtyInfo(0xDEADBEEF, 0, 5, 10, "utility2"),
|
||||
});
|
||||
EXPECT_TRUE(plugin.CheckInstallValidity(game));
|
||||
EXPECT_EQ(std::list<loot::Message>({
|
||||
loot::Message(loot::Message::error, "This plugin requires \"Blank.missing.esm\" to be installed, but it is missing."),
|
||||
loot::Message(loot::Message::error, "This plugin is incompatible with \"Skyrim.esm\", but both are present."),
|
||||
loot::PluginDirtyInfo(0xD33753E4, 0, 1, 2, "utility1").AsMessage(),
|
||||
loot::PluginDirtyInfo(0x187BE342, 0, 1, 2, "utility1").AsMessage(),
|
||||
loot::PluginDirtyInfo(0xDEADBEEF, 0, 5, 10, "utility2").AsMessage(),
|
||||
}), plugin.Messages());
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ TEST_F(PluginLoader, Load) {
|
||||
}), pl.FormIDs());
|
||||
EXPECT_TRUE(pl.Masters().empty());
|
||||
EXPECT_EQ("v5.0", pl.Description());
|
||||
EXPECT_EQ(0xD33753E4, pl.Crc());
|
||||
EXPECT_EQ(0x187BE342, pl.Crc());
|
||||
|
||||
EXPECT_NO_THROW(pl.Load(game, "Blank - Master Dependent.esp", false, false));
|
||||
EXPECT_FALSE(pl.IsEmpty());
|
||||
|
||||
@@ -105,7 +105,7 @@ TEST_F(Masterlist, GetInfo_NoMasterlist) {
|
||||
}
|
||||
|
||||
TEST_F(Masterlist, GetInfo_NoRepository) {
|
||||
ASSERT_NO_THROW(boost::filesystem::copy("./testing-metadata-master/masterlist.yaml", masterlistPath));
|
||||
ASSERT_NO_THROW(boost::filesystem::copy("./testing-metadata/masterlist.yaml", masterlistPath));
|
||||
|
||||
loot::Masterlist masterlist;
|
||||
EXPECT_ANY_THROW(masterlist.GetInfo(masterlistPath, false));
|
||||
|
||||
@@ -31,9 +31,9 @@ along with LOOT. If not, see
|
||||
class MetadataList : public SkyrimTest {
|
||||
protected:
|
||||
MetadataList() :
|
||||
metadataPath("./testing-metadata-master/masterlist.yaml"),
|
||||
savedMetadataPath("./testing-metadata-master/saved.masterlist.yaml"),
|
||||
invalidMetadataPaths({"./testing-metadata-master/invalid/non_unique.yaml"}) {
|
||||
metadataPath("./testing-metadata/masterlist.yaml"),
|
||||
savedMetadataPath("./testing-metadata/saved.masterlist.yaml"),
|
||||
invalidMetadataPaths({"./testing-metadata/invalid/non_unique.yaml"}) {
|
||||
PluginMetadataToString = [](const loot::PluginMetadata& plugin) {
|
||||
return plugin.Name();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user