Fix CI for osx

This commit is contained in:
Sebastian Messmer 2018-09-10 13:11:00 -07:00
parent 1a7625ea9b
commit 498c9da860
12 changed files with 23 additions and 13 deletions

View File

@ -2,6 +2,7 @@
#include <stdexcept>
#include <string>
#include <cerrno>
#if !defined(_MSC_VER)

View File

@ -5,6 +5,7 @@
#include <sys/time.h>
#include <sys/stat.h>
#include <errno.h>
#include <cpp-utils/system/stat.h>
namespace cpputils {

View File

@ -19,7 +19,11 @@ TEST(FiletimeTest, SetAndGetTime_ReturnsCorrectTime) {
EXPECT_EQ(0, retval);
EXPECT_EQ(accessTime.tv_sec, readAccessTime.tv_sec);
EXPECT_EQ(accessTime.tv_nsec, readAccessTime.tv_nsec);
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);
#endif
}

View File

@ -144,8 +144,9 @@ public:
}
string newerVersion() {
string newerVersion = gitversion::MajorVersion()+"."+std::to_string(std::stol(gitversion::MinorVersion())+1);
assert(gitversion::VersionCompare::isOlderThan(CryConfig::FilesystemFormatVersion, newerVersion));
string newerVersion = gitversion::MajorVersion()+"."+std::to_string(std::stol(gitversion::MinorVersion())+2);
EXPECT_TRUE(gitversion::VersionCompare::isOlderThan(CryConfig::FilesystemFormatVersion, newerVersion))
<< "Format Version " << CryConfig::FilesystemFormatVersion << " should be older than Git Version " << newerVersion;
return newerVersion;
}

View File

@ -1,4 +1,5 @@
#include "testutils/FuseLstatReturnTest.h"
#include <cpp-utils/system/stat.h>
using ::testing::WithParamInterface;
using ::testing::Values;

View File

@ -1,4 +1,5 @@
#include "testutils/FuseLstatReturnTest.h"
#include <cpp-utils/system/stat.h>
using ::testing::WithParamInterface;
using ::testing::Values;

View File

@ -1,4 +1,5 @@
#include "testutils/FuseLstatReturnTest.h"
#include <cpp-utils/system/stat.h>
using ::testing::WithParamInterface;
using ::testing::Values;

View File

@ -3,9 +3,9 @@
using ::testing::WithParamInterface;
using ::testing::Values;
class FuseStatfsReturnBavailTest: public FuseStatfsReturnTest<fsblkcnt64_t>, public WithParamInterface<fsblkcnt64_t> {
class FuseStatfsReturnBavailTest: public FuseStatfsReturnTest<uint64_t>, public WithParamInterface<uint64_t> {
private:
void set(struct ::statvfs *stat, fsblkcnt64_t value) override {
void set(struct ::statvfs *stat, uint64_t value) override {
stat->f_bavail = value;
}
};

View File

@ -3,9 +3,9 @@
using ::testing::WithParamInterface;
using ::testing::Values;
class FuseStatfsReturnBfreeTest: public FuseStatfsReturnTest<fsblkcnt64_t>, public WithParamInterface<fsblkcnt64_t> {
class FuseStatfsReturnBfreeTest: public FuseStatfsReturnTest<uint64_t>, public WithParamInterface<uint64_t> {
private:
void set(struct ::statvfs *stat, fsblkcnt64_t value) override {
void set(struct ::statvfs *stat, uint64_t value) override {
stat->f_bfree = value;
}
};

View File

@ -3,9 +3,9 @@
using ::testing::WithParamInterface;
using ::testing::Values;
class FuseStatfsReturnBlocksTest: public FuseStatfsReturnTest<fsblkcnt64_t>, public WithParamInterface<fsblkcnt64_t> {
class FuseStatfsReturnBlocksTest: public FuseStatfsReturnTest<uint64_t>, public WithParamInterface<uint64_t> {
private:
void set(struct ::statvfs *stat, fsblkcnt64_t value) override {
void set(struct ::statvfs *stat, uint64_t value) override {
stat->f_blocks = value;
}
};

View File

@ -3,9 +3,9 @@
using ::testing::WithParamInterface;
using ::testing::Values;
class FuseStatfsReturnFfreeTest: public FuseStatfsReturnTest<fsfilcnt64_t>, public WithParamInterface<fsfilcnt64_t> {
class FuseStatfsReturnFfreeTest: public FuseStatfsReturnTest<uint64_t>, public WithParamInterface<uint64_t> {
private:
void set(struct ::statvfs *stat, fsfilcnt64_t value) override {
void set(struct ::statvfs *stat, uint64_t value) override {
stat->f_ffree = value;
}
};

View File

@ -3,9 +3,9 @@
using ::testing::WithParamInterface;
using ::testing::Values;
class FuseStatfsReturnFilesTest: public FuseStatfsReturnTest<fsfilcnt64_t>, public WithParamInterface<fsfilcnt64_t> {
class FuseStatfsReturnFilesTest: public FuseStatfsReturnTest<uint64_t>, public WithParamInterface<uint64_t> {
private:
void set(struct ::statvfs *stat, fsfilcnt64_t value) override {
void set(struct ::statvfs *stat, uint64_t value) override {
stat->f_files = value;
}
};