From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Apr 4 23:30:00 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B5D20E42 for ; Thu, 4 Apr 2013 23:30:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 9C0662FF for ; Thu, 4 Apr 2013 23:30:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r34NU0NT099111 for ; Thu, 4 Apr 2013 23:30:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r34NU06T099100; Thu, 4 Apr 2013 23:30:00 GMT (envelope-from gnats) Resent-Date: Thu, 4 Apr 2013 23:30:00 GMT Resent-Message-Id: <201304042330.r34NU06T099100@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Alan Somers Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E7DD8DD0 for ; Thu, 4 Apr 2013 23:21:50 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id D75132C7 for ; Thu, 4 Apr 2013 23:21:50 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r34NLoN0072863 for ; Thu, 4 Apr 2013 23:21:50 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id r34NLoNd072858; Thu, 4 Apr 2013 23:21:50 GMT (envelope-from nobody) Message-Id: <201304042321.r34NLoNd072858@red.freebsd.org> Date: Thu, 4 Apr 2013 23:21:50 GMT From: Alan Somers To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/177641: devel/kyua-cli Kyua (automated testing framework) - Command line interface X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Apr 2013 23:30:00 -0000 >Number: 177641 >Category: ports >Synopsis: devel/kyua-cli Kyua (automated testing framework) - Command line interface >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Apr 04 23:30:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Alan Somers >Release: 10.0-CURRENT >Organization: Spectra Logic >Environment: FreeBSD alans-fbsd10 10.0-CURRENT FreeBSD 10.0-CURRENT #0: Sat Mar 30 20:25:42 UTC 2013 root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 Also tested on 9.1 amd64 and 9.1 i386 >Description: This is the guts of Kyua. It's an automated testing framework designed to replace ATF, but be better in every way. It's portable, but targeted primarily towards the needs of NetBSD. >How-To-Repeat: >Fix: Patch attached with submission follows: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # kyua-cli # kyua-cli/distinfo # kyua-cli/pkg-descr # kyua-cli/Makefile # kyua-cli/files # kyua-cli/files/patch-utils-config-nodes.ipp # kyua-cli/files/patch-utils-config-nodes.cpp # kyua-cli/files/patch-utils-config-tree.cpp # kyua-cli/files/patch-utils-config-tree.ipp # kyua-cli/pkg-plist # echo c - kyua-cli mkdir -p kyua-cli > /dev/null 2>&1 echo x - kyua-cli/distinfo sed 's/^X//' >kyua-cli/distinfo << 'c9ff18b6cae3bacd9b9a2b3a93181575' XSHA256 (kyua-cli-0.6.tar.gz) = b422d63a6db02e806d6da355486dcf6857aa54338d83a0c8b90c7da7dd4f0642 XSIZE (kyua-cli-0.6.tar.gz) = 487249 c9ff18b6cae3bacd9b9a2b3a93181575 echo x - kyua-cli/pkg-descr sed 's/^X//' >kyua-cli/pkg-descr << 'd17a2fa865e8ff2053badf677ddf82ce' XKyua (pronounced Q.A.) is a testing framework for both developers and Xusers. Kyua is different from most other testing frameworks in that it Xputs the end user experience before anything else. There are multiple Xreasons for users to run the tests themselves, and Kyua ensures that Xthey can do so in the most convenient way. X XAt the moment, Kyua is focused on implementing a solid foundation and a Xpowerful command-line tool to run tests implemented with the Automated XTesting Framework (ATF). Later on, Kyua will also provide a set of Xlanguage bindings (C, C++ and shell, at the least) to ease the Ximplementation of test cases in a variety of programming languages. X XIn effect, Kyua is intended to be a replacement for ATF. X XWWW: https://code.google.com/p/kyua/ d17a2fa865e8ff2053badf677ddf82ce echo x - kyua-cli/Makefile sed 's/^X//' >kyua-cli/Makefile << '7d8d1598bbf4040c136306039fea5b38' X# New ports collection makefile for: kyua-cli X# Date created: 27 Mar 2012 X# Whom: Alan Somers X# X# $FreeBSD$ X# X XPORTNAME= kyua-cli XPORTVERSION= 0.6 XCATEGORIES= devel XMASTER_SITES= ${MASTER_SITE_GOOGLE_CODE} XPROJECTHOST= kyua X XMAINTAINER= asomers@freebsd.org XCOMMENT= Kyua (automated testing framework) - Command line interface X XLICENSE= BSD X XLIB_DEPENDS= lutok:${PORTSDIR}/devel/lutok XLIB_DEPENDS+= sqlite3:${PORTSDIR}/databases/sqlite3 XBUILD_DEPENDS= ${LOCALBASE}/libexec/kyua-atf-tester:${PORTSDIR}/devel/kyua-testers XRUN_DEPENDS:= ${BUILD_DEPENDS} X XGNU_CONFIGURE= yes XUSE_PKGCONFIG= yes X XCONFIGURE_ARGS+= --without-doxygen X X# TODO: install the tests, once FreeBSD has a system for ports to install tests XCONFIGURE_ARGS+= --without-atf XPLIST_SUBST+= TESTS="@comment " X XMAN1= kyua-about.1 kyua-config.1 kyua-db-exec.1 kyua-db-migrate.1 XMAN1+= kyua-debug.1 kyua-help.1 kyua-list.1 kyua-report-html.1 XMAN1+= kyua-report.1 kyua-test.1 kyua.1 XMAN5= kyua.conf.5 kyuafile.5 XMAN7= kyua-build-root.7 kyua-test-filters.7 X X.include 7d8d1598bbf4040c136306039fea5b38 echo c - kyua-cli/files mkdir -p kyua-cli/files > /dev/null 2>&1 echo x - kyua-cli/files/patch-utils-config-nodes.ipp sed 's/^X//' >kyua-cli/files/patch-utils-config-nodes.ipp << 'd3870e6e5b236f15c31eaea4d4cfbafe' X--- utils/config/nodes.ipp.orig 2013-03-28 12:56:35.697127706 -0600 X+++ utils/config/nodes.ipp 2013-03-28 12:56:49.139128561 -0600 X@@ -39,6 +39,7 @@ X #include "utils/format/macros.hpp" X #include "utils/optional.ipp" X #include "utils/text/exceptions.hpp" X+#include "utils/units.hpp" X #include "utils/text/operations.ipp" X #include "utils/sanity.hpp" X d3870e6e5b236f15c31eaea4d4cfbafe echo x - kyua-cli/files/patch-utils-config-nodes.cpp sed 's/^X//' >kyua-cli/files/patch-utils-config-nodes.cpp << 'e0cb96d9fc217122a526a427bd641bb9' X--- utils/config/nodes.cpp.old X+++ utils/config/nodes.cpp X@@ -112,11 +112,11 @@ config::detail::inner_node::lookup_ro(const tree_key& key, X return (*child_iter).second; X } else { X PRE(key_pos < key.size() - 1); X- try { X- const inner_node& child = dynamic_cast< const inner_node& >( X- *(*child_iter).second); X- return child.lookup_ro(key, key_pos + 1); X- } catch (const std::bad_cast& e) { X+ const inner_node* child = dynamic_cast< const inner_node* >( X+ (*child_iter).second); X+ if (child != NULL) { X+ return child->lookup_ro(key, key_pos + 1); X+ } else { X throw unknown_key_error( X key, "Cannot address incomplete configuration property '%s'"); X } X@@ -163,21 +163,19 @@ config::detail::inner_node::lookup_rw(const tree_key& key, X } X X if (key_pos == key.size() - 1) { X- try { X- leaf_node& child = dynamic_cast< leaf_node& >( X- *(*child_iter).second); X- return &child; X- } catch (const std::bad_cast& unused_error) { X+ leaf_node* child = dynamic_cast< leaf_node* >((*child_iter).second); X+ if (child != NULL) { X+ return child; X+ } else { X throw value_error(F("Invalid value for key '%s'") % X flatten_key(key)); X } X } else { X PRE(key_pos < key.size() - 1); X- try { X- inner_node& child = dynamic_cast< inner_node& >( X- *(*child_iter).second); X- return child.lookup_rw(key, key_pos + 1, new_node); X- } catch (const std::bad_cast& e) { X+ inner_node* child = dynamic_cast< inner_node* >((*child_iter).second); X+ if (child != NULL) { X+ return child->lookup_rw(key, key_pos + 1, new_node); X+ } else { X throw unknown_key_error( X key, "Cannot address incomplete configuration property '%s'"); X } X@@ -198,13 +196,14 @@ config::detail::inner_node::all_properties(properties_map& properties, X iter != _children.end(); ++iter) { X tree_key child_key = key; X child_key.push_back((*iter).first); X- try { X- leaf_node& child = dynamic_cast< leaf_node& >(*(*iter).second); X- if (child.is_set()) X- properties[flatten_key(child_key)] = child.to_string(); X- } catch (const std::bad_cast& unused_error) { X- inner_node& child = dynamic_cast< inner_node& >(*(*iter).second); X- child.all_properties(properties, child_key); X+ leaf_node* child = dynamic_cast< leaf_node* >((*iter).second); X+ if (child != NULL) { X+ if (child->is_set()) X+ properties[flatten_key(child_key)] = child->to_string(); X+ } else { X+ inner_node* child2 = dynamic_cast< inner_node* >((*iter).second); X+ INV(child2 != NULL); X+ child2->all_properties(properties, child_key); X } X } X } X@@ -261,11 +260,11 @@ config::detail::static_inner_node::define(const tree_key& key, X _children.insert(children_map::value_type(key[key_pos], child_ptr)); X child_ptr->define(key, key_pos + 1, new_node); X } else { X- try { X- static_inner_node& child = dynamic_cast< static_inner_node& >( X- *(*child_iter).second); X- child.define(key, key_pos + 1, new_node); X- } catch (const std::bad_cast& e) { X+ static_inner_node* child = dynamic_cast< static_inner_node* >( X+ (*child_iter).second); X+ if (child != NULL) { X+ child->define(key, key_pos + 1, new_node); X+ } else { X UNREACHABLE; X } X } e0cb96d9fc217122a526a427bd641bb9 echo x - kyua-cli/files/patch-utils-config-tree.cpp sed 's/^X//' >kyua-cli/files/patch-utils-config-tree.cpp << '644c709487c71eed6328ae6d1c770cc6' X--- utils/config/tree.cpp.old X+++ utils/config/tree.cpp X@@ -109,11 +109,10 @@ config::tree::is_set(const std::string& dotted_key) const X const detail::tree_key key = detail::parse_key(dotted_key); X try { X const detail::base_node* raw_node = _root->lookup_ro(key, 0); X- try { X- const leaf_node& child = dynamic_cast< const leaf_node& >( X- *raw_node); X- return child.is_set(); X- } catch (const std::bad_cast& unused_error) { X+ const leaf_node* child = dynamic_cast< const leaf_node* >(raw_node); X+ if (child != NULL) { X+ return child->is_set(); X+ } else { X return false; X } X } catch (const unknown_key_error& unused_error) { X@@ -134,10 +133,10 @@ config::tree::push_lua(const std::string& dotted_key, lutok::state& state) const X { X const detail::tree_key key = detail::parse_key(dotted_key); X const detail::base_node* raw_node = _root->lookup_ro(key, 0); X- try { X- const leaf_node& child = dynamic_cast< const leaf_node& >(*raw_node); X- child.push_lua(state); X- } catch (const std::bad_cast& unused_error) { X+ const leaf_node* child = dynamic_cast< const leaf_node* >(raw_node); X+ if (child != NULL) { X+ child->push_lua(state); X+ } else { X throw unknown_key_error(key); X } X } X@@ -159,10 +158,10 @@ config::tree::set_lua(const std::string& dotted_key, lutok::state& state, X const detail::tree_key key = detail::parse_key(dotted_key); X detail::base_node* raw_node = _root->lookup_rw( X key, 0, detail::new_node< string_node >); X- try { X- leaf_node& child = dynamic_cast< leaf_node& >(*raw_node); X- child.set_lua(state, value_index); X- } catch (const std::bad_cast& unused_error) { X+ leaf_node* child = dynamic_cast< leaf_node* >(raw_node); X+ if (child != NULL) { X+ child->set_lua(state, value_index); X+ } else { X throw value_error(F("Invalid value for key '%s'") % X detail::flatten_key(key)); X } X@@ -182,10 +181,10 @@ config::tree::lookup_string(const std::string& dotted_key) const X { X const detail::tree_key key = detail::parse_key(dotted_key); X const detail::base_node* raw_node = _root->lookup_ro(key, 0); X- try { X- const leaf_node& child = dynamic_cast< const leaf_node& >(*raw_node); X- return child.to_string(); X- } catch (const std::bad_cast& unused_error) { X+ const leaf_node* child = dynamic_cast< const leaf_node* >(raw_node); X+ if (child != NULL) { X+ return child->to_string(); X+ } else { X throw unknown_key_error(key); X } X } X@@ -210,10 +209,10 @@ config::tree::set_string(const std::string& dotted_key, X const detail::tree_key key = detail::parse_key(dotted_key); X detail::base_node* raw_node = _root->lookup_rw( X key, 0, detail::new_node< string_node >); X- try { X- leaf_node& child = dynamic_cast< leaf_node& >(*raw_node); X- child.set_string(raw_value); X- } catch (const std::bad_cast& unused_error) { X+ leaf_node* child = dynamic_cast< leaf_node* >(raw_node); X+ if (child != NULL) { X+ child->set_string(raw_value); X+ } else { X throw value_error(F("Invalid value for key '%s'") % X detail::flatten_key(key)); X } X@@ -247,11 +246,11 @@ config::tree::all_properties(const std::string& dotted_key, X key = detail::parse_key(dotted_key); X raw_node = _root->lookup_ro(key, 0); X } X- try { X- const detail::inner_node& child = X- dynamic_cast< const detail::inner_node& >(*raw_node); X- child.all_properties(properties, key); X- } catch (const std::bad_cast& unused_error) { X+ const detail::inner_node* child = X+ dynamic_cast< const detail::inner_node* >(raw_node); X+ if (child != NULL) { X+ child->all_properties(properties, key); X+ } else { X INV(!dotted_key.empty()); X throw value_error(F("Cannot export properties from a leaf node; " X "'%s' given") % dotted_key); 644c709487c71eed6328ae6d1c770cc6 echo x - kyua-cli/files/patch-utils-config-tree.ipp sed 's/^X//' >kyua-cli/files/patch-utils-config-tree.ipp << '8832030cfc9162a8ea00791d84b9ca06' X--- utils/config/tree.ipp.old X+++ utils/config/tree.ipp X@@ -79,13 +79,13 @@ config::tree::lookup(const std::string& dotted_key) const X { X const detail::tree_key key = detail::parse_key(dotted_key); X const detail::base_node* raw_node = _root->lookup_ro(key, 0); X- try { X- const LeafType& child = dynamic_cast< const LeafType& >(*raw_node); X- if (child.is_set()) X- return child.value(); X+ const LeafType* child = dynamic_cast< const LeafType* >(raw_node); X+ if (child != NULL) { X+ if (child->is_set()) X+ return child->value(); X else X throw unknown_key_error(key); X- } catch (const std::bad_cast& unused_error) { X+ } else { X throw unknown_key_error(key); X } X } X@@ -107,13 +107,13 @@ config::tree::lookup_rw(const std::string& dotted_key) X const detail::tree_key key = detail::parse_key(dotted_key); X detail::base_node* raw_node = _root->lookup_rw( X key, 0, detail::new_node< LeafType >); X- try { X- LeafType& child = dynamic_cast< LeafType& >(*raw_node); X- if (child.is_set()) X- return child.value(); X+ LeafType* child = dynamic_cast< LeafType* >(raw_node); X+ if (child != NULL) { X+ if (child->is_set()) X+ return child->value(); X else X throw unknown_key_error(key); X- } catch (const std::bad_cast& unused_error) { X+ } else { X throw unknown_key_error(key); X } X } X@@ -136,10 +136,10 @@ config::tree::set(const std::string& dotted_key, X const detail::tree_key key = detail::parse_key(dotted_key); X leaf_node* raw_node = _root->lookup_rw(key, 0, X detail::new_node< LeafType >); X- try { X- LeafType& child = dynamic_cast< LeafType& >(*raw_node); X- child.set(value); X- } catch (const std::bad_cast& unused_error) { X+ LeafType* child = dynamic_cast< LeafType* >(raw_node); X+ if (child != NULL) { X+ child->set(value); X+ } else { X throw value_error(F("Invalid value for key '%s'") % X detail::flatten_key(key)); X } 8832030cfc9162a8ea00791d84b9ca06 echo x - kyua-cli/pkg-plist sed 's/^X//' >kyua-cli/pkg-plist << 'b13ea78f7e8b3b16eef55d77ff658cc2' Xbin/kyua Xshare/doc/kyua-cli/AUTHORS Xshare/doc/kyua-cli/COPYING Xshare/doc/kyua-cli/NEWS Xshare/doc/kyua-cli/README Xshare/kyua-cli/examples/Kyuafile.top Xshare/kyua-cli/examples/kyua.conf Xshare/kyua-cli/misc/context.html Xshare/kyua-cli/misc/index.html Xshare/kyua-cli/misc/report.css Xshare/kyua-cli/misc/test_result.html Xshare/kyua-cli/store/migrate_v1_v2.sql Xshare/kyua-cli/store/schema_v2.sql X@dirrm share/kyua-cli/store X@dirrm share/kyua-cli/misc X@dirrm share/kyua-cli/examples X@dirrm share/kyua-cli X@dirrm share/doc/kyua-cli b13ea78f7e8b3b16eef55d77ff658cc2 exit >Release-Note: >Audit-Trail: >Unformatted: