head 1.5; access; symbols pkgsrc-2013Q2:1.5.0.2 pkgsrc-2013Q2-base:1.5 pkgsrc-2012Q4:1.4.0.4 pkgsrc-2012Q4-base:1.4 pkgsrc-2012Q3:1.4.0.2 pkgsrc-2012Q3-base:1.4 pkgsrc-2011Q4:1.1.0.2 pkgsrc-2011Q4-base:1.1; locks; strict; comment @# @; 1.5 date 2013.02.23.03.37.40; author jmmv; state dead; branches; next 1.4; 1.4 date 2012.09.07.01.35.54; author jmmv; state Exp; branches; next 1.3; 1.3 date 2012.09.06.02.51.44; author jmmv; state Exp; branches; next 1.2; 1.2 date 2012.02.24.21.07.41; author jmmv; state dead; branches; next 1.1; 1.1 date 2011.10.11.14.53.34; author jmmv; state Exp; branches; next ; desc @@ 1.5 log @Update to 0.6: Experimental version released on February 22nd, 2013. * Issue 36: Changed 'kyua help' to not fail when the configuration file is bogus. Help should always work. * Issue 37: Simplified the syntax() calls in configuration and Kyuafile files to only specify the requested version instead of also the format name. The format name is implied by the file being loaded, so there is no use in the caller having to specify it. The version number of these file formats has been bumped to 2. * Issue 39: Added per-test-case metadata values to the HTML reports. * Issue 40: Rewrote the documentation as manual pages and removed the previous GNU Info document. * Issue 47: Started using the independent testers in the kyua-testers package to run the test cases. Kyua does not implement the logic to invoke test cases any more, which provides for better modularity, extensibility and robustness. * Issue 57: Added support to specify arbitrary metadata properties for test programs right from the Kyuafile. This is to make plain test programs more versatile, by allowing them to specify any of the requirements (allowed architectures, required files, etc.) supported by Kyua. * Reduced automatic screen line wrapping of messages to the 'help' command and the output of tables by 'db-exec'. Wrapping any other messages (specially anything going to stderr) was very annoying because it prevented natural copy/pasting of text. * Increased the granularity of the error codes returned by kyua(1) to denote different error conditions. This avoids the overload of '1' to indicate both "expected" errors from specific subcommands and unexpected errors caused by the internals of the code. The manual now correctly explain how the exit codes behave on a command basis. * Optimized the database schema to make report generation almost instantaneous. * Bumped the database schema to 2. The database now records the metadata of both test programs and test cases generically, without knowledge of their interface. * Added the 'db-migrate' command to provide a mechanism to upgrade a database with an old schema to the current schema. * Removed the GDB build-time configuration variable. This is now part of the kyua-testers package. * Rewrote the Kyuafile parsing code in C++, which results in a much simpler implementation. As a side-effect, this gets rid of the external Lua files required by 'kyua', which in turn make the tool self-contained. * Added caching of various configure test results (particularly in those tests that need to execute a test program) so that cross-compilers can predefine the results of the tests without having to run the executables. @ text @$NetBSD: patch-aa,v 1.4 2012/09/07 01:35:54 jmmv Exp $ Fix build under NetBSD/amd64 1.5.2 Change utils::stream_length() to return a std::size_t instead of a std::streampos. This allows the later comparison against an integer without having to use a cast. This is upstream change: aec91a38b7c91175fb24fee3ea500e3ee6d33efc --- utils/stream.cpp +++ utils/stream.cpp @@@@ -39,10 +39,13 @@@@ /// /// \param is The input stream for which to calculate its length. /// -/// \return The length of the stream. +/// \return The length of the stream. This is of size_t type instead of +/// directly std::streampos to simplify the caller. Some systems do not +/// support comparing a std::streampos directly to an integer (see +/// NetBSD 1.5.x), which is what we often want to do. /// /// \throw std::exception If calculating the length fails due to a stream error. -std::streampos +std::size_t utils::stream_length(std::istream& is) { const std::streampos current_pos = is.tellg(); @@@@ -50,7 +53,7 @@@@ utils::stream_length(std::istream& is) is.seekg(0, std::ios::end); const std::streampos length = is.tellg(); is.seekg(current_pos, std::ios::beg); - return length; + return static_cast< std::size_t >(length); } catch (...) { is.seekg(current_pos, std::ios::beg); throw; --- utils/stream.hpp +++ utils/stream.hpp @@@@ -35,13 +35,14 @@@@ #if !defined(UTILS_STREAM_HPP) #define UTILS_STREAM_HPP +#include #include #include namespace utils { -std::streampos stream_length(std::istream&); +std::size_t stream_length(std::istream&); std::string read_stream(std::istream&); @ 1.4 log @Fix references to upstream revision of the patch. @ text @d1 1 a1 1 $NetBSD: patch-aa,v 1.3 2012/09/06 02:51:44 jmmv Exp $ @ 1.3 log @Fix build under NetBSD 1.5.2. @ text @d1 1 a1 1 $NetBSD$ d3 1 a3 1 Fix build under NetBSD 1.5.2 d9 1 a9 1 This is upstream change: 2a62375a170b4bed0fd760e7c6e8c4d1433da147 @ 1.2 log @Update kyua-cli to 0.3: Experimental version released on February 24th, 2012. * Made the 'test' command record the results of the executed test cases into a SQLite database. As a side effect, 'test' now supports a '--store' option to indicate where the database lives. * Added the 'report' command to generate plain-text reports of the test results stored in the database. The interface of this command is certainly subject to change at this point. * Added the 'db-exec' command to directly interact with the store database. * Issue 28: Added support for the 'require.memory' test case property introduced in ATF 0.15. * Renamed the user-specific configuration file from ~/.kyuarc to ~/.kyua/kyua.conf for consistency with other files stored in the ~/.kyua/ subdirectory. * Switched to use Lutok instead of our own wrappers over the Lua C library. Lutok is just what used to be our own utils::lua module, but is now distributed separately. * Removed the 'Atffile's from the source tree. Kyua is stable enough to generate trustworthy reports, and we do not want to give the impression that atf-run / atf-report are still supported. * Enabled logging to stderr for our own test programs. This makes it slightly easier to debug problems in our own code when we get a failing test. @ text @d1 1 a1 1 $NetBSD: patch-aa,v 1.1 2011/10/11 14:53:34 jmmv Exp $ d3 1 a3 1 Pull up of http://code.google.com/p/kyua/source/detail?r=230 d5 3 a7 2 This fixes the 'configure' stage in, at least, NetBSD/macppc, by preventing an infinite loop that does not allow the package to build. d9 17 a25 5 --- configure.orig 2011-10-11 14:42:18.000000000 +0000 +++ configure @@@@ -3861,8 +3861,7 @@@@ else static void first_pass(void) d27 27 a53 14 - int argc, flag; - char ch; + int argc, ch, flag; char* argv[5]; argc = 4; @@@@ -3890,8 +3889,7 @@@@ first_pass(void) static void second_pass(void) { - int argc, flag; - char ch; + int argc, ch, flag; char* argv[5]; a54 1 argc = 4; @ 1.1 log @Apply patch from http://code.google.com/p/kyua/source/detail?r=230 to fix the build in NetBSD/macppc by allowing the configure script to complete. Reported by Havard Eidnes. @ text @d1 1 a1 1 $NetBSD$ @