Module Name:    src
Committed By:   martin
Date:           Wed Jun  3 18:07:26 UTC 2020

Modified Files:
        src/tests/lib/libarchive: t_libarchive.sh

Log Message:
Skip this test on machines where it would cause serious swapping.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libarchive/t_libarchive.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libarchive/t_libarchive.sh
diff -u src/tests/lib/libarchive/t_libarchive.sh:1.3 src/tests/lib/libarchive/t_libarchive.sh:1.4
--- src/tests/lib/libarchive/t_libarchive.sh:1.3	Thu Mar 12 12:57:45 2020
+++ src/tests/lib/libarchive/t_libarchive.sh	Wed Jun  3 18:07:26 2020
@@ -1,4 +1,4 @@
-#       $NetBSD: t_libarchive.sh,v 1.3 2020/03/12 12:57:45 martin Exp $
+#       $NetBSD: t_libarchive.sh,v 1.4 2020/06/03 18:07:26 martin Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -35,6 +35,10 @@ libarchive_head()
 
 libarchive_body()
 {
+	local m=$(( $( sysctl -n hw.usermem64 ) / 1024 / 1024 ))
+	if [ $m -lt 400 ]; then
+		atf_skip "too few RAM"
+	fi
 	local d=$(atf_get_srcdir)
 	atf_check -s exit:0 -o 'not-match:^Details for failing tests:.*' \
 	    "$d/h_libarchive" -r "$d"

Reply via email to