mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Pin versions of testing resources used.
To avoid future breakage by any further changes made to them. Also update the expected CRC values to match the pinned testing plugins.
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
|
||||
|
||||
|
||||
@@ -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