helper_functions.shin revision 285092
1# $FreeBSD: stable/10/usr.sbin/pw/tests/helper_functions.shin 285092 2015-07-03 14:22:44Z bapt $
2
3# The pw command
4PW="pw -V ${HOME}"
5
6# Workdir to run tests in
7TESTDIR=$(atf_get_srcdir)
8
9# Populate the files pw needs to use into $HOME/etc
10populate_etc_skel() {
11	cp ${TESTDIR}/master.passwd ${HOME} || \
12		atf_fail "Populating master.passwd in ${HOME}"
13	cp ${TESTDIR}/group ${HOME} || atf_fail "Populating group in ${HOME}"
14
15	# Generate the passwd file
16	pwd_mkdb -p -d ${HOME} ${HOME}/master.passwd || \
17		atf_fail "generate passwd from master.passwd"
18}
19