Fix CI for osx
This commit is contained in:
parent
1a7625ea9b
commit
498c9da860
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <cerrno>
|
||||||
|
|
||||||
#if !defined(_MSC_VER)
|
#if !defined(_MSC_VER)
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <cpp-utils/system/stat.h>
|
||||||
|
|
||||||
namespace cpputils {
|
namespace cpputils {
|
||||||
|
|
||||||
|
@ -19,7 +19,11 @@ TEST(FiletimeTest, SetAndGetTime_ReturnsCorrectTime) {
|
|||||||
EXPECT_EQ(0, retval);
|
EXPECT_EQ(0, retval);
|
||||||
|
|
||||||
EXPECT_EQ(accessTime.tv_sec, readAccessTime.tv_sec);
|
EXPECT_EQ(accessTime.tv_sec, readAccessTime.tv_sec);
|
||||||
EXPECT_EQ(accessTime.tv_nsec, readAccessTime.tv_nsec);
|
|
||||||
EXPECT_EQ(modificationTime.tv_sec, readModificationTime.tv_sec);
|
EXPECT_EQ(modificationTime.tv_sec, readModificationTime.tv_sec);
|
||||||
|
|
||||||
|
// Apple unfortunately doesn't give us nanoseconds at all
|
||||||
|
#if !defined(__APPLE__)
|
||||||
|
EXPECT_EQ(accessTime.tv_nsec, readAccessTime.tv_nsec);
|
||||||
EXPECT_EQ(modificationTime.tv_nsec, readModificationTime.tv_nsec);
|
EXPECT_EQ(modificationTime.tv_nsec, readModificationTime.tv_nsec);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -144,8 +144,9 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
string newerVersion() {
|
string newerVersion() {
|
||||||
string newerVersion = gitversion::MajorVersion()+"."+std::to_string(std::stol(gitversion::MinorVersion())+1);
|
string newerVersion = gitversion::MajorVersion()+"."+std::to_string(std::stol(gitversion::MinorVersion())+2);
|
||||||
assert(gitversion::VersionCompare::isOlderThan(CryConfig::FilesystemFormatVersion, newerVersion));
|
EXPECT_TRUE(gitversion::VersionCompare::isOlderThan(CryConfig::FilesystemFormatVersion, newerVersion))
|
||||||
|
<< "Format Version " << CryConfig::FilesystemFormatVersion << " should be older than Git Version " << newerVersion;
|
||||||
return newerVersion;
|
return newerVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include "testutils/FuseLstatReturnTest.h"
|
#include "testutils/FuseLstatReturnTest.h"
|
||||||
|
#include <cpp-utils/system/stat.h>
|
||||||
|
|
||||||
using ::testing::WithParamInterface;
|
using ::testing::WithParamInterface;
|
||||||
using ::testing::Values;
|
using ::testing::Values;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include "testutils/FuseLstatReturnTest.h"
|
#include "testutils/FuseLstatReturnTest.h"
|
||||||
|
#include <cpp-utils/system/stat.h>
|
||||||
|
|
||||||
using ::testing::WithParamInterface;
|
using ::testing::WithParamInterface;
|
||||||
using ::testing::Values;
|
using ::testing::Values;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include "testutils/FuseLstatReturnTest.h"
|
#include "testutils/FuseLstatReturnTest.h"
|
||||||
|
#include <cpp-utils/system/stat.h>
|
||||||
|
|
||||||
using ::testing::WithParamInterface;
|
using ::testing::WithParamInterface;
|
||||||
using ::testing::Values;
|
using ::testing::Values;
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
using ::testing::WithParamInterface;
|
using ::testing::WithParamInterface;
|
||||||
using ::testing::Values;
|
using ::testing::Values;
|
||||||
|
|
||||||
class FuseStatfsReturnBavailTest: public FuseStatfsReturnTest<fsblkcnt64_t>, public WithParamInterface<fsblkcnt64_t> {
|
class FuseStatfsReturnBavailTest: public FuseStatfsReturnTest<uint64_t>, public WithParamInterface<uint64_t> {
|
||||||
private:
|
private:
|
||||||
void set(struct ::statvfs *stat, fsblkcnt64_t value) override {
|
void set(struct ::statvfs *stat, uint64_t value) override {
|
||||||
stat->f_bavail = value;
|
stat->f_bavail = value;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
using ::testing::WithParamInterface;
|
using ::testing::WithParamInterface;
|
||||||
using ::testing::Values;
|
using ::testing::Values;
|
||||||
|
|
||||||
class FuseStatfsReturnBfreeTest: public FuseStatfsReturnTest<fsblkcnt64_t>, public WithParamInterface<fsblkcnt64_t> {
|
class FuseStatfsReturnBfreeTest: public FuseStatfsReturnTest<uint64_t>, public WithParamInterface<uint64_t> {
|
||||||
private:
|
private:
|
||||||
void set(struct ::statvfs *stat, fsblkcnt64_t value) override {
|
void set(struct ::statvfs *stat, uint64_t value) override {
|
||||||
stat->f_bfree = value;
|
stat->f_bfree = value;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
using ::testing::WithParamInterface;
|
using ::testing::WithParamInterface;
|
||||||
using ::testing::Values;
|
using ::testing::Values;
|
||||||
|
|
||||||
class FuseStatfsReturnBlocksTest: public FuseStatfsReturnTest<fsblkcnt64_t>, public WithParamInterface<fsblkcnt64_t> {
|
class FuseStatfsReturnBlocksTest: public FuseStatfsReturnTest<uint64_t>, public WithParamInterface<uint64_t> {
|
||||||
private:
|
private:
|
||||||
void set(struct ::statvfs *stat, fsblkcnt64_t value) override {
|
void set(struct ::statvfs *stat, uint64_t value) override {
|
||||||
stat->f_blocks = value;
|
stat->f_blocks = value;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
using ::testing::WithParamInterface;
|
using ::testing::WithParamInterface;
|
||||||
using ::testing::Values;
|
using ::testing::Values;
|
||||||
|
|
||||||
class FuseStatfsReturnFfreeTest: public FuseStatfsReturnTest<fsfilcnt64_t>, public WithParamInterface<fsfilcnt64_t> {
|
class FuseStatfsReturnFfreeTest: public FuseStatfsReturnTest<uint64_t>, public WithParamInterface<uint64_t> {
|
||||||
private:
|
private:
|
||||||
void set(struct ::statvfs *stat, fsfilcnt64_t value) override {
|
void set(struct ::statvfs *stat, uint64_t value) override {
|
||||||
stat->f_ffree = value;
|
stat->f_ffree = value;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
using ::testing::WithParamInterface;
|
using ::testing::WithParamInterface;
|
||||||
using ::testing::Values;
|
using ::testing::Values;
|
||||||
|
|
||||||
class FuseStatfsReturnFilesTest: public FuseStatfsReturnTest<fsfilcnt64_t>, public WithParamInterface<fsfilcnt64_t> {
|
class FuseStatfsReturnFilesTest: public FuseStatfsReturnTest<uint64_t>, public WithParamInterface<uint64_t> {
|
||||||
private:
|
private:
|
||||||
void set(struct ::statvfs *stat, fsfilcnt64_t value) override {
|
void set(struct ::statvfs *stat, uint64_t value) override {
|
||||||
stat->f_files = value;
|
stat->f_files = value;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user