Skip to content

Commit

Permalink
runsettings for tests, getting started on modules, update core and rsl
Browse files Browse the repository at this point in the history
  • Loading branch information
GlynLeine committed Dec 13, 2024
1 parent f250059 commit 808e132
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 16 deletions.
15 changes: 15 additions & 0 deletions .runsettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<RunSettings>

<RunConfiguration>
<ResultsDirectory>.\test_results</ResultsDirectory><!-- Path relative to solution directory -->
<TestSessionTimeout>60000</TestSessionTimeout><!-- Milliseconds -->
</RunConfiguration>

<Catch2Adapter disabled="false">
<CombinedTimeout>30000</CombinedTimeout><!-- 30s in Milliseconds -->
<DebugBreak>on</DebugBreak>
<FilenameFilter>-test</FilenameFilter>
</Catch2Adapter>

</RunSettings>
8 changes: 4 additions & 4 deletions applications/core_test/src/core_test/source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ struct test_struct
int i = 14;
};

rsl::result<void> RYTHE_CCONV init_program(Program& program)
rsl::result<void> RYTHE_CCONV init_program(program& program)
{
auto& engine = program.addEngineInstance();
auto& engine = program.add_engine_instance();
engine.get_context().emplace<test_struct>().i = 15;

rsl::log::debug("{}", engine.get_context().get<test_struct>().i);
rsl::log::debug("{}", engine.get_context().get<test_struct>().i);

return rsl::error; // Temporarily to stop the engine from running.
return rsl::error; // Temporarily to stop the engine from running.
}
6 changes: 3 additions & 3 deletions applications/sandbox/src/sandbox/source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ struct foo
{
};

int RYTHE_CCONV reportModules(rythe::core::Program& program)
rsl::result<void> RYTHE_CCONV init_program(rythe::core::program& program)
{
using namespace rythe;
program.addEngineInstance();
program.add_engine_instance();

[[maybe_unused]] constexpr rsl::constexpr_string A = "Something";
[[maybe_unused]] constexpr rsl::constexpr_string B = "Other";
Expand All @@ -35,5 +35,5 @@ int RYTHE_CCONV reportModules(rythe::core::Program& program)
shrunk.capacity()
);

return -1;
return rsl::okay;
}
15 changes: 15 additions & 0 deletions build/vs2022/.runsettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<RunSettings>

<RunConfiguration>
<ResultsDirectory>.\test_results</ResultsDirectory><!-- Path relative to solution directory -->
<TestSessionTimeout>60000</TestSessionTimeout><!-- Milliseconds -->
</RunConfiguration>

<Catch2Adapter disabled="false">
<CombinedTimeout>30000</CombinedTimeout><!-- 30s in Milliseconds -->
<DebugBreak>on</DebugBreak>
<FilenameFilter>-test</FilenameFilter>
</Catch2Adapter>

</RunSettings>
2 changes: 1 addition & 1 deletion premake/rythe
Submodule rythe updated 2 files
+1 −1 projects.lua
+9 −1 rythe.lua
13 changes: 7 additions & 6 deletions premake5.lua
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
-- root workspace, all sub-project should be included
workspace "rythe"
location("build/" .. _ACTION)
configurations { "Debug", "Debug-no-inline", "Development", "Release", "Debug-asan", "Release-profiling" }

os.chdir(_MAIN_SCRIPT_DIR)

filter("configurations:Debug-no-inline")
defines { "RYTHE_DISABLE_ALWAYS_INLINE" }

local r = require("premake/rythe")

r.configure()
local workspace = {
name = "rythe",
location = "build/" .. _ACTION,
configurations = { "Debug", "Debug-no-inline", "Development", "Release", "Debug-asan", "Release-profiling" }
}

r.configure({workspace})

0 comments on commit 808e132

Please sign in to comment.