more G-Labs products

Author Topic: TESTING RELATED LIBRARIES  (Read 3265 times)

August 22, 2015, 05:48:20 PM
Read 3265 times

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Some of HomeGenie dependencies have been detached and moved to own repositories.
If you want to help testing/debugging/improving one of the following, please use the respective repos:

https://github.com/genielabs/zwave-lib-dotnet
https://github.com/genielabs/x10-lib-dotnet
https://github.com/genielabs/w800rf32-lib-dotnet
https://github.com/genielabs/serialport-lib-dotnet

Each of them contains a Test project, useful for quick testing and debugging.
You can disccus here any issue/request or directly use the github issue tracker.

Cheers,
g.

November 28, 2015, 09:31:40 PM
Reply #1

Bounz

  • ***
  • Information
  • Full Member
  • Posts: 94
Hi, Genie!
How are you debugging whole app with externalized libs now?
Why didn't you made submodules for each of them in the main git repository?

November 28, 2015, 09:52:46 PM
Reply #2

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Hi Bounz,

each of them comes with a test program that can be used before integrating the changes in HG.
What do you mean by "submodules"? Perhaps is something I am not aware of.

g.

November 29, 2015, 08:45:34 AM
Reply #3

Bounz

  • ***
  • Information
  • Full Member
  • Posts: 94
I'm talking about Git Submodules https://git-scm.com/book/en/v2/Git-Tools-Submodules.
They let you incorporate external repository as a subdirectory of your main project.
For example you can look at "Mini-Profiler" project from StackOverflow guys: they have a UI project being a submodule of "StackExchange.Profiling" project: https://github.com/MiniProfiler/dotnet/tree/master/StackExchange.Profiling.

Testing each project separately is a good idea when you know what you are going to test, but when you finding an issue in semi-known code debugging is great.
Also it would be simpler to incorporate changes made on submodule to the main project. Yesterday I've to build MIG libraries, manually copy .dll to the HomeGenie's Externals folder and then open and build HG project.

February 09, 2016, 05:59:54 AM
Reply #4

Bounz

  • ***
  • Information
  • Full Member
  • Posts: 94
Tried to play a little bit with git submodules but faced with a problem with dependencies of MIG library.
Replacing references to assemblies in the main HG solution with references to projects in the same solution (added with git submodules) isn't a problem, but if I want to add to solution zwave-lib-net, for example, then I have to replace reference to NuGet package of this library in MIG solution, but as MIG is a submodule and should be available as a standalone library, replacing reference to zwave-lib broke it's independency.

November 06, 2016, 04:55:51 PM
Reply #5

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
I got sometime a bug, no messages are sent to ZWave modules, but they still receive Sensor informations.
I can save the log at that moment last week. The Sending task is killed in a ResendOnWakeUp call by the QueueManagerTask.

2016-10-26 19:16:33.8712 Error HomeAutomation.HomeGenie   Trapper   Unhandled Exception   Error.Exception   System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
  at System.ThrowHelper.ThrowArgumentOutOfRangeException (ExceptionArgument argument, ExceptionResource resource) <0x74ff84c8 + 0x00038> in <filename unknown>:0
  at System.ThrowHelper.ThrowArgumentOutOfRangeException () <0x74ff8240 + 0x00013> in <filename unknown>:0
  at System.Collections.Generic.List`1[T].get_Item (Int32 index) <0x74e2fc74 + 0x00027> in <filename unknown>:0
  at ZWaveLib.CommandClasses.WakeUp.ResendOnWakeUp (ZWaveLib.ZWaveNode node, System.Byte[] msg) <0x71008000 + 0x0013f> in <filename unknown>:0
  at ZWaveLib.ZWaveController.QueueManagerTask () <0x7394ef88 + 0x0040f> in <filename unknown>:0
  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) <0x74ff16c8 + 0x000c7> in <filename unknown>:0
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) <0x74fefafc + 0x001bf> in <filename unknown>:0
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) <0x74fefac8 + 0x0002b> in <filename unknown>:0
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) <0x74fefa14 + 0x0005b> in <filename unknown>:0
  at System.Threading.ThreadHelper.ThreadStart () <0x74ff1898 + 0x00037> in <filename unknown>:0


An extract of the bug file is join following.