blob: aa6ce0c2a02ec447309fc0267d3e821b2a39139e [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "selftest chown"
2LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
3
4LICENSE = "MIT"
5
Andrew Geisslerd1e89492021-02-12 15:35:20 -06006DEPENDS += "coreutils-native"
7
Andrew Geissler82c905d2020-04-13 13:39:40 -05008S = "${WORKDIR}"
9
10inherit useradd allarch
11
12USERADD_PACKAGES = "${PN}"
Patrick Williams213cb262021-08-07 19:21:33 -050013USERADD_PARAM:${PN} = "-u 1234 -M test"
Andrew Geissler82c905d2020-04-13 13:39:40 -050014TESTDIR = "${D}${sysconfdir}/selftest-chown"
15
16do_install() {
17 install -d ${TESTDIR}
18 install -d ${TESTDIR}/dir
19 touch ${TESTDIR}/file
20 ln -s ./file ${TESTDIR}/symlink
Andrew Geisslerd1e89492021-02-12 15:35:20 -060021 install -d ${TESTDIR}/fifotest
22 mkfifo ${TESTDIR}/fifotest/fifo
Andrew Geissler82c905d2020-04-13 13:39:40 -050023
24 chown test:test ${TESTDIR}/file
25 chown -R test:test ${TESTDIR}/dir
26 chown -h test:test ${TESTDIR}/symlink
Andrew Geisslerd1e89492021-02-12 15:35:20 -060027 chown -R test:test ${TESTDIR}/fifotest
Andrew Geissler82c905d2020-04-13 13:39:40 -050028}
29
Patrick Williams213cb262021-08-07 19:21:33 -050030FILES:${PN} = "${sysconfdir}/selftest-chown/*"