mirror of
https://github.com/troglobit/finit.git
synced 2026-11-09 16:21:24 +00:00
test/rclocal.sh: new test
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
700c32fd73
commit
aeff68b598
3 files changed
+34
No files matched your search
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
# Regression test for basic /etc/rc.local functionality
|
||||
set -eu
|
||||
|
||||
TEST_DIR=$(dirname "$0")
|
||||
#DEBUG=1
|
||||
# shellcheck disable=SC2034
|
||||
RCLOCAL="echo 'KILROY WAS HERE' > /tmp/rclocal"
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
. "$TEST_DIR/lib/setup.sh"
|
||||
|
||||
test_setup()
|
||||
{
|
||||
say "Test start $(date)"
|
||||
}
|
||||
|
||||
test_teardown()
|
||||
{
|
||||
say "Test done $(date)"
|
||||
run "rm -f $SYSROOT/etc/rc.local"
|
||||
}
|
||||
|
||||
sleep 1
|
||||
assert_file_contains /tmp/rclocal "KILROY WAS HERE"
|
||||
|
||||
exit 0
|
||||
Reference in new issue
Block a user