1275988Sngie/* Copyright (c) 2008 The NetBSD Foundation, Inc. 2240116Smarcel * All rights reserved. 3240116Smarcel * 4240116Smarcel * Redistribution and use in source and binary forms, with or without 5240116Smarcel * modification, are permitted provided that the following conditions 6240116Smarcel * are met: 7240116Smarcel * 1. Redistributions of source code must retain the above copyright 8240116Smarcel * notice, this list of conditions and the following disclaimer. 9240116Smarcel * 2. Redistributions in binary form must reproduce the above copyright 10240116Smarcel * notice, this list of conditions and the following disclaimer in the 11240116Smarcel * documentation and/or other materials provided with the distribution. 12240116Smarcel * 13240116Smarcel * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND 14240116Smarcel * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 15240116Smarcel * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 16240116Smarcel * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17240116Smarcel * IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY 18240116Smarcel * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19240116Smarcel * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 20240116Smarcel * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21240116Smarcel * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 22240116Smarcel * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 23240116Smarcel * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 24275988Sngie * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 25240116Smarcel 26240116Smarcel#if !defined(ATF_C_CHECK_H) 27240116Smarcel#define ATF_C_CHECK_H 28240116Smarcel 29240116Smarcel#include <stdbool.h> 30240116Smarcel 31240116Smarcel#include <atf-c/error_fwd.h> 32240116Smarcel 33240116Smarcel/* --------------------------------------------------------------------- 34240116Smarcel * The "atf_check_result" type. 35240116Smarcel * --------------------------------------------------------------------- */ 36240116Smarcel 37240116Smarcelstruct atf_check_result_impl; 38240116Smarcelstruct atf_check_result { 39240116Smarcel struct atf_check_result_impl *pimpl; 40240116Smarcel}; 41240116Smarceltypedef struct atf_check_result atf_check_result_t; 42240116Smarcel 43240116Smarcel/* Construtors and destructors */ 44240116Smarcelvoid atf_check_result_fini(atf_check_result_t *); 45240116Smarcel 46240116Smarcel/* Getters */ 47240116Smarcelconst char *atf_check_result_stdout(const atf_check_result_t *); 48240116Smarcelconst char *atf_check_result_stderr(const atf_check_result_t *); 49240116Smarcelbool atf_check_result_exited(const atf_check_result_t *); 50240116Smarcelint atf_check_result_exitcode(const atf_check_result_t *); 51240116Smarcelbool atf_check_result_signaled(const atf_check_result_t *); 52240116Smarcelint atf_check_result_termsig(const atf_check_result_t *); 53240116Smarcel 54240116Smarcel/* --------------------------------------------------------------------- 55240116Smarcel * Free functions. 56240116Smarcel * --------------------------------------------------------------------- */ 57240116Smarcel 58240116Smarcelatf_error_t atf_check_build_c_o(const char *, const char *, 59240116Smarcel const char *const [], 60240116Smarcel bool *); 61240116Smarcelatf_error_t atf_check_build_cpp(const char *, const char *, 62240116Smarcel const char *const [], 63240116Smarcel bool *); 64240116Smarcelatf_error_t atf_check_build_cxx_o(const char *, const char *, 65240116Smarcel const char *const [], 66240116Smarcel bool *); 67240116Smarcelatf_error_t atf_check_exec_array(const char *const *, atf_check_result_t *); 68240116Smarcel 69275988Sngie#endif /* !defined(ATF_C_CHECK_H) */ 70