Tests: build-examples.sh
Depends: @, @builddeps@
Restrictions: superficial

# We want to build the tests using the shared library, not the static library.
# Hence, unset LIBTRACEFS_STATIC, and add -ltracefs to EXTRA_LIBS.
Test-Command: make LIBTRACEFS_STATIC= EXTRA_LIBS=-ltracefs test && ./utest/trace-utest
Features: test-name=trace-utest
Depends: gcc, libc6-dev, libcunit1-dev, libtracefs-dev, pkgconf
Restrictions: isolation-machine, needs-root

# We allow-stderr here because the test uses valgrind which always outputs
# something to stderr. There are memory leak reports too but it's not realistic
# to fix/suppress them; valgrind is useful to catch more serious errors too so
# I'm including it.
# The tests are the same as the ones for trace-utest, except they run under
# valgrind.
Test-Command: make LIBTRACEFS_STATIC= EXTRA_LIBS=-ltracefs test_mem
Features: test-name=trace-utest-valgrind
Depends: gcc, libc6-dev, libcunit1-dev, libtracefs-dev, pkgconf, valgrind
Restrictions: allow-stderr, isolation-machine, needs-root
