Skip to content

Commit

Permalink
Release v0.10.0 (addendum)
Browse files Browse the repository at this point in the history
  • Loading branch information
AchimStremplat committed Dec 3, 2021
1 parent 87c9e59 commit e8b25c0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions components/libRamsesBase/tests/LinkAdaptor_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ end
}

#if (!defined (__linux__))
// TODO: Investigate this on Linux
// awaitPreviewDirty does not work in Linux as expected. See RAOS-692

TEST_F(LinkAdaptorFixture, linkWorksIfScriptContentChanges) {
const auto luaScript{context.createObject(raco::user_types::LuaScript::typeDescription.typeName, "lua_script", "lua_script_id")};
Expand Down Expand Up @@ -93,7 +93,7 @@ function run()
end
)");

raco::awaitPreviewDirty(recorder, luaScript);
EXPECT_TRUE(raco::awaitPreviewDirty(recorder, luaScript));

ASSERT_NO_FATAL_FAILURE(dispatch());
ASSERT_TRUE(backend.logicEngine().update());
Expand Down
9 changes: 7 additions & 2 deletions datamodel/libCore/tests/Undo_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,9 @@ void main() {
postCheck("alt_name");
}

#if (!defined(__linux__))
// awaitPreviewDirty does not work in Linux as expected. See RAOS-692

TEST_F(UndoTest, lua_resync_after_undo) {
TextFile luaFile = makeFile("test.lua", R"(
function interface()
Expand Down Expand Up @@ -738,7 +741,7 @@ end

recorder.reset();
raco::utils::file::write(luaFile.path.string(), altLuaScript);
raco::awaitPreviewDirty(recorder, lua);
EXPECT_TRUE(raco::awaitPreviewDirty(recorder, lua));

EXPECT_FALSE(luaOutputs.hasProperty("vec"));
EXPECT_TRUE(luaOutputs.hasProperty("renamed"));
Expand Down Expand Up @@ -788,7 +791,7 @@ end

recorder.reset();
raco::utils::file::write(luaFile.path.string(), altLuaScript);
raco::awaitPreviewDirty(recorder, lua);
EXPECT_TRUE(raco::awaitPreviewDirty(recorder, lua));

EXPECT_FALSE(luaOutputs.hasProperty("vec"));
EXPECT_TRUE(luaOutputs.hasProperty("renamed"));
Expand All @@ -802,3 +805,5 @@ end
//The assert fails - needs to be fixed. See RAOS-687
//ASSERT_FALSE(commandInterface.errors().hasError({node}));
}

#endif
1 change: 1 addition & 0 deletions datamodel/libTesting/include/testing/TestUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ inline bool awaitPreviewDirty(const raco::core::DataChangeRecorder& recorder, co
while (std::find(dirtyObjects.begin(), dirtyObjects.end(), obj) == dirtyObjects.end()) {
if (std::chrono::steady_clock::now() > timeoutTS) {
assert(false && "Timeout");
return false;
}
std::this_thread::sleep_for(std::chrono::milliseconds{5});
QCoreApplication::processEvents();
Expand Down

0 comments on commit e8b25c0

Please sign in to comment.