Giter Site home page Giter Site logo

Comments (13)

r00t- avatar r00t- commented on September 24, 2024

https://github.com/ThrowTheSwitch/Unity is the test-framework being used,
and it would be a bug on their end.
(unless we use an outdated version and they fixed it already).
simply run make -C sml instead of make to skip the tests.
(also, the library itself is already compiled when it tries to build the tests.)

from libsml.

m-reuter avatar m-reuter commented on September 24, 2024

thanks, I noticed also simply using:
struct _Unity Unity = { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , { 0 } };
from the ifdef APPLE block instead of the other one seems to fix this.
Not sure how these lines make it into the unity.c file from the Unity project that you linked? And not sure how to report it there as I am not familiar with this framework.
One problem is, that the make command is called from vzlogger and I don't think there is an option there to skip the test?

How should this be resolved?

  • modify the lines in unity.c to always use the APPLE block (what is the other one used for anyway)?
  • check whether the unify project above has a fix already, if not find out how to report it there?
  • add a flag to vzlogger to skip tests?

Thanks

from libsml.

andig avatar andig commented on September 24, 2024

Should be fixed upstream, not here

from libsml.

m-reuter avatar m-reuter commented on September 24, 2024

Don't think it is necessarily an upstream issue. See here #41 where these lines were added.

from libsml.

devZer0 avatar devZer0 commented on September 24, 2024

yes, it isn't, that piece of code does not exist upstream

from libsml.

r00t- avatar r00t- commented on September 24, 2024

we DO use an outdated version, last update january 2013...
https://github.com/volkszaehler/libsml/commits/master/test/unity

we should try simply copying the files from https://github.com/ThrowTheSwitch/Unity/tree/master/src
and seeing if that works better.
should we maybe make that a git submodule to avoid the copying?
(but that would probably make the build process too complicated for some users.)

from libsml.

r00t- avatar r00t- commented on September 24, 2024

@m-reuter:
vzlogger will surely not invoke make...
install.sh does. https://github.com/volkszaehler/vzlogger/blob/master/install.sh#L226
imho that script is an abomination that should not exist ;)
but we might make it only warn but not abort if make test fails.

from libsml.

r00t- avatar r00t- commented on September 24, 2024

simply copying the files from unity does not work, their API has changed since 2013 ;)
somebody will have to look into this in more depth.

from libsml.

m-reuter avatar m-reuter commented on September 24, 2024

@r00t- yes, I also would love to see install.sh be replaced by a nice cmake approach.
Modifying install.sh can either: i) always skip the test, ii) skip the test if a flag is passed, iii) separate building the library and testing and continue if the test fails.
Anyway I think it would be easier to find out why these changes were introduced in this project in #41 and not simply splitting in APPLE and rest of world, but maybe only using the problem line for the OSs where this is needed (raspbian and what else?). Or we just add Alpine to the APPLE block.

from libsml.

r00t- avatar r00t- commented on September 24, 2024

@m-reuter:
"install.sh" does not replace cmake.
it replaces something like a package builder or whatever, building the project AND it's dependencies for users not capable of doing so themselves.

from libsml.

m-reuter avatar m-reuter commented on September 24, 2024

cmake can build dependencies and can also install the package. And for the users who do not want to type the cmake command, there could still be a simplified install.sh. But this is really an issue that should be discussed at vzlogger.

For the issue here I think the fastest solution is to fine-tune #41 to be more specific about what OS should use what line. Adopting the new unify api is probably more involved (but probably necessary in the long run to maintain this project to work with more up-to-date dependencies). Maybe @andig can comment as he introduced #41 ?

from libsml.

r00t- avatar r00t- commented on September 24, 2024

#99 builds on your weird distro:

$ docker run -it --rm alpine /bin/ash -c 'apk add --no-cache build-base git util-linux-dev && git clone -b upgrade_unity_to_v2.5.2 https://github.com/r00t-/libsml.git && cd libsml && make'
[...]
88 Tests 0 Failures 0 Ignored 
OK
make[1]: Leaving directory '/libsml/test'

from libsml.

m-reuter avatar m-reuter commented on September 24, 2024

Thanks, will take a look.
While I am also not an alpine fan, it is gaining a lot of importance as a base docker image since it is so small. Also large frameworks (e.g. home assistant) use it for their Add-ons.

from libsml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.