Giter VIP home page Giter VIP logo

Comments (6)

Flamefire avatar Flamefire commented on August 31, 2024

Isn't this the case already through use of boost_test/boost_test_jamfile?

Or did I miss any?

boost_test_jamfile(FILE Jamfile.v2)
# Those require to be run in the test directory
foreach(name test_formatting test_message)
boost_test(SOURCES ${name}.cpp WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
endforeach()

from locale.

pdimov avatar pdimov commented on August 31, 2024

Oh, that's examples, not tests.

[ 43%] Building CXX object libs/locale/examples/CMakeFiles/boost_locale-expl_boundary.dir/boundary.cpp.o
[ 43%] Linking CXX executable ../../../stage/bin/boost_locale-expl_boundary
[ 43%] Built target boost_locale-expl_boundary
[ 43%] Building CXX object libs/locale/examples/CMakeFiles/boost_locale-expl_calendar.dir/calendar.cpp.o
[ 43%] Linking CXX executable ../../../stage/bin/boost_locale-expl_calendar
[ 43%] Built target boost_locale-expl_calendar
[ 43%] Building CXX object libs/locale/examples/CMakeFiles/boost_locale-expl_collate.dir/collate.cpp.o
[ 43%] Linking CXX executable ../../../stage/bin/boost_locale-expl_collate
[ 43%] Built target boost_locale-expl_collate
[ 43%] Building CXX object libs/locale/examples/CMakeFiles/boost_locale-expl_conversions.dir/conversions.cpp.o
[ 43%] Linking CXX executable ../../../stage/bin/boost_locale-expl_conversions
[ 43%] Built target boost_locale-expl_conversions
[ 43%] Building CXX object libs/locale/examples/CMakeFiles/boost_locale-expl_hello.dir/hello.cpp.o
[ 43%] Linking CXX executable ../../../stage/bin/boost_locale-expl_hello
[ 43%] Built target boost_locale-expl_hello
[ 43%] Building CXX object libs/locale/examples/CMakeFiles/boost_locale-expl_wboundary.dir/wboundary.cpp.o
[ 43%] Linking CXX executable ../../../stage/bin/boost_locale-expl_wboundary
[ 43%] Built target boost_locale-expl_wboundary
[ 43%] Building CXX object libs/locale/examples/CMakeFiles/boost_locale-expl_wconversions.dir/wconversions.cpp.o
[ 43%] Linking CXX executable ../../../stage/bin/boost_locale-expl_wconversions
[ 43%] Built target boost_locale-expl_wconversions
[ 43%] Building CXX object libs/locale/examples/CMakeFiles/boost_locale-expl_whello.dir/whello.cpp.o
[ 43%] Linking CXX executable ../../../stage/bin/boost_locale-expl_whello
[ 43%] Built target boost_locale-expl_whello
[ 43%] Building CXX object libs/locale/examples/CMakeFiles/boost_locale-expl_perf_collate.dir/performance/perf_collate.cpp.o
[ 43%] Linking CXX executable ../../../stage/bin/boost_locale-expl_perf_collate
[ 43%] Built target boost_locale-expl_perf_collate
[ 43%] Building CXX object libs/locale/examples/CMakeFiles/boost_locale-expl_perf_convert.dir/performance/perf_convert.cpp.o
[ 43%] Linking CXX executable ../../../stage/bin/boost_locale-expl_perf_convert
[ 43%] Built target boost_locale-expl_perf_convert
[ 43%] Building CXX object libs/locale/examples/CMakeFiles/boost_locale-expl_perf_format.dir/performance/perf_format.cpp.o
[ 43%] Linking CXX executable ../../../stage/bin/boost_locale-expl_perf_format
[ 43%] Built target boost_locale-expl_perf_format

Not sure what we're supposed to do with these. I usually treat them as compile tests.

from locale.

Flamefire avatar Flamefire commented on August 31, 2024

In the context of what we have right now it makes sense then I guess
I'm still wondering WHY we do that.

The usual workflow for pretty much any software I built so far (and that's a lot given I'm co-maintaining an HPC cluster) is: configure && make && make test && make install (or the equivalent on other buildsystems, e.g. cmake instead of configure)

With EXCLUDE_FROM_ALL we break this "convention" by having make test (or ctest .) be a silent no-op unless make tests is executed before.

I try to go for the least element of surprise and deviating from semi-standard behavior, especially if it leads to silent unexpected results, is surprising.

So what was the motivation? IMO building ALL with make all serves as a smoke test if the library works on the current system/compiler/..., i.e. there are no unmet expectations on that system from the library dev.
And when adding/changing something myself I use the ALL target to quickly see if I missed anything obvious. I'll now need to remember to use the tests target for that.
Finally having make tests and make test might be confusing

from locale.

pdimov avatar pdimov commented on August 31, 2024

No, ctest is not a silent no-op, all the tests that haven't been built fail, because the executables aren't there.

IMO building ALL with make all serves as a smoke test if the library works on the current system/compiler/...

But that's not what it does at all. It builds all of Boost, not "the library".

from locale.

Flamefire avatar Flamefire commented on August 31, 2024

No, ctest is not a silent no-op, all the tests that haven't been built fail, because the executables aren't there.

You are right. I confused it with the case that no tests were added at all in which case ctest will succeed without having run anything. There is the flag --no-tests=error to detect that case, which can happen if ENABLE_TESTING was accidentally disable somewhere.

from locale.

pdimov avatar pdimov commented on August 31, 2024

--output-on-failure and --no-tests=error should have been the default, really. I have a check target that runs ctest with these, but the problem with it is that there's no good way to pass the correct -j to it.

from locale.

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.