Skip to content

Commit

Permalink
Remove stale references to atf-run and atf-config
Browse files Browse the repository at this point in the history
Fixes #19.
  • Loading branch information
jmmv committed Oct 3, 2014
1 parent d0067cd commit 59df53d
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 21 deletions.
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ STILL UNDER DEVELOPMENT; NOT RELEASED YET.

* Issue #15: Fix atf_utils_{fork,wait} to support nested calls.

* Issue #19: Removed stale references to atf-config and atf-run.


Changes in version 0.20
***********************
Expand Down
5 changes: 0 additions & 5 deletions atf-c++/detail/process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,11 +341,6 @@ impl::child::stderr_fd(void)
void
detail::flush_streams(void)
{
// This is a weird hack to ensure that the output of the parent process
// is flushed before executing a child which prevents, for example, the
// output of the atf-run hooks to appear before the output of atf-run
// itself.
//
// TODO: This should only be executed when inheriting the stdout or
// stderr file descriptors. However, the flushing is specific to the
// iostreams, so we cannot do it from the C library where all the process
Expand Down
4 changes: 2 additions & 2 deletions atf-c++/tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,8 @@ run_tc(tc_vector& tcs, const std::string& tcarg, const atf::fs::path& resfile)
if (!atf::env::has("__RUNNING_INSIDE_ATF_RUN") || atf::env::get(
"__RUNNING_INSIDE_ATF_RUN") != "internal-yes-value")
{
std::cerr << Program_Name << ": WARNING: Running test cases without "
"atf-run(1) is unsupported\n";
std::cerr << Program_Name << ": WARNING: Running test cases outside "
"of kyua(1) is unsupported\n";
std::cerr << Program_Name << ": WARNING: No isolation nor timeout "
"control is being applied; you may get unexpected failures; see "
"atf-test-case(4)\n";
Expand Down
2 changes: 1 addition & 1 deletion atf-c/detail/tp_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ run_tc(const atf_tp_t *tp, struct params *p, int *exitcode)
if (!atf_env_has("__RUNNING_INSIDE_ATF_RUN") || strcmp(atf_env_get(
"__RUNNING_INSIDE_ATF_RUN"), "internal-yes-value") != 0)
{
print_warning("Running test cases without atf-run(1) is unsupported");
print_warning("Running test cases outside of kyua(1) is unsupported");
print_warning("No isolation nor timeout control is being applied; you "
"may get unexpected failures; see atf-test-case(4)");
}
Expand Down
6 changes: 1 addition & 5 deletions atf-sh/libatf-sh.subr
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ _atf_run_tc()
_atf_has_tc "${_tcname}" || _atf_syntax_error "Unknown test case \`${1}'"

if [ "${__RUNNING_INSIDE_ATF_RUN}" != "internal-yes-value" ]; then
_atf_warning "Running test cases without atf-run(1) is unsupported"
_atf_warning "Running test cases outside of kyua(1) is unsupported"
_atf_warning "No isolation nor timeout control is being applied;" \
"you may get unexpected failures; see atf-test-case(4)"
fi
Expand Down Expand Up @@ -742,10 +742,6 @@ main()
done
shift `expr ${OPTIND} - 1`

# First of all, make sure that the source directory is correct. It
# doesn't matter if the user did not change it, because the default
# value may not work. (TODO: It possibly should, even though it is
# not a big deal because atf-run deals with this.)
case ${Source_Dir} in
/*)
;;
Expand Down
4 changes: 2 additions & 2 deletions m4/runtime-tool.m4
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ dnl -----------------------------------------------------------------------
dnl
dnl ATF_RUNTIME_TOOL(varname, description, default)
dnl
dnl Provides a configuration-time environment variable to select a tool
dnl that will be later available through atf-config(1).
dnl Provides a configure-time configuration variable. The value provided
dnl here can later be overriden at run-time via the environment.
dnl
AC_DEFUN([ATF_RUNTIME_TOOL],[
AC_ARG_VAR([$1], [$2])
Expand Down
12 changes: 6 additions & 6 deletions test-programs/result_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

atf_test_case atf_run_warnings
atf_run_warnings_head()
atf_test_case runtime_warnings
runtime_warnings_head()
{
# The fact that this test case is in this test program is an abuse.
atf_set "descr" "Tests that the test case prints a warning because" \
"it is not being run by atf-run"
"it is being run outside of a runtime engine"
}
atf_run_warnings_body()
runtime_warnings_body()
{
unset __RUNNING_INSIDE_ATF_RUN
srcdir="$(atf_get_srcdir)"
for h in $(get_helpers); do
atf_check -s eq:0 -o match:"passed" -e match:"WARNING.*atf-run" \
atf_check -s eq:0 -o match:"passed" -e match:"WARNING.*kyua" \
"${h}" -s "${srcdir}" result_pass
done
}
Expand Down Expand Up @@ -129,7 +129,7 @@ result_exception_body()

atf_init_test_cases()
{
atf_add_test_case atf_run_warnings
atf_add_test_case runtime_warnings
atf_add_test_case result_on_stdout
atf_add_test_case result_to_file
atf_add_test_case result_to_file_fail
Expand Down

0 comments on commit 59df53d

Please sign in to comment.