[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:
parent
2d684bb385
commit
18f172e80c
17
src/modules/unpackfs/runtests.sh
Normal file
17
src/modules/unpackfs/runtests.sh
Normal 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
|
2
src/modules/unpackfs/tests/1.global
Normal file
2
src/modules/unpackfs/tests/1.global
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
bogus: true
|
2
src/modules/unpackfs/tests/2.global
Normal file
2
src/modules/unpackfs/tests/2.global
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
rootMountPoint: /tmp/unpackfs-test-run-rootdir/
|
2
src/modules/unpackfs/tests/3.global
Normal file
2
src/modules/unpackfs/tests/3.global
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
rootMountPoint: /tmp/unpackfs-test-run-rootdir3/
|
2
src/modules/unpackfs/tests/3.job
Normal file
2
src/modules/unpackfs/tests/3.job
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
unpack: []
|
2
src/modules/unpackfs/tests/4.global
Normal file
2
src/modules/unpackfs/tests/4.global
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
rootMountPoint: /tmp/unpackfs-test-run-rootdir3/
|
4
src/modules/unpackfs/tests/4.job
Normal file
4
src/modules/unpackfs/tests/4.job
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
unpack:
|
||||||
|
- source: .
|
||||||
|
sourcefs: bogus
|
2
src/modules/unpackfs/tests/5.global
Normal file
2
src/modules/unpackfs/tests/5.global
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
rootMountPoint: /tmp/unpackfs-test-run-rootdir3/
|
5
src/modules/unpackfs/tests/5.job
Normal file
5
src/modules/unpackfs/tests/5.job
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
unpack:
|
||||||
|
- source: ./fakesource
|
||||||
|
sourcefs: ext4
|
||||||
|
destination: fakedest
|
2
src/modules/unpackfs/tests/6.global
Normal file
2
src/modules/unpackfs/tests/6.global
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
rootMountPoint: /tmp/unpackfs-test-run-rootdir3/
|
5
src/modules/unpackfs/tests/6.job
Normal file
5
src/modules/unpackfs/tests/6.job
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
unpack:
|
||||||
|
- source: .
|
||||||
|
sourcefs: ext4
|
||||||
|
destination: fakedest
|
2
src/modules/unpackfs/tests/7.global
Normal file
2
src/modules/unpackfs/tests/7.global
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
rootMountPoint: /tmp/unpackfs-test-run-rootdir3/
|
5
src/modules/unpackfs/tests/7.job
Normal file
5
src/modules/unpackfs/tests/7.job
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
unpack:
|
||||||
|
- source: .
|
||||||
|
sourcefs: ext4
|
||||||
|
destination: realdest
|
Loading…
Reference in New Issue
Block a user