t_libarchive.sh revision 1.4
11.4Smartin# $NetBSD: t_libarchive.sh,v 1.4 2020/06/03 18:07:26 martin Exp $ 21.1Schristos# 31.1Schristos# Copyright (c) 2020 The NetBSD Foundation, Inc. 41.1Schristos# All rights reserved. 51.1Schristos# 61.1Schristos# Redistribution and use in source and binary forms, with or without 71.1Schristos# modification, are permitted provided that the following conditions 81.1Schristos# are met: 91.1Schristos# 1. Redistributions of source code must retain the above copyright 101.1Schristos# notice, this list of conditions and the following disclaimer. 111.1Schristos# 2. Redistributions in binary form must reproduce the above copyright 121.1Schristos# notice, this list of conditions and the following disclaimer in the 131.1Schristos# documentation and/or other materials provided with the distribution. 141.1Schristos# 151.1Schristos# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 161.1Schristos# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 171.1Schristos# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 181.1Schristos# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 191.1Schristos# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 201.1Schristos# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 211.1Schristos# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 221.1Schristos# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 231.1Schristos# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 241.1Schristos# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 251.1Schristos# POSSIBILITY OF SUCH DAMAGE. 261.1Schristos# 271.1Schristos 281.1Schristosatf_test_case libarchive 291.1Schristos 301.1Schristoslibarchive_head() 311.1Schristos{ 321.1Schristos atf_set "descr" "test libarchive" 331.3Smartin atf_set "timeout" "6000" 341.1Schristos} 351.1Schristos 361.1Schristoslibarchive_body() 371.1Schristos{ 381.4Smartin local m=$(( $( sysctl -n hw.usermem64 ) / 1024 / 1024 )) 391.4Smartin if [ $m -lt 400 ]; then 401.4Smartin atf_skip "too few RAM" 411.4Smartin fi 421.1Schristos local d=$(atf_get_srcdir) 431.1Schristos atf_check -s exit:0 -o 'not-match:^Details for failing tests:.*' \ 441.1Schristos "$d/h_libarchive" -r "$d" 451.1Schristos} 461.1Schristos 471.1Schristosatf_init_test_cases() 481.1Schristos{ 491.1Schristos atf_add_test_case libarchive 501.1Schristos} 51