Move fspp to its own subdirectories
This commit is contained in:
parent
0fb710ac69
commit
1dcf36d38c
@ -1,112 +0,0 @@
|
||||
=======
|
||||
INCLUDE(messmer/cmake/tools)
|
||||
|
||||
# Actually create targets: EXEcutables and libraries.
|
||||
ADD_BII_TARGETS()
|
||||
|
||||
ADD_BOOST(filesystem system thread chrono)
|
||||
|
||||
ACTIVATE_CPP14()
|
||||
REQUIRE_GCC_VERSION(4.8)
|
||||
|
||||
ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64)
|
||||
|
||||
ENABLE_STYLE_WARNINGS()
|
||||
|
||||
IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
IF(EXISTS "/usr/local/include/osxfuse")
|
||||
TARGET_INCLUDE_DIRECTORIES(${BII_LIB_TARGET} PUBLIC /usr/local/include/osxfuse)
|
||||
TARGET_LINK_LIBRARIES(${BII_BLOCK_TARGET} INTERFACE osxfuse)
|
||||
ELSE()
|
||||
MESSAGE(FATAL_ERROR "Osxfuse not found. Please install osxfuse.")
|
||||
ENDIF(EXISTS "/usr/local/include/osxfuse")
|
||||
ELSE(CMAKE_SYSTEM_NAME)
|
||||
TARGET_LINK_LIBRARIES(${BII_BLOCK_TARGET} INTERFACE fuse)
|
||||
ENDIF(CMAKE_SYSTEM_NAME)
|
||||
|
||||
# You can safely delete lines from here...
|
||||
|
||||
###############################################################################
|
||||
# REFERENCE #
|
||||
###############################################################################
|
||||
#
|
||||
# This CMakeLists.txt file helps defining your block building and compiling
|
||||
# To learn more about the CMake use with biicode, visit http://docs.biicode.com/c++.html
|
||||
#
|
||||
# ----------------------------------------------------
|
||||
# NEW FEATURE! Include cmake files from remote blocks:
|
||||
# -----------------------------------------------------
|
||||
# Now you can handle cmake dependencies alike you do with c/c++:
|
||||
#
|
||||
# INCLUDE(user/block/myrecipe) # include myrecipe.cmake from remote user/block
|
||||
#
|
||||
# > EXAMPLE: Include our recipes and activate C++11 in your block (http://www.biicode.com/biicode/cmake)
|
||||
#
|
||||
# INCLUDE(biicode/cmake/tools) # Include tools.cmake file from "cmake" block from the "biicode" user
|
||||
# ACTIVATE_CPP11(INTERFACE ${BII_BLOCK_TARGET})
|
||||
#
|
||||
# Remember to run "bii find" to download out cmake tools file
|
||||
#
|
||||
# ---------------------
|
||||
# INIT_BIICODE_BLOCK()
|
||||
# ---------------------
|
||||
# This function creates several helper variables as ${BII_BLOCK_NAME} and ${BII_BLOCK_USER}
|
||||
# Also it loads variables from the cmake/bii_user_block_vars.cmake
|
||||
# ${BII_LIB_SRC} File list to create the library
|
||||
# ${BII_LIB_TYPE} Empty (default, STATIC most casess) STATIC or SHARED
|
||||
# ${BII_LIB_DEPS} Dependencies to other libraries (user2_block2, user3_blockX)
|
||||
# ${BII_LIB_SYSTEM_HEADERS} System linking requirements as windows.h, pthread.h, etc
|
||||
#
|
||||
# You can use or modify them here, for example, to add or remove files from targets based on OS
|
||||
# Or use typical cmake configurations done BEFORE defining targets. Examples:
|
||||
# ADD_DEFINITIONS(-DFOO)
|
||||
# FIND_PACKAGE(OpenGL QUIET)
|
||||
# You can add INCLUDE_DIRECTORIES here too
|
||||
#
|
||||
# ---------------------
|
||||
# ADD_BIICODE_TARGETS()
|
||||
# ---------------------
|
||||
#
|
||||
# This function creates the following variables:
|
||||
# ${BII_BLOCK_TARGET} Interface (no files) target for convenient configuration of all
|
||||
# targets in this block, as the rest of targets always depend on it
|
||||
# has name in the form "user_block_interface"
|
||||
# ${BII_LIB_TARGET} Target library name, usually in the form "user_block". May not exist
|
||||
# if BII_LIB_SRC is empty
|
||||
# ${BII_BLOCK_TARGETS} List of all targets defined in this block
|
||||
# ${BII_BLOCK_EXES} List of executables targets defined in this block
|
||||
# ${BII_exe_name_TARGET}: Executable target (e.g. ${BII_main_TARGET}. You can also use
|
||||
# directly the name of the executable target (e.g. user_block_main)
|
||||
#
|
||||
# > EXAMPLE: Add include directories to all targets of this block
|
||||
#
|
||||
# TARGET_INCLUDE_DIRECTORIES(${BII_BLOCK_TARGET} INTERFACE myincludedir)
|
||||
#
|
||||
# You can add private include directories to the Lib (if existing)
|
||||
#
|
||||
# > EXAMPLE: Link with pthread:
|
||||
#
|
||||
# TARGET_LINK_LIBRARIES(${BII_BLOCK_TARGET} INTERFACE pthread)
|
||||
# or link against library:
|
||||
# TARGET_LINK_LIBRARIES(${BII_LIB_TARGET} PUBLIC pthread)
|
||||
# or directly use the library target name:
|
||||
# TARGET_LINK_LIBRARIES(user_block PUBLIC pthread)
|
||||
#
|
||||
# NOTE: This can be also done adding pthread to ${BII_LIB_DEPS}
|
||||
# BEFORE calling ADD_BIICODE_TARGETS()
|
||||
#
|
||||
# > EXAMPLE: how to activate C++11
|
||||
#
|
||||
# IF(APPLE)
|
||||
# TARGET_COMPILE_OPTIONS(${BII_BLOCK_TARGET} INTERFACE "-std=c++11 -stdlib=libc++")
|
||||
# ELSEIF (WIN32 OR UNIX)
|
||||
# TARGET_COMPILE_OPTIONS(${BII_BLOCK_TARGET} INTERFACE "-std=c++11")
|
||||
# ENDIF(APPLE)
|
||||
#
|
||||
# > EXAMPLE: Set properties to target
|
||||
#
|
||||
# SET_TARGET_PROPERTIES(${BII_BLOCK_TARGET} PROPERTIES COMPILE_DEFINITIONS "IOV_MAX=255")
|
||||
#
|
||||
|
||||
|
||||
>>>>>>> fspp_develop
|
@ -2,6 +2,10 @@ cmake_minimum_required(VERSION 3.0)
|
||||
|
||||
include(utils.cmake)
|
||||
|
||||
require_gcc_version(4.8)
|
||||
|
||||
add_subdirectory(vendor)
|
||||
include_directories(vendor)
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(test)
|
||||
|
44
biicode.conf
44
biicode.conf
@ -1,44 +0,0 @@
|
||||
# Biicode configuration file
|
||||
|
||||
[requirements]
|
||||
google/gmock: 4
|
||||
google/gtest: 11
|
||||
messmer/cmake: 3
|
||||
messmer/cpp-utils: 9
|
||||
|
||||
[parent]
|
||||
messmer/fspp: 8
|
||||
[paths]
|
||||
# Local directories to look for headers (within block)
|
||||
# /
|
||||
# include
|
||||
|
||||
[dependencies]
|
||||
# Manual adjust file implicit dependencies, add (+), remove (-), or overwrite (=)
|
||||
# hello.h + hello_imp.cpp hello_imp2.cpp
|
||||
# *.h + *.cpp
|
||||
|
||||
test/main.cpp + test/*.cpp
|
||||
|
||||
[mains]
|
||||
# Manual adjust of files that define an executable
|
||||
# !main.cpp # Do not build executable from this file
|
||||
# main2.cpp # Build it (it doesnt have a main() function, but maybe it includes it)
|
||||
|
||||
[hooks]
|
||||
# These are defined equal to [dependencies],files names matching bii*stage*hook.py
|
||||
# will be launched as python scripts at stage = {post_process, clean}
|
||||
# CMakeLists.txt + bii/my_post_process1_hook.py bii_clean_hook.py
|
||||
|
||||
[includes]
|
||||
# Mapping of include patterns to external blocks
|
||||
# hello*.h: user3/depblock # includes will be processed as user3/depblock/hello*.h
|
||||
|
||||
[data]
|
||||
# Manually define data files dependencies, that will be copied to bin for execution
|
||||
# By default they are copied to bin/user/block/... which should be taken into account
|
||||
# when loading from disk such data
|
||||
# image.cpp + image.jpg # code should write open("user/block/image.jpg")
|
||||
|
||||
[tests]
|
||||
test/*
|
@ -1 +1,4 @@
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
add_subdirectory(cpp-utils)
|
||||
add_subdirectory(fspp)
|
@ -1,5 +1,3 @@
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
project (cpp-utils)
|
||||
|
||||
set(SOURCES
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include "../../macros.h"
|
||||
#include "../../random/Random.h"
|
||||
extern "C" {
|
||||
#include "../../../../vendor/scrypt-1.2.0/lib/crypto/crypto_scrypt.h"
|
||||
#include <scrypt-1.2.0/lib/crypto/crypto_scrypt.h>
|
||||
}
|
||||
#include <stdexcept>
|
||||
#include "DerivedKey.h"
|
||||
|
@ -2,7 +2,7 @@
|
||||
#ifndef MESSMER_CPPUTILS_LOGGING_LOGGER_H
|
||||
#define MESSMER_CPPUTILS_LOGGING_LOGGER_H
|
||||
|
||||
#include "../../../vendor/spdlog/spdlog.h"
|
||||
#include <spdlog/spdlog.h>
|
||||
#include "../macros.h"
|
||||
|
||||
namespace cpputils {
|
||||
|
32
src/fspp/CMakeLists.txt
Normal file
32
src/fspp/CMakeLists.txt
Normal file
@ -0,0 +1,32 @@
|
||||
project (fspp)
|
||||
|
||||
set(SOURCES
|
||||
impl/FilesystemImpl.cpp
|
||||
impl/Profiler.cpp
|
||||
fuse/Fuse.cpp
|
||||
)
|
||||
|
||||
add_library(${PROJECT_NAME} STATIC ${SOURCES})
|
||||
|
||||
# This is needed by boost thread
|
||||
#if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
# target_link_libraries(${PROJECT_NAME} PRIVATE rt)
|
||||
#endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
|
||||
target_compile_definitions(${PROJECT_NAME} PUBLIC _FILE_OFFSET_BITS=64)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE cpp-utils)
|
||||
|
||||
add_boost(${PROJECT_NAME} filesystem system thread chrono)
|
||||
enable_style_warnings(${PROJECT_NAME})
|
||||
activate_cpp14(${PROJECT_NAME})
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
if(EXISTS "/usr/local/include/osxfuse")
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE /usr/local/include/osxfuse)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE osxfuse)
|
||||
else()
|
||||
message(FATAL_ERROR "Osxfuse not found in /usr/local/include/osxfuse. Please install osxfuse.")
|
||||
endif(EXISTS "/usr/local/include/osxfuse")
|
||||
else(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE fuse)
|
||||
endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
@ -3,7 +3,7 @@
|
||||
#define MESSMER_FSPP_FSINTERFACE_DEVICE_H_
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <messmer/cpp-utils/pointer/unique_ref.h>
|
||||
#include <cpp-utils/pointer/unique_ref.h>
|
||||
#include <sys/statvfs.h>
|
||||
|
||||
namespace fspp {
|
@ -3,7 +3,7 @@
|
||||
#define MESSMER_FSPP_FSINTERFACE_DIR_H_
|
||||
|
||||
#include "Node.h"
|
||||
#include <messmer/cpp-utils/pointer/unique_ref.h>
|
||||
#include <cpp-utils/pointer/unique_ref.h>
|
||||
#include <string>
|
||||
|
||||
namespace fspp {
|
@ -3,7 +3,7 @@
|
||||
#define MESSMER_FSPP_FSINTERFACE_FILE_H_
|
||||
|
||||
#include "Node.h"
|
||||
#include <messmer/cpp-utils/pointer/unique_ref.h>
|
||||
#include <cpp-utils/pointer/unique_ref.h>
|
||||
|
||||
namespace fspp {
|
||||
class Device;
|
@ -3,7 +3,7 @@
|
||||
#define MESSMER_FSPP_FSINTERFACE_SYMLINK_H_
|
||||
|
||||
#include "Node.h"
|
||||
#include <messmer/cpp-utils/pointer/unique_ref.h>
|
||||
#include <cpp-utils/pointer/unique_ref.h>
|
||||
#include <string>
|
||||
|
||||
namespace fspp {
|
@ -2,11 +2,11 @@
|
||||
#ifndef MESSMER_FSPP_FSTEST_TESTUTILS_FILESYSTEMTEST_H_
|
||||
#define MESSMER_FSPP_FSTEST_TESTUTILS_FILESYSTEMTEST_H_
|
||||
|
||||
#include <google/gtest/gtest.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <type_traits>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <messmer/cpp-utils/pointer/unique_ref.h>
|
||||
#include <messmer/cpp-utils/pointer/unique_ref_boost_optional_gtest_workaround.h>
|
||||
#include <cpp-utils/pointer/unique_ref.h>
|
||||
#include <cpp-utils/pointer/unique_ref_boost_optional_gtest_workaround.h>
|
||||
|
||||
#include "../../fs_interface/Device.h"
|
||||
#include "../../fs_interface/Dir.h"
|
@ -3,8 +3,8 @@
|
||||
#define MESSMER_FSPP_FSTEST_TESTUTILS_FILETEST_H_
|
||||
|
||||
#include "FileSystemTest.h"
|
||||
#include <messmer/cpp-utils/data/Data.h>
|
||||
#include <messmer/cpp-utils/pointer/unique_ref.h>
|
||||
#include <cpp-utils/data/Data.h>
|
||||
#include <cpp-utils/pointer/unique_ref.h>
|
||||
|
||||
template<class ConcreteFileSystemTestFixture>
|
||||
class FileTest: public FileSystemTest<ConcreteFileSystemTestFixture> {
|
@ -3,7 +3,7 @@
|
||||
#define MESSMER_FSPP_FUSE_FILESYSTEM_H_
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <messmer/cpp-utils/pointer/unique_ref.h>
|
||||
#include <cpp-utils/pointer/unique_ref.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/statvfs.h>
|
||||
#include "../fs_interface/Dir.h"
|
@ -5,8 +5,8 @@
|
||||
#include "FuseErrnoException.h"
|
||||
#include "Filesystem.h"
|
||||
#include <iostream>
|
||||
#include <messmer/cpp-utils/assert/assert.h>
|
||||
#include <messmer/cpp-utils/logging/logging.h>
|
||||
#include <cpp-utils/assert/assert.h>
|
||||
#include <cpp-utils/logging/logging.h>
|
||||
#include <csignal>
|
||||
|
||||
using std::vector;
|
@ -8,7 +8,7 @@
|
||||
#include <vector>
|
||||
#include <sys/stat.h>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include "messmer/cpp-utils/macros.h"
|
||||
#include <cpp-utils/macros.h>
|
||||
|
||||
namespace fspp {
|
||||
class Device;
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include <stdexcept>
|
||||
#include <errno.h>
|
||||
#include <messmer/cpp-utils/assert/assert.h>
|
||||
#include <cpp-utils/assert/assert.h>
|
||||
|
||||
namespace fspp {
|
||||
namespace fuse{
|
@ -8,8 +8,8 @@
|
||||
#include "../fuse/FuseErrnoException.h"
|
||||
#include "../fs_interface/File.h"
|
||||
|
||||
#include <messmer/cpp-utils/logging/logging.h>
|
||||
#include <messmer/cpp-utils/pointer/unique_ref.h>
|
||||
#include <cpp-utils/logging/logging.h>
|
||||
#include <cpp-utils/pointer/unique_ref.h>
|
||||
#include <sstream>
|
||||
|
||||
using namespace fspp;
|
@ -5,7 +5,7 @@
|
||||
#include "FuseOpenFileList.h"
|
||||
#include "../fuse/Filesystem.h"
|
||||
|
||||
#include <messmer/cpp-utils/pointer/unique_ref.h>
|
||||
#include <cpp-utils/pointer/unique_ref.h>
|
||||
#include <atomic>
|
||||
|
||||
//Remove this line if you don't want profiling
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include "../fs_interface/File.h"
|
||||
#include "../fs_interface/OpenFile.h"
|
||||
#include "messmer/cpp-utils/macros.h"
|
||||
#include <cpp-utils/macros.h>
|
||||
#include "IdList.h"
|
||||
|
||||
namespace fspp {
|
@ -5,7 +5,7 @@
|
||||
#include <map>
|
||||
#include <mutex>
|
||||
#include <stdexcept>
|
||||
#include <messmer/cpp-utils/pointer/unique_ref.h>
|
||||
#include <cpp-utils/pointer/unique_ref.h>
|
||||
|
||||
namespace fspp {
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include <atomic>
|
||||
#include <chrono>
|
||||
#include <messmer/cpp-utils/macros.h>
|
||||
#include <cpp-utils/macros.h>
|
||||
|
||||
namespace fspp {
|
||||
class Profiler final {
|
@ -2,4 +2,7 @@ enable_testing()
|
||||
include_directories(SYSTEM ${gtest_INCLUDE_DIRS}/include SYSTEM ${gmock_INCLUDE_DIRS}/include)
|
||||
link_libraries(gtest gmock gmock_main)
|
||||
|
||||
include_directories(../src)
|
||||
|
||||
add_subdirectory(cpp-utils)
|
||||
add_subdirectory(fspp)
|
@ -1,3 +1,3 @@
|
||||
#include "../../src/cpp-utils/either.h"
|
||||
#include "cpp-utils/either.h"
|
||||
|
||||
//Test that either can be included without needing additional dependencies
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <gmock/gmock.h>
|
||||
#include <boost/optional/optional_io.hpp>
|
||||
#include "../../src/cpp-utils/either.h"
|
||||
#include "../../src/cpp-utils/macros.h"
|
||||
#include "cpp-utils/either.h"
|
||||
#include "cpp-utils/macros.h"
|
||||
#include <sstream>
|
||||
|
||||
//TODO Go through all test cases and think about whether it makes sense to add the same test case but with primitive types.
|
||||
|
@ -1,3 +1,3 @@
|
||||
#include "../../src/cpp-utils/macros.h"
|
||||
#include "cpp-utils/macros.h"
|
||||
|
||||
// Test that macros.h can be included without needing additional dependencies
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
//Include the ASSERT macro for a debug build
|
||||
#undef NDEBUG
|
||||
#include "../../../src/cpp-utils/assert/assert.h"
|
||||
#include "cpp-utils/assert/assert.h"
|
||||
|
||||
using testing::MatchesRegex;
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
#include "../../../src/cpp-utils/assert/assert.h"
|
||||
#include "cpp-utils/assert/assert.h"
|
||||
|
||||
// Test the header can be included without needing additional dependencies
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
//Include the ASSERT macro for a release build
|
||||
#define NDEBUG
|
||||
#include "../../../src/cpp-utils/assert/assert.h"
|
||||
#include "cpp-utils/assert/assert.h"
|
||||
|
||||
using testing::MatchesRegex;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "../../../src/cpp-utils/assert/backtrace.h"
|
||||
#include "cpp-utils/assert/backtrace.h"
|
||||
|
||||
// Test the header can be included without needing additional dependencies
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "../../../../src/cpp-utils/crypto/kdf/DerivedKeyConfig.h"
|
||||
#include "../../../../src/cpp-utils/data/DataFixture.h"
|
||||
#include "cpp-utils/crypto/kdf/DerivedKeyConfig.h"
|
||||
#include "cpp-utils/data/DataFixture.h"
|
||||
#include <sstream>
|
||||
|
||||
using namespace cpputils;
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "../../../../src/cpp-utils/crypto/kdf/DerivedKey.h"
|
||||
#include "../../../../src/cpp-utils/data/DataFixture.h"
|
||||
#include "cpp-utils/crypto/kdf/DerivedKey.h"
|
||||
#include "cpp-utils/data/DataFixture.h"
|
||||
|
||||
using namespace cpputils;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "../../../../src/cpp-utils/crypto/kdf/Scrypt.h"
|
||||
#include "cpp-utils/crypto/kdf/Scrypt.h"
|
||||
|
||||
using namespace cpputils;
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "../../../../src/cpp-utils/crypto/symmetric/Cipher.h"
|
||||
#include "../../../../src/cpp-utils/crypto/symmetric/ciphers.h"
|
||||
#include "cpp-utils/crypto/symmetric/Cipher.h"
|
||||
#include "cpp-utils/crypto/symmetric/ciphers.h"
|
||||
#include "testutils/FakeAuthenticatedCipher.h"
|
||||
|
||||
#include "../../../../src/cpp-utils/data/DataFixture.h"
|
||||
#include "../../../../src/cpp-utils/data/Data.h"
|
||||
#include "cpp-utils/data/DataFixture.h"
|
||||
#include "cpp-utils/data/Data.h"
|
||||
#include <boost/optional/optional_io.hpp>
|
||||
|
||||
using namespace cpputils;
|
||||
|
@ -2,10 +2,10 @@
|
||||
#ifndef MESSMER_CPPUTILS_TEST_CRYPTO_SYMMETRIC_TESTUTILS_FAKEAUTHENTICATEDCIPHER_H_
|
||||
#define MESSMER_CPPUTILS_TEST_CRYPTO_SYMMETRIC_TESTUTILS_FAKEAUTHENTICATEDCIPHER_H_
|
||||
|
||||
#include "../../../../../src/cpp-utils/crypto/symmetric/Cipher.h"
|
||||
#include "../../../../../src/cpp-utils/data/FixedSizeData.h"
|
||||
#include "../../../../../src/cpp-utils/data/Data.h"
|
||||
#include "../../../../../src/cpp-utils/random/RandomGenerator.h"
|
||||
#include "cpp-utils/crypto/symmetric/Cipher.h"
|
||||
#include "cpp-utils/data/FixedSizeData.h"
|
||||
#include "cpp-utils/data/Data.h"
|
||||
#include "cpp-utils/random/RandomGenerator.h"
|
||||
|
||||
namespace cpputils {
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
#include "../../../src/cpp-utils/data/DataFixture.h"
|
||||
#include "cpp-utils/data/DataFixture.h"
|
||||
|
||||
// Test the header can be included without needing additional dependencies
|
@ -1,7 +1,7 @@
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "../../../src/cpp-utils/data/Data.h"
|
||||
#include "../../../src/cpp-utils/data/DataFixture.h"
|
||||
#include "cpp-utils/data/Data.h"
|
||||
#include "cpp-utils/data/DataFixture.h"
|
||||
|
||||
using ::testing::Test;
|
||||
using ::testing::WithParamInterface;
|
||||
|
@ -1,3 +1,3 @@
|
||||
#include "../../../src/cpp-utils/data/Data.h"
|
||||
#include "cpp-utils/data/Data.h"
|
||||
|
||||
// Test the header can be included without needing additional dependencies
|
@ -1,8 +1,8 @@
|
||||
#include "../../../src/cpp-utils/data/DataFixture.h"
|
||||
#include "../../../src/cpp-utils/data/Data.h"
|
||||
#include "cpp-utils/data/DataFixture.h"
|
||||
#include "cpp-utils/data/Data.h"
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "../../../src/cpp-utils/tempfile/TempFile.h"
|
||||
#include "cpp-utils/tempfile/TempFile.h"
|
||||
|
||||
#include <fstream>
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
#include "../../../src/cpp-utils/data/FixedSizeData.h"
|
||||
#include "cpp-utils/data/FixedSizeData.h"
|
||||
|
||||
// Test the header can be included without needing additional dependencies
|
@ -1,6 +1,6 @@
|
||||
#include "../../../src/cpp-utils/data/DataFixture.h"
|
||||
#include "../../../src/cpp-utils/data/FixedSizeData.h"
|
||||
#include "../../../src/cpp-utils/data/Data.h"
|
||||
#include "cpp-utils/data/DataFixture.h"
|
||||
#include "cpp-utils/data/FixedSizeData.h"
|
||||
#include "cpp-utils/data/Data.h"
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
#include "../../../src/cpp-utils/io/Console.h"
|
||||
#include "cpp-utils/io/Console.h"
|
||||
|
||||
// Test the header can be included without needing additional dependencies
|
||||
|
@ -4,11 +4,11 @@
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "../../../src/cpp-utils/io/Console.h"
|
||||
#include "cpp-utils/io/Console.h"
|
||||
|
||||
#include <future>
|
||||
#include <thread>
|
||||
#include "../../../src/cpp-utils/io/pipestream.h"
|
||||
#include "cpp-utils/io/pipestream.h"
|
||||
|
||||
class ConsoleThread {
|
||||
public:
|
||||
|
@ -1,3 +1,3 @@
|
||||
#include "../../../src/cpp-utils/lock/ConditionBarrier.h"
|
||||
#include "cpp-utils/lock/ConditionBarrier.h"
|
||||
|
||||
// Test the header can be included without needing additional dependencies
|
||||
|
@ -1,3 +1,3 @@
|
||||
#include "../../../src/cpp-utils/lock/LockPool.h"
|
||||
#include "cpp-utils/lock/LockPool.h"
|
||||
|
||||
// Test the header can be included without needing additional dependencies
|
||||
|
@ -1,3 +1,3 @@
|
||||
#include "../../../src/cpp-utils/lock/MutexPoolLock.h"
|
||||
#include "cpp-utils/lock/MutexPoolLock.h"
|
||||
|
||||
// Test the header can be included without needing additional dependencies
|
||||
|
@ -1,3 +1,3 @@
|
||||
#include "../../../src/cpp-utils/logging/Logger.h"
|
||||
#include "cpp-utils/logging/Logger.h"
|
||||
|
||||
// Test the header can be included without needing additional dependencies
|
||||
|
@ -1,3 +1,3 @@
|
||||
#include "../../../src/cpp-utils/logging/logging.h"
|
||||
#include "cpp-utils/logging/logging.h"
|
||||
|
||||
// Test the header can be included without needing additional dependencies
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <gmock/gmock.h>
|
||||
#include "../../../../src/cpp-utils/logging/logging.h"
|
||||
#include "cpp-utils/logging/logging.h"
|
||||
|
||||
class MockLogger final {
|
||||
public:
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <gmock/gmock.h>
|
||||
#include "../../../src/cpp-utils/network/CurlHttpClient.h"
|
||||
#include "../../../src/cpp-utils/pointer/unique_ref_boost_optional_gtest_workaround.h"
|
||||
#include "cpp-utils/network/CurlHttpClient.h"
|
||||
#include "cpp-utils/pointer/unique_ref_boost_optional_gtest_workaround.h"
|
||||
|
||||
using std::string;
|
||||
using boost::none;
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "../../../src/cpp-utils/network/FakeHttpClient.h"
|
||||
#include "../../../src/cpp-utils/pointer/unique_ref_boost_optional_gtest_workaround.h"
|
||||
#include "cpp-utils/network/FakeHttpClient.h"
|
||||
#include "cpp-utils/pointer/unique_ref_boost_optional_gtest_workaround.h"
|
||||
|
||||
using boost::none;
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
#include "../../../src/cpp-utils/pointer/cast.h"
|
||||
#include "cpp-utils/pointer/cast.h"
|
||||
|
||||
// Test the header can be included without needing additional dependencies
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <gmock/gmock.h>
|
||||
#include "../../../src/cpp-utils/pointer/cast.h"
|
||||
#include "../../../src/cpp-utils/pointer/unique_ref.h"
|
||||
#include "../../../src/cpp-utils/pointer/unique_ref_boost_optional_gtest_workaround.h"
|
||||
#include "cpp-utils/pointer/cast.h"
|
||||
#include "cpp-utils/pointer/unique_ref.h"
|
||||
#include "cpp-utils/pointer/unique_ref_boost_optional_gtest_workaround.h"
|
||||
|
||||
//TODO There is a lot of duplication here, because each test case is there twice - once for unique_ptr, once for unique_ref. Remove redundancy by using generic test cases.
|
||||
//TODO Then also move the unique_ref related test cases there - cast_test.cpp should only contain the unique_ptr related ones.
|
||||
|
@ -1,3 +1,3 @@
|
||||
#include "../../../src/cpp-utils/pointer/optional_ownership_ptr.h"
|
||||
#include "cpp-utils/pointer/optional_ownership_ptr.h"
|
||||
|
||||
// Test the header can be included without needing additional dependencies
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "../../../src/cpp-utils/pointer/optional_ownership_ptr.h"
|
||||
#include "../../../src/cpp-utils/macros.h"
|
||||
#include "cpp-utils/pointer/optional_ownership_ptr.h"
|
||||
#include "cpp-utils/macros.h"
|
||||
|
||||
using std::unique_ptr;
|
||||
using std::function;
|
||||
|
@ -1,3 +1,3 @@
|
||||
#include "../../../src/cpp-utils/pointer/unique_ref_boost_optional_gtest_workaround.h"
|
||||
#include "cpp-utils/pointer/unique_ref_boost_optional_gtest_workaround.h"
|
||||
|
||||
// Test the header can be included without needing additional dependencies
|
||||
|
@ -1,3 +1,3 @@
|
||||
#include "../../../src/cpp-utils/pointer/unique_ref.h"
|
||||
#include "cpp-utils/pointer/unique_ref.h"
|
||||
|
||||
// Test the header can be included without needing additional dependencies
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "../../../src/cpp-utils/pointer/unique_ref.h"
|
||||
#include "cpp-utils/pointer/unique_ref.h"
|
||||
#include <vector>
|
||||
#include <set>
|
||||
#include <map>
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "../../../src/cpp-utils/process/daemonize.h"
|
||||
#include "cpp-utils/process/daemonize.h"
|
||||
|
||||
// Test the header can be included without needing additional dependencies
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "../../../src/cpp-utils/process/subprocess.h"
|
||||
#include "cpp-utils/process/subprocess.h"
|
||||
|
||||
// Test the header can be included without needing additional dependencies
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
#include "../../../src/cpp-utils/random/Random.h"
|
||||
#include "cpp-utils/random/Random.h"
|
||||
|
||||
// Test the header can be included without needing additional dependencies
|
||||
|
@ -1,3 +1,3 @@
|
||||
#include "../../../src/cpp-utils/tempfile/TempDir.h"
|
||||
#include "cpp-utils/tempfile/TempDir.h"
|
||||
|
||||
// Test the header can be included without needing additional dependencies
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "../../../src/cpp-utils/tempfile/TempDir.h"
|
||||
#include "cpp-utils/tempfile/TempDir.h"
|
||||
|
||||
#include <fstream>
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
#include "../../../src/cpp-utils/tempfile/TempFile.h"
|
||||
#include "cpp-utils/tempfile/TempFile.h"
|
||||
|
||||
// Test the header can be included without needing additional dependencies
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "../../../src/cpp-utils/tempfile/TempFile.h"
|
||||
#include "../../../src/cpp-utils/tempfile/TempDir.h"
|
||||
#include "cpp-utils/tempfile/TempFile.h"
|
||||
#include "cpp-utils/tempfile/TempDir.h"
|
||||
|
||||
#include <fstream>
|
||||
|
||||
|
110
test/fspp/CMakeLists.txt
Normal file
110
test/fspp/CMakeLists.txt
Normal file
@ -0,0 +1,110 @@
|
||||
project (fspp-test)
|
||||
|
||||
set(SOURCES
|
||||
testutils/FuseTest.cpp
|
||||
testutils/FuseThread.cpp
|
||||
testutils/InMemoryFile.cpp
|
||||
impl/FuseOpenFileListTest.cpp
|
||||
impl/IdListTest.cpp
|
||||
fuse/lstat/FuseLstatReturnUidTest.cpp
|
||||
fuse/lstat/testutils/FuseLstatTest.cpp
|
||||
fuse/lstat/FuseLstatReturnCtimeTest.cpp
|
||||
fuse/lstat/FuseLstatReturnGidTest.cpp
|
||||
fuse/lstat/FuseLstatPathParameterTest.cpp
|
||||
fuse/lstat/FuseLstatReturnNlinkTest.cpp
|
||||
fuse/lstat/FuseLstatReturnModeTest.cpp
|
||||
fuse/lstat/FuseLstatReturnAtimeTest.cpp
|
||||
fuse/lstat/FuseLstatErrorTest.cpp
|
||||
fuse/lstat/FuseLstatReturnMtimeTest.cpp
|
||||
fuse/lstat/FuseLstatReturnSizeTest.cpp
|
||||
fuse/read/FuseReadFileDescriptorTest.cpp
|
||||
fuse/read/testutils/FuseReadTest.cpp
|
||||
fuse/read/FuseReadOverflowTest.cpp
|
||||
fuse/read/FuseReadErrorTest.cpp
|
||||
fuse/read/FuseReadReturnedDataTest.cpp
|
||||
fuse/flush/testutils/FuseFlushTest.cpp
|
||||
fuse/flush/FuseFlushErrorTest.cpp
|
||||
fuse/flush/FuseFlushFileDescriptorTest.cpp
|
||||
fuse/rename/testutils/FuseRenameTest.cpp
|
||||
fuse/rename/FuseRenameErrorTest.cpp
|
||||
fuse/rename/FuseRenameFilenameTest.cpp
|
||||
fuse/utimens/testutils/FuseUtimensTest.cpp
|
||||
fuse/utimens/FuseUtimensErrorTest.cpp
|
||||
fuse/utimens/FuseUtimensFilenameTest.cpp
|
||||
fuse/utimens/FuseUtimensTimeParameterTest.cpp
|
||||
fuse/unlink/testutils/FuseUnlinkTest.cpp
|
||||
fuse/unlink/FuseUnlinkErrorTest.cpp
|
||||
fuse/unlink/FuseUnlinkFilenameTest.cpp
|
||||
fuse/ftruncate/testutils/FuseFTruncateTest.cpp
|
||||
fuse/ftruncate/FuseFTruncateFileDescriptorTest.cpp
|
||||
fuse/ftruncate/FuseFTruncateSizeTest.cpp
|
||||
fuse/ftruncate/FuseFTruncateErrorTest.cpp
|
||||
fuse/fstat/testutils/FuseFstatTest.cpp
|
||||
fuse/fstat/FuseFstatParameterTest.cpp
|
||||
fuse/fstat/FuseFstatErrorTest.cpp
|
||||
fuse/truncate/FuseTruncateSizeTest.cpp
|
||||
fuse/truncate/testutils/FuseTruncateTest.cpp
|
||||
fuse/truncate/FuseTruncateErrorTest.cpp
|
||||
fuse/truncate/FuseTruncateFilenameTest.cpp
|
||||
fuse/statfs/FuseStatfsReturnFilesTest.cpp
|
||||
fuse/statfs/FuseStatfsReturnFfreeTest.cpp
|
||||
fuse/statfs/FuseStatfsReturnNamemaxTest.cpp
|
||||
fuse/statfs/testutils/FuseStatfsTest.cpp
|
||||
fuse/statfs/FuseStatfsReturnBsizeTest.cpp
|
||||
fuse/statfs/FuseStatfsErrorTest.cpp
|
||||
fuse/statfs/FuseStatfsReturnBfreeTest.cpp
|
||||
fuse/statfs/FuseStatfsPathParameterTest.cpp
|
||||
fuse/statfs/FuseStatfsReturnBlocksTest.cpp
|
||||
fuse/statfs/FuseStatfsReturnBavailTest.cpp
|
||||
fuse/closeFile/FuseCloseTest.cpp
|
||||
fuse/fsync/testutils/FuseFsyncTest.cpp
|
||||
fuse/fsync/FuseFsyncFileDescriptorTest.cpp
|
||||
fuse/fsync/FuseFsyncErrorTest.cpp
|
||||
fuse/openFile/testutils/FuseOpenTest.cpp
|
||||
fuse/openFile/FuseOpenFilenameTest.cpp
|
||||
fuse/openFile/FuseOpenFlagsTest.cpp
|
||||
fuse/openFile/FuseOpenFileDescriptorTest.cpp
|
||||
fuse/openFile/FuseOpenErrorTest.cpp
|
||||
fuse/access/FuseAccessFilenameTest.cpp
|
||||
fuse/access/testutils/FuseAccessTest.cpp
|
||||
fuse/access/FuseAccessModeTest.cpp
|
||||
fuse/access/FuseAccessErrorTest.cpp
|
||||
fuse/BasicFuseTest.cpp
|
||||
fuse/rmdir/testutils/FuseRmdirTest.cpp
|
||||
fuse/rmdir/FuseRmdirErrorTest.cpp
|
||||
fuse/rmdir/FuseRmdirDirnameTest.cpp
|
||||
fuse/fdatasync/testutils/FuseFdatasyncTest.cpp
|
||||
fuse/fdatasync/FuseFdatasyncErrorTest.cpp
|
||||
fuse/fdatasync/FuseFdatasyncFileDescriptorTest.cpp
|
||||
fuse/mkdir/testutils/FuseMkdirTest.cpp
|
||||
fuse/mkdir/FuseMkdirErrorTest.cpp
|
||||
fuse/mkdir/FuseMkdirModeTest.cpp
|
||||
fuse/mkdir/FuseMkdirDirnameTest.cpp
|
||||
fuse/write/FuseWriteErrorTest.cpp
|
||||
fuse/write/testutils/FuseWriteTest.cpp
|
||||
fuse/write/FuseWriteOverflowTest.cpp
|
||||
fuse/write/FuseWriteFileDescriptorTest.cpp
|
||||
fuse/write/FuseWriteDataTest.cpp
|
||||
fuse/readDir/testutils/FuseReadDirTest.cpp
|
||||
fuse/readDir/FuseReadDirDirnameTest.cpp
|
||||
fuse/readDir/FuseReadDirErrorTest.cpp
|
||||
fuse/readDir/FuseReadDirReturnTest.cpp
|
||||
fuse/createAndOpenFile/FuseCreateAndOpenFilenameTest.cpp
|
||||
fuse/createAndOpenFile/testutils/FuseCreateAndOpenTest.cpp
|
||||
fuse/createAndOpenFile/FuseCreateAndOpenFlagsTest.cpp
|
||||
fuse/createAndOpenFile/FuseCreateAndOpenFileDescriptorTest.cpp
|
||||
fuse/createAndOpenFile/FuseCreateAndOpenErrorTest.cpp
|
||||
fuse/FilesystemTest.cpp
|
||||
fs_interface/NodeTest.cpp
|
||||
fs_interface/FileTest.cpp
|
||||
fs_interface/DirTest.cpp
|
||||
fs_interface/DeviceTest.cpp
|
||||
fs_interface/OpenFileTest.cpp
|
||||
)
|
||||
|
||||
add_executable(${PROJECT_NAME} ${SOURCES})
|
||||
target_link_libraries(${PROJECT_NAME} fspp)
|
||||
add_test(${PROJECT_NAME} ${PROJECT_NAME})
|
||||
|
||||
enable_style_warnings(${PROJECT_NAME})
|
||||
activate_cpp14(${PROJECT_NAME})
|
@ -1,4 +1,4 @@
|
||||
/*
|
||||
* Tests that the header can be included without needing additional header includes as dependencies.
|
||||
*/
|
||||
#include "../../fs_interface/Device.h"
|
||||
#include "fspp/fs_interface/Device.h"
|
@ -1,4 +1,4 @@
|
||||
/*
|
||||
* Tests that the header can be included without needing additional header includes as dependencies.
|
||||
*/
|
||||
#include "../../fs_interface/Dir.h"
|
||||
#include "fspp/fs_interface/Dir.h"
|
@ -1,4 +1,4 @@
|
||||
/*
|
||||
* Tests that the header can be included without needing additional header includes as dependencies.
|
||||
*/
|
||||
#include "../../fs_interface/File.h"
|
||||
#include "fspp/fs_interface/File.h"
|
@ -1,4 +1,4 @@
|
||||
/*
|
||||
* Tests that the header can be included without needing additional header includes as dependencies.
|
||||
*/
|
||||
#include "../../fs_interface/Node.h"
|
||||
#include "fspp/fs_interface/Node.h"
|
@ -1,4 +1,4 @@
|
||||
/*
|
||||
* Tests that the header can be included without needing additional header includes as dependencies.
|
||||
*/
|
||||
#include "../../fs_interface/OpenFile.h"
|
||||
#include "fspp/fs_interface/OpenFile.h"
|
@ -1,4 +1,4 @@
|
||||
/*
|
||||
* Tests that the header can be included without needing additional header includes as dependencies.
|
||||
*/
|
||||
#include "../../fuse/Filesystem.h"
|
||||
#include "fspp/fuse/Filesystem.h"
|
@ -1,6 +1,6 @@
|
||||
#include "testutils/FuseAccessTest.h"
|
||||
|
||||
#include "../../../fuse/FuseErrnoException.h"
|
||||
#include "fspp/fuse/FuseErrnoException.h"
|
||||
|
||||
using ::testing::_;
|
||||
using ::testing::StrEq;
|
@ -1,6 +1,6 @@
|
||||
#include "testutils/FuseCreateAndOpenTest.h"
|
||||
|
||||
#include "../../../fuse/FuseErrnoException.h"
|
||||
#include "fspp/fuse/FuseErrnoException.h"
|
||||
|
||||
using ::testing::WithParamInterface;
|
||||
using ::testing::Values;
|
@ -1,6 +1,6 @@
|
||||
#include "testutils/FuseFdatasyncTest.h"
|
||||
|
||||
#include "../../../fuse/FuseErrnoException.h"
|
||||
#include "fspp/fuse/FuseErrnoException.h"
|
||||
|
||||
using ::testing::_;
|
||||
using ::testing::StrEq;
|
@ -1,6 +1,6 @@
|
||||
#include "testutils/FuseFdatasyncTest.h"
|
||||
|
||||
#include "../../../fuse/FuseErrnoException.h"
|
||||
#include "fspp/fuse/FuseErrnoException.h"
|
||||
|
||||
using ::testing::_;
|
||||
using ::testing::StrEq;
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user