2 # Automated Testing Framework (atf)
4 # Copyright (c) 2007 The NetBSD Foundation, Inc.
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted provided that the following conditions
10 # 1. Redistributions of source code must retain the above copyright
11 # notice, this list of conditions and the following disclaimer.
12 # 2. Redistributions in binary form must reproduce the above copyright
13 # notice, this list of conditions and the following disclaimer in the
14 # documentation and/or other materials provided with the distribution.
16 # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
17 # CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
18 # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19 # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 # IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
21 # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
23 # GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25 # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
26 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
27 # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 echo "info: ${class}, $*"
38 default_info_start_hook "${@}"
41 default_info_start_hook()
43 atf_tps_writer_info "atf.version" $(atf-version | head -n 1)
45 atf_tps_writer_info "tests.root" $(pwd)
47 atf_tps_writer_info "time.start" $(date)
49 atf_tps_writer_info "uname.sysname" $(uname -s)
50 atf_tps_writer_info "uname.nodename" $(uname -n)
51 atf_tps_writer_info "uname.release" $(uname -r)
52 atf_tps_writer_info "uname.version" $(uname -v)
53 atf_tps_writer_info "uname.machine" $(uname -m)
55 # Add all the environment variables to the report. We have to be
56 # careful with those that span over multiple lines; otherwise their
57 # values could be printed as multiple different variables (one per
58 # line), which is incorrect.
64 while [ ${#} -gt 0 ]; do
65 if echo "${1}" | grep '^[a-zA-Z0-0_][a-zA-Z0-9_]*=' >/dev/null; then
66 atf_tps_writer_info "env" "${val}"
73 atf_tps_writer_info "env" "${val}"
79 default_info_end_hook "${@}"
82 default_info_end_hook()
84 atf_tps_writer_info "time.end" $(date)
87 sitehooks=$(atf-config -t atf_confdir)/atf-run.hooks
88 userhooks=${HOME}/.atf/atf-run.hooks
89 [ -f ${sitehooks} ] && . ${sitehooks}
90 [ -f ${userhooks} ] && . ${userhooks}
94 # vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4