[unpackfs] Add tests

- Add global- and job-configurations for test runs.
 - Add a driver script that sets up some assumptions on the host
   system so that the tests can complete.
 - The idea is that these tests together get a decent code-coverage
   for the module.
This commit is contained in:
Adriaan de Groot 2019-01-25 07:20:16 -05:00
parent 2d684bb385
commit 18f172e80c
13 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,17 @@
#! /bin/sh
SRCDIR=$( dirname "$0" )
# For test 3
mkdir /tmp/unpackfs-test-run-rootdir3
# For test 7
mkdir /tmp/unpackfs-test-run-rootdir3/realdest
# Run tests
sh "$SRCDIR/../testpythonrun.sh" unpackfs
# Cleanup test 7
rm -rf /tmp/unpackfs-test-run-rootdir3/realdest
# Cleanup test 3
rmdir /tmp/unpackfs-test-run-rootdir3

View File

@ -0,0 +1,2 @@
---
bogus: true

View File

@ -0,0 +1,2 @@
---
rootMountPoint: /tmp/unpackfs-test-run-rootdir/

View File

@ -0,0 +1,2 @@
---
rootMountPoint: /tmp/unpackfs-test-run-rootdir3/

View File

@ -0,0 +1,2 @@
---
unpack: []

View File

@ -0,0 +1,2 @@
---
rootMountPoint: /tmp/unpackfs-test-run-rootdir3/

View File

@ -0,0 +1,4 @@
---
unpack:
- source: .
sourcefs: bogus

View File

@ -0,0 +1,2 @@
---
rootMountPoint: /tmp/unpackfs-test-run-rootdir3/

View File

@ -0,0 +1,5 @@
---
unpack:
- source: ./fakesource
sourcefs: ext4
destination: fakedest

View File

@ -0,0 +1,2 @@
---
rootMountPoint: /tmp/unpackfs-test-run-rootdir3/

View File

@ -0,0 +1,5 @@
---
unpack:
- source: .
sourcefs: ext4
destination: fakedest

View File

@ -0,0 +1,2 @@
---
rootMountPoint: /tmp/unpackfs-test-run-rootdir3/

View File

@ -0,0 +1,5 @@
---
unpack:
- source: .
sourcefs: ext4
destination: realdest