~aleteoryx/muditaos

d967f86934ae512978dff095b1a91b9b279b4b23 — Radoslaw Wicik 5 years ago 4954815
[EGD-4763] Add VFS to gui fontmanager mock

Fix test in gui fontmanager.
M generate_fatfs_image.sh => generate_fatfs_image.sh +1 -0
@@ 67,6 67,7 @@ mformat -i "$PART2" -F -T 2097152 -v RECOVER
mmd -i "$PART1" ::/current
cd "$SRC_DATA"
for i in $ASSETS_DIR; do
    echo "copy: $i"
	mcopy -s -i "$PART1" $i ::/current/
done
mcopy -s -i "$PART1" user ::

M module-gui/test/mock/InitializedFontManager.cpp => module-gui/test/mock/InitializedFontManager.cpp +5 -1
@@ 1,8 1,11 @@
// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "InitializedFontManager.hpp"
#include <mutex>
#include <vfs.hpp>

extern class vfs vfs;

namespace mockup
{


@@ 10,6 13,7 @@ namespace mockup

    auto fontManager() -> gui::FontManager &
    {
        vfs.Init();
        std::lock_guard<std::mutex> scoped(guard);
        auto &fontmanager = gui::FontManager::getInstance();
        if (!fontmanager.isInitialized()) {

M module-gui/test/test-catch-text/CMakeLists.txt => module-gui/test/test-catch-text/CMakeLists.txt +1 -1
@@ 19,9 19,9 @@ add_catch2_executable(
                ..
                ../mock/
        LIBS
                module-vfs
                module-gui
                iosyscalls
                module-vfs
        DEPS
                assets
                PurePhone.img-target