Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/atf/dist/atf-run Pull in post-release fix 3d559...
details: https://anonhg.NetBSD.org/src/rev/d2397b5626ee
branches: trunk
changeset: 758547:d2397b5626ee
user: jmmv <jmmv%NetBSD.org@localhost>
date: Sun Nov 07 17:54:03 2010 +0000
description:
Pull in post-release fix 3d5597b0076ade841abf03fc274da72d17cb3ad6 to resolve
issues with the default NetBSD settings. Tests were producing invalid results
because they were unexpectedly reading the system-wide settings.
diffstat:
external/bsd/atf/dist/atf-run/config_test.cpp | 12 ++++++++++++
external/bsd/atf/dist/atf-run/integration_test.sh | 2 ++
2 files changed, 14 insertions(+), 0 deletions(-)
diffs (49 lines):
diff -r 2eedc8f907d0 -r d2397b5626ee external/bsd/atf/dist/atf-run/config_test.cpp
--- a/external/bsd/atf/dist/atf-run/config_test.cpp Sun Nov 07 17:51:52 2010 +0000
+++ b/external/bsd/atf/dist/atf-run/config_test.cpp Sun Nov 07 17:54:03 2010 +0000
@@ -27,7 +27,9 @@
// IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
+#include "atf-c++/detail/env.hpp"
#include "atf-c++/detail/test_helpers.hpp"
+#include "atf-c++/config.hpp"
#include "atf-c++/macros.hpp"
#include "config.hpp"
@@ -37,6 +39,14 @@
using atf::tests::vars_map;
+namespace atf {
+namespace config {
+
+void __reinit(void);
+
+} // namespace config
+} // namespace atf
+
// -------------------------------------------------------------------------
// Tests for the "config" parser.
// -------------------------------------------------------------------------
@@ -351,6 +361,8 @@
ATF_TEST_CASE(read_config_files_none);
ATF_TEST_CASE_HEAD(read_config_files_none) {}
ATF_TEST_CASE_BODY(read_config_files_none) {
+ atf::env::set("ATF_CONFDIR", ".");
+ atf::config::__reinit();
ATF_REQUIRE(vars_map() == impl::read_config_files("test-suite"));
}
diff -r 2eedc8f907d0 -r d2397b5626ee external/bsd/atf/dist/atf-run/integration_test.sh
--- a/external/bsd/atf/dist/atf-run/integration_test.sh Sun Nov 07 17:51:52 2010 +0000
+++ b/external/bsd/atf/dist/atf-run/integration_test.sh Sun Nov 07 17:54:03 2010 +0000
@@ -29,6 +29,8 @@
create_atffile()
{
+ ATF_CONFDIR="$(pwd)"; export ATF_CONFDIR
+
cat >Atffile <<EOF
Content-Type: application/X-atf-atffile; version="1"
Home |
Main Index |
Thread Index |
Old Index