Giter VIP home page Giter VIP logo

Comments (7)

mbeyeler avatar mbeyeler commented on June 15, 2024

Good point. We can probably link to User Guide Ch.11: Regression Suite for more info, where I explained how to install gtest for our purposes, but the README instructions are confusing. In fact, Ch.1 of the User Guide makes the same mistake.

from carlsim3.

mbeyeler avatar mbeyeler commented on June 15, 2024

Just had another confused user contact me. Need to do this asap.

from carlsim3.

mbeyeler avatar mbeyeler commented on June 15, 2024

An alternative would be to have make test automatically compile gtest if needed (i.e., run the cmake recipe as part of make test).

from carlsim3.

vuw-ecs-kevin avatar vuw-ecs-kevin commented on June 15, 2024

When you do come to document this, could you also
consider making sure a know version of the googletest
code, and maybe other external codes goes into
the "release" tarballs, for those people who want a
known point in the code to work from, rather than
multiple people working from their own constantly
changing sync of a constantly changing repo?

Just had a research group here telling me that they are
going to be using CARLsim over the summer (in NZ)
and when I downloaded the 3.1.3 tarball, so as to "get
ahead of the game", I hit the same problems in trying to
follow the install instructions, but, having then found this
issue, I then found that the extra instructions from the 'User
Guide Ch.11: Regression Suite' are of little use, because the

external/googletest

dir, despite exsiting in the "release" tarball payload is empty.

Here's hoping,
Kevin M. Buckley

eScience Consultant
School of Engineering and Computer Science
Victoria University of Wellington
New Zealand

from carlsim3.

mbeyeler avatar mbeyeler commented on June 15, 2024

Hi Kevin,

Thanks for bringing this to our attention. After some googling, I found GitHub's official answer to this is that submodules are never included in releases:

This is not possible currently.
Thanks for the suggestion though! I have added it to our list for our team to consider.

However, to address your concern, we do already tag the 3.1.3 release to a specific commit of each external library - meaning that everyone checking out CARLsim 3.1.3 with a recursive clone will also get the same googletest version (which I believe is currently set at 1.7.0).

$ git clone --recursive https://github.com/YourUsername/CARLsim3
$ cd CARLsim3
$ git checkout v3.1.3

Best,
Michael

from carlsim3.

vuw-ecs-kevin avatar vuw-ecs-kevin commented on June 15, 2024

However, to address your concern, we do already tag the 3.1.3 release to a specific commit
of each external library - meaning that everyone checking out CARLsim 3.1.3 with a recursive
clone will also get the same googletest version (which I believe is currently set at 1.7.0).

OK, that's really useful to know, Michael, cheers.

If that kind of thing ("You will need googletest v 1.7.0") was documented
in the release tarballs, then I could have gone straight to the tagged
release UR for the external packageI:

https://github.com/google/googletest/releases/tag/release-1.7.0

which is a lot simpler to remember than that commit ID.

Cheers again,
Kevin

from carlsim3.

vuw-ecs-kevin avatar vuw-ecs-kevin commented on June 15, 2024

So i downloaded the 1.7.0 googletest tarball, unpacked it at
placed the contents at /path/to/CARLsim3-3.1.3/external/googletest

When I now make test I get some errors akin to this one

In file included from external/googletest/include/gtest/gtest.h:58:0,
                 from carlsim/test/conn_mon.cpp:1:
carlsim/test/conn_mon.cpp: In member function 'virtual void ConnMon_weightFile_Test::TestBody()':
carlsim/test/conn_mon.cpp:323:22: error: no match for 'operator!=' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int')
    EXPECT_TRUE(wtFile!=0);
                ~~~~~~^~~
                ~~~~~~^~~
external/googletest/include/gtest/internal/gtest-internal.h:1111:34: note: in definition of macro 'GTEST_TEST_BOOLEAN_'
       ::testing::AssertionResult(expression)) \
                                  ^~~~~~~~~~
carlsim/test/conn_mon.cpp:323:4: note: in expansion of macro 'EXPECT_TRUE'
    EXPECT_TRUE(wtFile!=0);
    ^~~~~~~~~~~
carlsim/test/conn_mon.cpp:323:22: note: candidate: operator!=(int, int) <built-in>
    EXPECT_TRUE(wtFile!=0);
                ~~~~~~^~~
external/googletest/include/gtest/internal/gtest-internal.h:1111:34: note: in definition of macro 'GTEST_TEST_BOOLEAN_'
       ::testing::AssertionResult(expression)) \
                                  ^~~~~~~~~~
carlsim/test/conn_mon.cpp:323:4: note: in expansion of macro 'EXPECT_TRUE'
    EXPECT_TRUE(wtFile!=0);
    ^~~~~~~~~~~
carlsim/test/conn_mon.cpp:323:22: note:   no known conversion for argument 1 from 'std::ifstream {aka std::basic_ifstream<char>}' to 'int'
    EXPECT_TRUE(wtFile!=0);
                ~~~~~~^~~
external/googletest/include/gtest/internal/gtest-internal.h:1111:34: note: in definition of macro 'GTEST_TEST_BOOLEAN_'
       ::testing::AssertionResult(expression)) \
                                  ^~~~~~~~~~
carlsim/test/conn_mon.cpp:323:4: note: in expansion of macro 'EXPECT_TRUE'
    EXPECT_TRUE(wtFile!=0);
    ^~~~~~~~~~~

...

which, in looking around on the interweb thing, suggests possible
solutions along these lines

but those soultions suggest an issue to be addressed within the test code,
not in the external googletest code.

So, have you seen, or had anything like that reported ?

FWIW, we have GCC 6.3.1 here.

from carlsim3.

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.