From 4eef481d202f68ed142bebd1b9e24981ca1da2b3 Mon Sep 17 00:00:00 2001 From: Carlos Segarra Date: Fri, 20 Nov 2020 15:54:03 +0000 Subject: [PATCH] Clang format newline (#29) * using same clang format binary than faasm * applied new clang-format to all codebase * adding newline at the end of the bash script --- bin/run_clang_format.sh | 18 +++++++++++++++++- faabric.cpp | 2 +- include/faabric/executor/FaabricExecutor.h | 2 +- include/faabric/executor/FaabricMain.h | 2 +- include/faabric/proto/RPCServer.h | 2 +- include/faabric/proto/macros.h | 2 +- include/faabric/scheduler/ExecGraph.h | 2 +- include/faabric/scheduler/FunctionCallClient.h | 2 +- include/faabric/scheduler/FunctionCallServer.h | 2 +- .../faabric/scheduler/InMemoryMessageQueue.h | 2 +- include/faabric/scheduler/MpiContext.h | 2 +- include/faabric/scheduler/Scheduler.h | 2 +- include/faabric/state/DummyStateServer.h | 2 +- include/faabric/state/InMemoryStateRegistry.h | 2 +- include/faabric/state/State.h | 2 +- include/faabric/state/StateClient.h | 2 +- include/faabric/state/StateKeyValue.h | 2 +- include/faabric/state/StateServer.h | 2 +- include/faabric/util/barrier.h | 2 +- include/faabric/util/bytes.h | 2 +- include/faabric/util/chaining.h | 2 +- include/faabric/util/clock.h | 2 +- include/faabric/util/config.h | 2 +- include/faabric/util/environment.h | 2 +- include/faabric/util/exception.h | 2 +- include/faabric/util/files.h | 2 +- include/faabric/util/gids.h | 2 +- include/faabric/util/json.h | 2 +- include/faabric/util/locks.h | 2 +- include/faabric/util/logging.h | 2 +- include/faabric/util/memory.h | 2 +- include/faabric/util/network.h | 2 +- include/faabric/util/queue.h | 2 +- include/faabric/util/random.h | 2 +- include/faabric/wasm/wasm.h | 2 +- src/executor/FaabricExecutor.cpp | 2 +- src/proto/RPCServer.cpp | 2 +- src/scheduler/FunctionCallClient.cpp | 2 +- src/scheduler/FunctionCallServer.cpp | 2 +- src/scheduler/MpiContext.cpp | 2 +- src/scheduler/MpiWorldRegistry.cpp | 2 +- src/scheduler/Scheduler.cpp | 2 +- src/state/DummyStateServer.cpp | 2 +- src/state/RedisStateKeyValue.cpp | 2 +- src/state/StateClient.cpp | 2 +- src/state/StateKeyValue.cpp | 2 +- src/util/barrier.cpp | 2 +- src/util/environment.cpp | 2 +- src/util/gids.cpp | 2 +- src/util/logging.cpp | 2 +- src/util/random.cpp | 2 +- src/util/timing.cpp | 2 +- tests/test/endpoint/test_handler.cpp | 2 +- tests/test/main.cpp | 2 +- tests/test/proto/test_proto.cpp | 2 +- tests/test/redis/test_redis.cpp | 2 +- .../scheduler/test_function_client_server.cpp | 2 +- tests/test/scheduler/test_mpi_context.cpp | 2 +- tests/test/state/test_redis_state.cpp | 2 +- tests/test/state/test_state.cpp | 2 +- tests/test/state/test_state_server.cpp | 2 +- tests/test/util/test_barrier.cpp | 2 +- tests/test/util/test_bytes.cpp | 2 +- tests/test/util/test_environment.cpp | 2 +- tests/test/util/test_func.cpp | 2 +- tests/test/util/test_gids.cpp | 2 +- tests/test/util/test_memory.cpp | 2 +- tests/test/util/test_queue.cpp | 2 +- tests/test/util/test_state.cpp | 2 +- tests/test/util/test_strings.cpp | 2 +- tests/test/util/test_tokens.cpp | 2 +- tests/utils/faabric_utils.h | 2 +- tests/utils/system_utils.cpp | 2 +- 73 files changed, 89 insertions(+), 73 deletions(-) diff --git a/bin/run_clang_format.sh b/bin/run_clang_format.sh index 81b840d05..53988dcde 100755 --- a/bin/run_clang_format.sh +++ b/bin/run_clang_format.sh @@ -2,6 +2,14 @@ set -e +function append_newline { + if [[ -z "$(tail -c 1 "$1")" ]]; then + : + else + echo >> "$1" + fi +} + if [ -z "$1" ]; then TARGET_DIR="." else @@ -11,7 +19,15 @@ fi pushd ${TARGET_DIR} >> /dev/null # Find all source files using Git to automatically respect .gitignore -clang-format-10 -i $(git ls-files "*.h" "*.cpp" "*.c") +FILES=$(git ls-files "*.h" "*.cpp" "*.c") + +# Run clang-format +clang-format-10 -i ${FILES} + +# Check newlines +for f in ${FILES}; do + append_newline $f +done popd >> /dev/null diff --git a/faabric.cpp b/faabric.cpp index cd1572b7c..365185977 100644 --- a/faabric.cpp +++ b/faabric.cpp @@ -1 +1 @@ -// Stub to link together top-level CMake library \ No newline at end of file +// Stub to link together top-level CMake library diff --git a/include/faabric/executor/FaabricExecutor.h b/include/faabric/executor/FaabricExecutor.h index 6be03402f..aeddea75e 100644 --- a/include/faabric/executor/FaabricExecutor.h +++ b/include/faabric/executor/FaabricExecutor.h @@ -59,4 +59,4 @@ class FaabricExecutor bool success, const std::string& errorMsg); }; -} \ No newline at end of file +} diff --git a/include/faabric/executor/FaabricMain.h b/include/faabric/executor/FaabricMain.h index 3e382c4ba..e12a23167 100644 --- a/include/faabric/executor/FaabricMain.h +++ b/include/faabric/executor/FaabricMain.h @@ -21,4 +21,4 @@ class FaabricMain faabric::executor::FaabricPool& pool; }; -} \ No newline at end of file +} diff --git a/include/faabric/proto/RPCServer.h b/include/faabric/proto/RPCServer.h index 37adbd72c..c119e8f03 100644 --- a/include/faabric/proto/RPCServer.h +++ b/include/faabric/proto/RPCServer.h @@ -28,4 +28,4 @@ class RPCServer virtual void doStart(const std::string& serverAddr) = 0; }; -} \ No newline at end of file +} diff --git a/include/faabric/proto/macros.h b/include/faabric/proto/macros.h index 94b45d961..d179ed9d0 100644 --- a/include/faabric/proto/macros.h +++ b/include/faabric/proto/macros.h @@ -12,4 +12,4 @@ #define DEFAULT_RPC_HOST "0.0.0.0" #define STATE_PORT 8003 #define FUNCTION_CALL_PORT 8004 -#define MPI_MESSAGE_PORT 8005 \ No newline at end of file +#define MPI_MESSAGE_PORT 8005 diff --git a/include/faabric/scheduler/ExecGraph.h b/include/faabric/scheduler/ExecGraph.h index bff3f3d52..e97ce1d7d 100644 --- a/include/faabric/scheduler/ExecGraph.h +++ b/include/faabric/scheduler/ExecGraph.h @@ -20,4 +20,4 @@ int countExecGraphNodes(const ExecGraph& graph); std::string execNodeToJson(const ExecGraphNode& node); std::string execGraphToJson(const ExecGraph& graph); -} \ No newline at end of file +} diff --git a/include/faabric/scheduler/FunctionCallClient.h b/include/faabric/scheduler/FunctionCallClient.h index 92cb3f81f..a99f3ffff 100644 --- a/include/faabric/scheduler/FunctionCallClient.h +++ b/include/faabric/scheduler/FunctionCallClient.h @@ -28,4 +28,4 @@ class FunctionCallClient void sendMPIMessage(const faabric::MPIMessage& msg); }; -} \ No newline at end of file +} diff --git a/include/faabric/scheduler/FunctionCallServer.h b/include/faabric/scheduler/FunctionCallServer.h index d7487b39b..644f91610 100644 --- a/include/faabric/scheduler/FunctionCallServer.h +++ b/include/faabric/scheduler/FunctionCallServer.h @@ -30,4 +30,4 @@ class FunctionCallServer final private: Scheduler& scheduler; }; -} \ No newline at end of file +} diff --git a/include/faabric/scheduler/InMemoryMessageQueue.h b/include/faabric/scheduler/InMemoryMessageQueue.h index b08fb4dbf..b1a400e95 100644 --- a/include/faabric/scheduler/InMemoryMessageQueue.h +++ b/include/faabric/scheduler/InMemoryMessageQueue.h @@ -6,4 +6,4 @@ namespace faabric::scheduler { typedef faabric::util::Queue InMemoryMessageQueue; typedef std::pair InMemoryMessageQueuePair; -} \ No newline at end of file +} diff --git a/include/faabric/scheduler/MpiContext.h b/include/faabric/scheduler/MpiContext.h index 752e181d5..e2e16de01 100644 --- a/include/faabric/scheduler/MpiContext.h +++ b/include/faabric/scheduler/MpiContext.h @@ -24,4 +24,4 @@ class MpiContext int rank; int worldId; }; -} \ No newline at end of file +} diff --git a/include/faabric/scheduler/Scheduler.h b/include/faabric/scheduler/Scheduler.h index ae6a22aff..8dd20e09e 100644 --- a/include/faabric/scheduler/Scheduler.h +++ b/include/faabric/scheduler/Scheduler.h @@ -132,4 +132,4 @@ class Scheduler }; Scheduler& getScheduler(); -} \ No newline at end of file +} diff --git a/include/faabric/state/DummyStateServer.h b/include/faabric/state/DummyStateServer.h index cda661f91..8f016efa5 100644 --- a/include/faabric/state/DummyStateServer.h +++ b/include/faabric/state/DummyStateServer.h @@ -29,4 +29,4 @@ class DummyStateServer state::StateServer stateServer; }; -} \ No newline at end of file +} diff --git a/include/faabric/state/InMemoryStateRegistry.h b/include/faabric/state/InMemoryStateRegistry.h index d03504f16..0d9946b95 100644 --- a/include/faabric/state/InMemoryStateRegistry.h +++ b/include/faabric/state/InMemoryStateRegistry.h @@ -27,4 +27,4 @@ class InMemoryStateRegistry }; InMemoryStateRegistry& getInMemoryStateRegistry(); -} \ No newline at end of file +} diff --git a/include/faabric/state/State.h b/include/faabric/state/State.h index 93e043741..14f0190de 100644 --- a/include/faabric/state/State.h +++ b/include/faabric/state/State.h @@ -43,4 +43,4 @@ class State }; State& getGlobalState(); -} \ No newline at end of file +} diff --git a/include/faabric/state/StateClient.h b/include/faabric/state/StateClient.h index ce07bb001..26367ce69 100644 --- a/include/faabric/state/StateClient.h +++ b/include/faabric/state/StateClient.h @@ -54,4 +54,4 @@ class StateClient void unlock(); }; -} \ No newline at end of file +} diff --git a/include/faabric/state/StateKeyValue.h b/include/faabric/state/StateKeyValue.h index 0a742bf20..3a82b0e27 100644 --- a/include/faabric/state/StateKeyValue.h +++ b/include/faabric/state/StateKeyValue.h @@ -177,4 +177,4 @@ class StateKeyValueException : public std::runtime_error : runtime_error(message) {} }; -} \ No newline at end of file +} diff --git a/include/faabric/state/StateServer.h b/include/faabric/state/StateServer.h index dfc607b13..2cb3c7b7a 100644 --- a/include/faabric/state/StateServer.h +++ b/include/faabric/state/StateServer.h @@ -59,4 +59,4 @@ class StateServer final private: State& state; }; -} \ No newline at end of file +} diff --git a/include/faabric/util/barrier.h b/include/faabric/util/barrier.h index 2d1e98098..b5afaf276 100644 --- a/include/faabric/util/barrier.h +++ b/include/faabric/util/barrier.h @@ -23,4 +23,4 @@ class Barrier std::mutex mx; std::condition_variable cv; }; -} \ No newline at end of file +} diff --git a/include/faabric/util/bytes.h b/include/faabric/util/bytes.h index e798e2176..5fa0a985f 100644 --- a/include/faabric/util/bytes.h +++ b/include/faabric/util/bytes.h @@ -18,4 +18,4 @@ int safeCopyToBuffer(const uint8_t* dataIn, int dataLen, uint8_t* buffer, int bufferLen); -} \ No newline at end of file +} diff --git a/include/faabric/util/chaining.h b/include/faabric/util/chaining.h index 514e8fd7f..b363c3ffa 100644 --- a/include/faabric/util/chaining.h +++ b/include/faabric/util/chaining.h @@ -15,4 +15,4 @@ class ChainedCallFailedException : public faabric::util::FaabricException : FaabricException(std::move(message)) {} }; -} \ No newline at end of file +} diff --git a/include/faabric/util/clock.h b/include/faabric/util/clock.h index 58470f4a5..5f71096c0 100644 --- a/include/faabric/util/clock.h +++ b/include/faabric/util/clock.h @@ -22,4 +22,4 @@ class Clock }; Clock& getGlobalClock(); -} \ No newline at end of file +} diff --git a/include/faabric/util/config.h b/include/faabric/util/config.h index eae9a0790..a11dc12fc 100644 --- a/include/faabric/util/config.h +++ b/include/faabric/util/config.h @@ -76,4 +76,4 @@ class SystemConfig }; SystemConfig& getSystemConfig(); -} \ No newline at end of file +} diff --git a/include/faabric/util/environment.h b/include/faabric/util/environment.h index df514d58c..abe2b4871 100644 --- a/include/faabric/util/environment.h +++ b/include/faabric/util/environment.h @@ -10,4 +10,4 @@ std::string setEnvVar(const std::string& varName, const std::string& value); void unsetEnvVar(const std::string& varName); unsigned int getUsableCores(); -} \ No newline at end of file +} diff --git a/include/faabric/util/exception.h b/include/faabric/util/exception.h index 160861555..534a8f79d 100644 --- a/include/faabric/util/exception.h +++ b/include/faabric/util/exception.h @@ -19,4 +19,4 @@ class FaabricException : public std::exception protected: std::string _message; }; -} \ No newline at end of file +} diff --git a/include/faabric/util/files.h b/include/faabric/util/files.h index 2f112a618..589aed239 100644 --- a/include/faabric/util/files.h +++ b/include/faabric/util/files.h @@ -37,4 +37,4 @@ class FileAtUrlIsDirectoryException : public faabric::util::FaabricException : FaabricException(std::move(message)) {} }; -} \ No newline at end of file +} diff --git a/include/faabric/util/gids.h b/include/faabric/util/gids.h index d48ee976b..363541f06 100644 --- a/include/faabric/util/gids.h +++ b/include/faabric/util/gids.h @@ -4,4 +4,4 @@ namespace faabric::util { unsigned int generateGid(); -} \ No newline at end of file +} diff --git a/include/faabric/util/json.h b/include/faabric/util/json.h index 63b249e93..3fa74f350 100644 --- a/include/faabric/util/json.h +++ b/include/faabric/util/json.h @@ -18,4 +18,4 @@ class JsonFieldNotFound : public faabric::util::FaabricException std::string getValueFromJsonString(const std::string& key, const std::string& jsonIn); -} \ No newline at end of file +} diff --git a/include/faabric/util/locks.h b/include/faabric/util/locks.h index f2f9534ba..ed9037763 100644 --- a/include/faabric/util/locks.h +++ b/include/faabric/util/locks.h @@ -7,4 +7,4 @@ namespace faabric::util { typedef std::unique_lock UniqueLock; typedef std::unique_lock FullLock; typedef std::shared_lock SharedLock; -} \ No newline at end of file +} diff --git a/include/faabric/util/logging.h b/include/faabric/util/logging.h index 4aa1d5a12..73c6c7301 100644 --- a/include/faabric/util/logging.h +++ b/include/faabric/util/logging.h @@ -6,4 +6,4 @@ namespace faabric::util { void initLogging(); std::shared_ptr getLogger(); -} \ No newline at end of file +} diff --git a/include/faabric/util/memory.h b/include/faabric/util/memory.h index 8c57b5309..2e006524c 100644 --- a/include/faabric/util/memory.h +++ b/include/faabric/util/memory.h @@ -25,4 +25,4 @@ size_t getRequiredHostPagesRoundDown(size_t nBytes); size_t alignOffsetDown(size_t offset); AlignedChunk getPageAlignedChunk(long offset, long length); -} \ No newline at end of file +} diff --git a/include/faabric/util/network.h b/include/faabric/util/network.h index ed811ae6a..5ccb2e07e 100644 --- a/include/faabric/util/network.h +++ b/include/faabric/util/network.h @@ -8,4 +8,4 @@ namespace faabric::util { std::string getIPFromHostname(const std::string& hostname); std::string getPrimaryIPForThisHost(const std::string& interface); -} \ No newline at end of file +} diff --git a/include/faabric/util/queue.h b/include/faabric/util/queue.h index 58b18ef12..a9b9812c3 100644 --- a/include/faabric/util/queue.h +++ b/include/faabric/util/queue.h @@ -98,4 +98,4 @@ class TokenPool int _size; Queue queue; }; -} \ No newline at end of file +} diff --git a/include/faabric/util/random.h b/include/faabric/util/random.h index 14c722739..ef0d85259 100644 --- a/include/faabric/util/random.h +++ b/include/faabric/util/random.h @@ -6,4 +6,4 @@ namespace faabric::util { std::string randomString(int len); std::string randomStringFromSet(const std::unordered_set& s); -} \ No newline at end of file +} diff --git a/include/faabric/wasm/wasm.h b/include/faabric/wasm/wasm.h index c73f44f78..b92f0e251 100644 --- a/include/faabric/wasm/wasm.h +++ b/include/faabric/wasm/wasm.h @@ -1,3 +1,3 @@ #pragma once -int helloFaabricWasm(); \ No newline at end of file +int helloFaabricWasm(); diff --git a/src/executor/FaabricExecutor.cpp b/src/executor/FaabricExecutor.cpp index cc356f274..322267621 100644 --- a/src/executor/FaabricExecutor.cpp +++ b/src/executor/FaabricExecutor.cpp @@ -219,4 +219,4 @@ void FaabricExecutor::postFinish() {} void FaabricExecutor::postFlush() {} -} \ No newline at end of file +} diff --git a/src/proto/RPCServer.cpp b/src/proto/RPCServer.cpp index 0582a9adf..df607f8e6 100644 --- a/src/proto/RPCServer.cpp +++ b/src/proto/RPCServer.cpp @@ -50,4 +50,4 @@ void RPCServer::stop() } } } -} \ No newline at end of file +} diff --git a/src/scheduler/FunctionCallClient.cpp b/src/scheduler/FunctionCallClient.cpp index 44350ba08..ca23d17f1 100644 --- a/src/scheduler/FunctionCallClient.cpp +++ b/src/scheduler/FunctionCallClient.cpp @@ -26,4 +26,4 @@ void FunctionCallClient::sendMPIMessage(const faabric::MPIMessage& msg) faabric::FunctionStatusResponse response; CHECK_RPC("mpi_message", stub->MPICall(&context, msg, &response)); } -} \ No newline at end of file +} diff --git a/src/scheduler/FunctionCallServer.cpp b/src/scheduler/FunctionCallServer.cpp index 3b65312d3..638adba73 100644 --- a/src/scheduler/FunctionCallServer.cpp +++ b/src/scheduler/FunctionCallServer.cpp @@ -66,4 +66,4 @@ Status FunctionCallServer::MPICall(ServerContext* context, return Status::OK; } -} \ No newline at end of file +} diff --git a/src/scheduler/MpiContext.cpp b/src/scheduler/MpiContext.cpp index f4fe51724..f1135f51c 100644 --- a/src/scheduler/MpiContext.cpp +++ b/src/scheduler/MpiContext.cpp @@ -65,4 +65,4 @@ int MpiContext::getWorldId() { return worldId; } -} \ No newline at end of file +} diff --git a/src/scheduler/MpiWorldRegistry.cpp b/src/scheduler/MpiWorldRegistry.cpp index 42234d928..2036ca172 100644 --- a/src/scheduler/MpiWorldRegistry.cpp +++ b/src/scheduler/MpiWorldRegistry.cpp @@ -68,4 +68,4 @@ void MpiWorldRegistry::clear() faabric::util::FullLock lock(registryMutex); worldMap.clear(); } -} \ No newline at end of file +} diff --git a/src/scheduler/Scheduler.cpp b/src/scheduler/Scheduler.cpp index 68368aa8c..6a279dcce 100644 --- a/src/scheduler/Scheduler.cpp +++ b/src/scheduler/Scheduler.cpp @@ -727,4 +727,4 @@ std::unordered_set Scheduler::getChainedFunctions( return chainedIds; } -} \ No newline at end of file +} diff --git a/src/state/DummyStateServer.cpp b/src/state/DummyStateServer.cpp index 60b8ec66e..b47434273 100644 --- a/src/state/DummyStateServer.cpp +++ b/src/state/DummyStateServer.cpp @@ -94,4 +94,4 @@ void DummyStateServer::stop() serverThread.join(); } } -} \ No newline at end of file +} diff --git a/src/state/RedisStateKeyValue.cpp b/src/state/RedisStateKeyValue.cpp index c717aa88a..9bf4be86f 100644 --- a/src/state/RedisStateKeyValue.cpp +++ b/src/state/RedisStateKeyValue.cpp @@ -143,4 +143,4 @@ void RedisStateKeyValue::clearAppendedFromRemote() { redis::Redis::getState().del(joinedKey); } -} \ No newline at end of file +} diff --git a/src/state/StateClient.cpp b/src/state/StateClient.cpp index 19b984d1c..1ed785b78 100644 --- a/src/state/StateClient.cpp +++ b/src/state/StateClient.cpp @@ -201,4 +201,4 @@ void StateClient::unlock() ClientContext context; CHECK_RPC("state_unlock", stub->Unlock(&context, request, &response)) } -} \ No newline at end of file +} diff --git a/src/state/StateKeyValue.cpp b/src/state/StateKeyValue.cpp index 5f65ad810..a6b9d68e6 100644 --- a/src/state/StateKeyValue.cpp +++ b/src/state/StateKeyValue.cpp @@ -630,4 +630,4 @@ std::vector StateKeyValue::getDirtyChunks( return chunks; } -} \ No newline at end of file +} diff --git a/src/util/barrier.cpp b/src/util/barrier.cpp index 73d54ca5f..4541b183f 100644 --- a/src/util/barrier.cpp +++ b/src/util/barrier.cpp @@ -39,4 +39,4 @@ int Barrier::getUseCount() return uses; } -} \ No newline at end of file +} diff --git a/src/util/environment.cpp b/src/util/environment.cpp index 4ee061c2b..b456f5203 100644 --- a/src/util/environment.cpp +++ b/src/util/environment.cpp @@ -44,4 +44,4 @@ unsigned int getUsableCores() return nCores; } -} \ No newline at end of file +} diff --git a/src/util/gids.cpp b/src/util/gids.cpp index f2abe7392..6fddbc69c 100644 --- a/src/util/gids.cpp +++ b/src/util/gids.cpp @@ -32,4 +32,4 @@ unsigned int generateGid() return intHash + counter.fetch_add(1); } } -} \ No newline at end of file +} diff --git a/src/util/logging.cpp b/src/util/logging.cpp index 3c48f85f6..4a815d9ab 100644 --- a/src/util/logging.cpp +++ b/src/util/logging.cpp @@ -39,4 +39,4 @@ std::shared_ptr getLogger() return logger; } -} \ No newline at end of file +} diff --git a/src/util/random.cpp b/src/util/random.cpp index fb73786fd..adf34fe14 100644 --- a/src/util/random.cpp +++ b/src/util/random.cpp @@ -43,4 +43,4 @@ std::string randomStringFromSet(const std::unordered_set& s) return *it; } -} \ No newline at end of file +} diff --git a/src/util/timing.cpp b/src/util/timing.cpp index 826ba2b02..151fa20f1 100644 --- a/src/util/timing.cpp +++ b/src/util/timing.cpp @@ -52,4 +52,4 @@ void nanosToTimespec(uint64_t nanos, struct timespec* nativeTimespec) nativeTimespec->tv_sec = nanos / 1000000000; nativeTimespec->tv_nsec = nanos % 1000000000; } -} \ No newline at end of file +} diff --git a/tests/test/endpoint/test_handler.cpp b/tests/test/endpoint/test_handler.cpp index 887b7f529..95b788497 100644 --- a/tests/test/endpoint/test_handler.cpp +++ b/tests/test/endpoint/test_handler.cpp @@ -145,4 +145,4 @@ TEST_CASE("Check getting function status from endpoint", "[endpoint]") REQUIRE(actual == expectedOutput); } -} \ No newline at end of file +} diff --git a/tests/test/main.cpp b/tests/test/main.cpp index 41d26f0e9..1020d78e3 100644 --- a/tests/test/main.cpp +++ b/tests/test/main.cpp @@ -13,4 +13,4 @@ int main(int argc, char* argv[]) fflush(stdout); return result; -} \ No newline at end of file +} diff --git a/tests/test/proto/test_proto.cpp b/tests/test/proto/test_proto.cpp index ee92d1547..694cff386 100644 --- a/tests/test/proto/test_proto.cpp +++ b/tests/test/proto/test_proto.cpp @@ -124,4 +124,4 @@ TEST_CASE("Test protobuf byte handling", "[proto]") checkMessageEquality(msgA, newMsgA); checkMessageEquality(msgB, newMsgB); } -} \ No newline at end of file +} diff --git a/tests/test/redis/test_redis.cpp b/tests/test/redis/test_redis.cpp index ac8923e43..ba8259dc3 100644 --- a/tests/test/redis/test_redis.cpp +++ b/tests/test/redis/test_redis.cpp @@ -703,4 +703,4 @@ TEST_CASE("Test enqueue dequeue bytes pointers", "[redis]") checkDequeueBytes(redisQueue, queueB, dataC); checkDequeueBytes(redisQueue, queueB, dataA); } -} \ No newline at end of file +} diff --git a/tests/test/scheduler/test_function_client_server.cpp b/tests/test/scheduler/test_function_client_server.cpp index c9ad5fea2..50e8797cd 100644 --- a/tests/test/scheduler/test_function_client_server.cpp +++ b/tests/test/scheduler/test_function_client_server.cpp @@ -102,4 +102,4 @@ TEST_CASE("Test sending MPI message", "[scheduler]") // Stop the server server.stop(); } -} \ No newline at end of file +} diff --git a/tests/test/scheduler/test_mpi_context.cpp b/tests/test/scheduler/test_mpi_context.cpp index c191b6bd8..f71ebc773 100644 --- a/tests/test/scheduler/test_mpi_context.cpp +++ b/tests/test/scheduler/test_mpi_context.cpp @@ -122,4 +122,4 @@ TEST_CASE("Check joining world", "[mpi]") MpiWorld& world = reg.getOrInitialiseWorld(msgB, worldId); const std::string actualHost = world.getHostForRank(1); } -} \ No newline at end of file +} diff --git a/tests/test/state/test_redis_state.cpp b/tests/test/state/test_redis_state.cpp index 357fee48c..64eaf483b 100644 --- a/tests/test/state/test_redis_state.cpp +++ b/tests/test/state/test_redis_state.cpp @@ -574,4 +574,4 @@ TEST_CASE("Test redis state deletion", "[state]") resetStateMode(); } -} \ No newline at end of file +} diff --git a/tests/test/state/test_state.cpp b/tests/test/state/test_state.cpp index 65f3cfa95..c2247b035 100644 --- a/tests/test/state/test_state.cpp +++ b/tests/test/state/test_state.cpp @@ -930,4 +930,4 @@ TEST_CASE("Test pulling disjoint chunks of the same value which share pages", server.stop(); } -} \ No newline at end of file +} diff --git a/tests/test/state/test_state_server.cpp b/tests/test/state/test_state_server.cpp index d63abb795..88fcc754c 100644 --- a/tests/test/state/test_state_server.cpp +++ b/tests/test/state/test_state_server.cpp @@ -259,4 +259,4 @@ TEST_CASE("Test state server with local master", "[state]") resetStateMode(); } -} \ No newline at end of file +} diff --git a/tests/test/util/test_barrier.cpp b/tests/test/util/test_barrier.cpp index 4c0c4f6ee..d270a834a 100644 --- a/tests/test/util/test_barrier.cpp +++ b/tests/test/util/test_barrier.cpp @@ -36,4 +36,4 @@ TEST_CASE("Test barrier operation", "[util]") REQUIRE(b.getSlotCount() == 3); REQUIRE(b.getUseCount() == 1); } -} \ No newline at end of file +} diff --git a/tests/test/util/test_bytes.cpp b/tests/test/util/test_bytes.cpp index 6499c2ba8..e6daa934e 100644 --- a/tests/test/util/test_bytes.cpp +++ b/tests/test/util/test_bytes.cpp @@ -103,4 +103,4 @@ TEST_CASE("Test safe copy with long buffer and other chars", "[util]") REQUIRE(input == actualStr); } -} \ No newline at end of file +} diff --git a/tests/test/util/test_environment.cpp b/tests/test/util/test_environment.cpp index c8f45e1f6..7f4b126d5 100644 --- a/tests/test/util/test_environment.cpp +++ b/tests/test/util/test_environment.cpp @@ -35,4 +35,4 @@ TEST_CASE("Test setting environment variables", "[util]") const std::string original2 = setEnvVar("MY_VAR", "gamma"); REQUIRE(original2 == "beta"); } -} \ No newline at end of file +} diff --git a/tests/test/util/test_func.cpp b/tests/test/util/test_func.cpp index ef44f1c78..75c7e0835 100644 --- a/tests/test/util/test_func.cpp +++ b/tests/test/util/test_func.cpp @@ -193,4 +193,4 @@ TEST_CASE("Test creating async response") REQUIRE(expected == actual); } -} \ No newline at end of file +} diff --git a/tests/test/util/test_gids.cpp b/tests/test/util/test_gids.cpp index 8231e460f..097bb9e42 100644 --- a/tests/test/util/test_gids.cpp +++ b/tests/test/util/test_gids.cpp @@ -50,4 +50,4 @@ TEST_CASE("Test multithreaded gid generation", "[util]") } } } -} \ No newline at end of file +} diff --git a/tests/test/util/test_memory.cpp b/tests/test/util/test_memory.cpp index 3e4ab5953..38c8efe99 100644 --- a/tests/test/util/test_memory.cpp +++ b/tests/test/util/test_memory.cpp @@ -228,4 +228,4 @@ TEST_CASE("Test already aligned memory chunk", "[util]") REQUIRE(actual.nBytesLength == 5 * faabric::util::HOST_PAGE_SIZE); REQUIRE(actual.offsetRemainder == 0); } -} \ No newline at end of file +} diff --git a/tests/test/util/test_queue.cpp b/tests/test/util/test_queue.cpp index ef1afcd7e..b38e0e51a 100644 --- a/tests/test/util/test_queue.cpp +++ b/tests/test/util/test_queue.cpp @@ -28,4 +28,4 @@ TEST_CASE("Test queue operations", "[util]") REQUIRE_THROWS(q.dequeue(1)); } -} \ No newline at end of file +} diff --git a/tests/test/util/test_state.cpp b/tests/test/util/test_state.cpp index 9ff0f15d6..8b71353a0 100644 --- a/tests/test/util/test_state.cpp +++ b/tests/test/util/test_state.cpp @@ -9,4 +9,4 @@ TEST_CASE("Test creating key for user", "[util]") { REQUIRE(faabric::util::keyForUser("foo", "bar") == "foo_bar"); } -} \ No newline at end of file +} diff --git a/tests/test/util/test_strings.cpp b/tests/test/util/test_strings.cpp index bb66a868f..610c2a216 100644 --- a/tests/test/util/test_strings.cpp +++ b/tests/test/util/test_strings.cpp @@ -58,4 +58,4 @@ TEST_CASE("Test string is int", "[util]") REQUIRE(!stringIsInt("abcd")); REQUIRE(!stringIsInt("12a33")); } -} \ No newline at end of file +} diff --git a/tests/test/util/test_tokens.cpp b/tests/test/util/test_tokens.cpp index 2411d8e2e..8104c8a31 100644 --- a/tests/test/util/test_tokens.cpp +++ b/tests/test/util/test_tokens.cpp @@ -108,4 +108,4 @@ TEST_CASE("Test empty token pool returns -1", "[util]") REQUIRE(actualB == -1); REQUIRE(actualC == -1); } -} \ No newline at end of file +} diff --git a/tests/utils/faabric_utils.h b/tests/utils/faabric_utils.h index f55a785dd..fc1fb1171 100644 --- a/tests/utils/faabric_utils.h +++ b/tests/utils/faabric_utils.h @@ -19,4 +19,4 @@ void checkExecGraphNodeEquality(const scheduler::ExecGraphNode& nodeA, void checkExecGraphEquality(const scheduler::ExecGraph& graphA, const scheduler::ExecGraph& graphB); -} \ No newline at end of file +} diff --git a/tests/utils/system_utils.cpp b/tests/utils/system_utils.cpp index f225ddc60..941e6a4e4 100644 --- a/tests/utils/system_utils.cpp +++ b/tests/utils/system_utils.cpp @@ -36,4 +36,4 @@ void cleanFaabric() scheduler::MpiWorldRegistry& mpiRegistry = scheduler::getMpiWorldRegistry(); mpiRegistry.clear(); } -} \ No newline at end of file +}