Skip to content

Commit

Permalink
Add user conan profile override variable, fix dist tests compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
eigenraven committed Aug 30, 2022
1 parent d1bce75 commit f1a8b8a
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
build
venv
docker/*.dockerfile

conan-profile-user.txt
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FAABRIC_VERSION=0.3.1
FAABRIC_CLI_IMAGE=kubasz51/faasm-faabric:0.3.1
FAABRIC_VERSION=0.4.0
FAABRIC_CLI_IMAGE=kubasz51/faasm-faabric:0.4.0
FAABRIC_BASE_CLI_IMAGE=kubasz51/faasm-faabric-base:0.4.0
COMPOSE_PROJECT_NAME=faabric-dev
CONAN_CACHE_MOUNT_SOURCE=./conan-cache/
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,5 @@ __pycache__/
*.pyc
venv/
*.egg-info/

conan-profile-user.txt
6 changes: 5 additions & 1 deletion cmake/ExternalProjects.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ if(NOT (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64"))
set(FAABRIC_ARCH_SUFFIX "-${CMAKE_SYSTEM_PROCESSOR}")
endif()

set(FAABRIC_CONAN_PROFILE "${CMAKE_CURRENT_LIST_DIR}/../conan-profile${FAABRIC_ARCH_SUFFIX}.txt" CACHE FILEPATH "Faabric conan profile path" FORCE)
if(FAABRIC_CONAN_PROFILE_OVERRIDE)
set(FAABRIC_CONAN_PROFILE "${CMAKE_CURRENT_LIST_DIR}/../${FAABRIC_CONAN_PROFILE_OVERRIDE}" CACHE FILEPATH "Faabric conan profile path" FORCE)
else()
set(FAABRIC_CONAN_PROFILE "${CMAKE_CURRENT_LIST_DIR}/../conan-profile${FAABRIC_ARCH_SUFFIX}.txt" CACHE FILEPATH "Faabric conan profile path" FORCE)
endif()

conan_cmake_install(PATH_OR_REFERENCE .
BUILD outdated
Expand Down
4 changes: 2 additions & 2 deletions tests/dist/DistTestExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ExecutorFunction getDistTestExecutorCallback(const faabric::Message& msg)
}

DistTestExecutor::DistTestExecutor(faabric::Message& msg)
: Executor(msg)
: Executor(faabric::MessageInBatch(msg))
{
setUpDummyMemory(dummyMemorySize);
}
Expand Down Expand Up @@ -95,7 +95,7 @@ void DistTestExecutor::setUpDummyMemory(size_t memSize)
}

std::shared_ptr<Executor> DistTestExecutorFactory::createExecutor(
faabric::Message& msg)
faabric::MessageInBatch msg)
{
return std::make_shared<DistTestExecutor>(msg);
}
Expand Down
3 changes: 1 addition & 2 deletions tests/dist/DistTestExecutor.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ class DistTestExecutor final : public faabric::scheduler::Executor

class DistTestExecutorFactory : public faabric::scheduler::ExecutorFactory
{
protected:
std::shared_ptr<faabric::scheduler::Executor> createExecutor(
faabric::Message& msg) override;
faabric::MessageInBatch msg) override;
};

typedef int (*ExecutorFunction)(
Expand Down
4 changes: 2 additions & 2 deletions tests/test/scheduler/test_executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ int32_t TestExecutor::executeTask(
bool isThread = reqOrig->type() == faabric::BatchExecuteRequest::THREADS;

// Check we're being asked to execute the function we've bound to
assert(msg.user() == boundMessage.user());
assert(msg.function() == boundMessage.function());
assert(msg.user() == boundMessage->user());
assert(msg.function() == boundMessage->function());

// Custom thread-check function
if (msg.function() == "thread-check" && !isThread) {
Expand Down

0 comments on commit f1a8b8a

Please sign in to comment.