Commit 8a8b0bb0 authored by Kirill Smelkov's avatar Kirill Smelkov

X Split wcfs unit-tests out of wendelin.core functional tests

- it is more clear to run wcfs tests separate
- it was confusing to run wcfs unit tests as part of e.g.
  test.py/fs1-!wcfs (note the "!wcfs" = "non-wcfs")
parent e159a912
...@@ -10,14 +10,17 @@ for kind in ['t', 'fault', 'asan', 'tsan']: ...@@ -10,14 +10,17 @@ for kind in ['t', 'fault', 'asan', 'tsan']:
# test.go unit-tests Go bits in wcfs. # test.go unit-tests Go bits in wcfs.
TestCase('test.go', ['make', 'test.go']) # TODO summaryf=GoTest.summary TestCase('test.go', ['make', 'test.go']) # TODO summaryf=GoTest.summary
# test.py runs unit- and function- tests for WCFS and wendelin.core as a whole. # test.wcfs runs unit tests for WCFS
# matrix: test.wcfs/{fs,zeo,neo}
#
# test.py runs unit- and function- tests for wendelin.core as a whole.
# matrix: test.py/{fs,zeo,neo}-{!wcfs,wcfs} # matrix: test.py/{fs,zeo,neo}-{!wcfs,wcfs}
for stor in ['fs', 'zeo', 'neo']: for stor in ['fs', 'zeo', 'neo']:
envdb = {'WENDELIN_CORE_TEST_DB': '<%s>' % stor}
TestCase('test.wcfs/%s' % stor, ['make', 'test.wcfs'], envadj=envdb, summaryf=PyTest.summary)
for wcfs in [False, True]: for wcfs in [False, True]:
name = 'test.py/%s-%swcfs' % (stor, '' if wcfs else '!') name = 'test.py/%s-%swcfs' % (stor, '' if wcfs else '!')
envadj = { envadj = {'WENDELIN_CORE_VIRTMEM': 'r:wcfs+w:uvmm' if wcfs else 'rw:uvmm'}
'WENDELIN_CORE_TEST_DB': '<%s>' % stor, envadj.update(envdb)
'WENDELIN_CORE_VIRTMEM': 'r:wcfs+w:uvmm' if wcfs else 'rw:uvmm',
}
TestCase(name, ['make', 'test.py'], envadj=envadj, summaryf=PyTest.summary) TestCase(name, ['make', 'test.py'], envadj=envadj, summaryf=PyTest.summary)
...@@ -73,7 +73,7 @@ CFLAGS := -g -Wall -D_GNU_SOURCE -std=gnu99 -fplan9-extensions \ ...@@ -73,7 +73,7 @@ CFLAGS := -g -Wall -D_GNU_SOURCE -std=gnu99 -fplan9-extensions \
# XXX hack ugly # XXX hack ugly
LOADLIBES=lib/bug.c lib/utils.c 3rdparty/ccan/ccan/tap/tap.c LOADLIBES=lib/bug.c lib/utils.c 3rdparty/ccan/ccan/tap/tap.c
TESTS := $(patsubst %.c,%,$(wildcard bigfile/tests/test_*.c)) TESTS := $(patsubst %.c,%,$(wildcard bigfile/tests/test_*.c))
test : test.t test.go test.py test.fault test.asan test.tsan test.vgmem test.vghel test.vgdrd test : test.t test.go test.wcfs test.py test.fault test.asan test.tsan test.vgmem test.vghel test.vgdrd
# TODO move XFAIL markers into *.c # TODO move XFAIL markers into *.c
...@@ -170,8 +170,12 @@ test.vgdrd: $(TESTS:%=%.vgdrdrun) ...@@ -170,8 +170,12 @@ test.vgdrd: $(TESTS:%=%.vgdrdrun)
# run python tests # run python tests
PYTEST_IGNORE := --ignore=3rdparty --ignore=build --ignore=t PYTEST_IGNORE := --ignore=3rdparty --ignore=build --ignore=t
# wcfs unit-tests
test.wcfs : bigfile/_bigfile.so wcfs/wcfs
$(PYTEST) wcfs/
# unit/functional tests for whole wendelin.core
test.py : bigfile/_bigfile.so wcfs/wcfs test.py : bigfile/_bigfile.so wcfs/wcfs
$(PYTEST) $(PYTEST_IGNORE) $(PYTEST) $(PYTEST_IGNORE) --ignore=wcfs
# test.py via Valgrind (very slow) # test.py via Valgrind (very slow)
test.py.vghel: bigfile/_bigfile.so wcfs/wcfs test.py.vghel: bigfile/_bigfile.so wcfs/wcfs
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment