xref: /freebsd/usr.sbin/pw/tests/helper_functions.shin (revision 0677dfd1c4dadb62482e2c72fa4c6720902128a4)
1# $FreeBSD$
2
3# Workdir to run tests in
4TESTDIR=$(atf_get_srcdir)
5
6# Populate the files pw needs to use into $HOME/etc
7populate_etc_skel() {
8	cp ${TESTDIR}/master.passwd ${HOME} || \
9		atf_fail "Populating master.passwd in ${HOME}"
10	cp ${TESTDIR}/group ${HOME} || atf_fail "Populating group in ${HOME}"
11
12	# Generate the passwd file
13	pwd_mkdb -p -d ${HOME} ${HOME}/master.passwd || \
14		atf_fail "generate passwd from master.passwd"
15}
16