Time  Nick           Message
00:27 MTDiscord      <luatic> our tests are a bit scattered
00:27 MTDiscord      <luatic> we have C++ unit tests. these are run via --run-unittests.
00:27 MTDiscord      <luatic> then we have devtest unit tests. there is a setting to run them automatically when the game is entered. there also is a command to run them.
00:29 MTDiscord      <luatic> and for pure lua stuff, we have busted unit tests. these can be run via busted builtin.
00:29 MTDiscord      <luatic> (assuming busted is installed)
00:30 ireallyhateirc I mean things in builtin/common
00:32 MTDiscord      <luatic> yeah those would be run via busted builtin
00:34 ireallyhateirc hmmmmmmmmmm yeah I want to make a unit test for builtin/common and run that to test it
00:34 ireallyhateirc how into?
00:37 MTDiscord      <luatic> ireallyhateirc: place a *_spec.lua file in builtin/common/tests? you could see the vector_spec.lua for an example. busted docs are pretty good.
00:38 ireallyhateirc ok so after placing it, will it run automatically?
00:38 ireallyhateirc please be patient, that's the first unit test in my life :D
00:39 MTDiscord      <luatic> yes, busted runs all "spec" files it finds in the given folder. so if you do busted builtin it will run.
00:39 ireallyhateirc yeah that busted thing, what's that?
02:32 Blockhead256   ireallyhateirc: You use a command-line package manager for Lua called "Luarocks" to install it
02:32 Blockhead256   sudo luarocks install busted
02:33 Blockhead256   or luarocks install --local busted
02:33 Blockhead256   then cd to the directory above builtin and as luatic said, `busted builtin`
08:33 mtvisitor      hallo, good afternoon.
08:34 mtvisitor      do you know how to init some basic stuff such as apples, sticks and torches in the player's inventory or bags in the singleplayer mode ?
08:35 mtvisitor      do i need to write some lua scripts or update in some minetest world.conf file ?
08:36 MTDiscord      <theidealist> you could always put some stuff in register_on_newplayer, I think that's how the give_initial_stuff mod from MTG does it
08:36 mtvisitor      by the way, i will submit a small texture pack(ver0.2) to content.minetest.net for approval later.
08:37 MTDiscord      <theidealist> actually give_initial_stuff has a setting to change what it gives you at the start
08:37 celeron55_     https://github.com/minetest/minetest_game/tree/master/mods/give_initial_stuff
08:37 MTDiscord      <theidealist> so if you're using MTG then do that
08:38 mtvisitor      ok, thank you very much for your answer(s) and help.
08:38 mtvisitor      i will let you know if i have further questions.
12:49 ireallyhateirc What's the upstream for Minetest's lib/sha256 ?
12:49 ireallyhateirc I'm having "fun" packaging it for my meme distro
12:50 ireallyhateirc and it would be better to use the upstream lib rather than the one bundled
12:51 MTDiscord      <rollerozxa> pretty sure it was only separated because it was the only C source file in the main source tree and that caused issues for either precompiled headers or LTO
12:54 ireallyhateirc there's this in the file:  * Copyright (c) 1998-2011 The OpenSSL Project.  All rights reserved.
12:54 ireallyhateirc but I couldn't find that in the upstream package
12:55 ireallyhateirc that's what I get for using a source-based meme distro while not knowing CMake or C++
12:57 ireallyhateirc a "clean" package is one that removes all bundled libraries and then adds corresponding packages for the libs
12:57 MTDiscord      <rollerozxa> if you're on a meme distro then it should be available in the MemeSSL fork of OpenSSL
12:58 ireallyhateirc but if there's no upstream to take the "library" from, and it was a forked version simply extracted from Minetest's source tree, then there's no point of debundling that
12:59 ireallyhateirc I think I found it?
12:59 ireallyhateirc https://github.com/openssl/openssl/blob/master/crypto/sha/sha256.c
13:00 MTDiscord      <rollerozxa> > SHA256 low level APIs are deprecated for public use, but still ok for internal use.
13:00 MTDiscord      <rollerozxa> wonder if it's still exposed in their public headers
13:10 ireallyhateirc well, if it's for internal use only then I guess debundling the lib delivered in Minetest makes no sense
13:11 ireallyhateirc because I can't expect it to be stable if it's for internal use only
19:02 sfan5          you found out already but I'll confirm it: lib/sha256 has no direct upstream and cannot be debundled
19:05 ireallyhateirc thanks
19:06 ireallyhateirc catch2 should be fine though?
19:08 ireallyhateirc it looks for it in a subdirectory though and I'd like to use a package provided by my distro instead
19:09 ireallyhateirc so I'd like to know what should I use instead of this "add_subdirectory(lib/catch2)"
19:12 MTDiscord      <rollerozxa> catch2 is used for benchmarks, unless you for some reason wanna build the benchmarks with the package it won't make it into the final build
19:28 ireallyhateirc adding upstream catch2 v3-something breaks compilation even when benchmarks are disabled
19:29 ireallyhateirc I'll just ignore that since benchmarks are not needed