scala-native-bindgen
scala-native-bindgen copied to clipboard
[WIP] Run tests with valgrind
Closes #84
I am not satisfied with the implementation because memory checks are executed with regular tests and it take a lot of time.
I did not find a way to filter tests by substring (there is testOnly but does not allow to exclude tests)
I am not sure whether I should move them to separate test class, it feels like they fit to BindgenSpec.
We could run the checks in a separate build in the matrix, which only runs the tests that exercise scala-native-bindgen. When the bindings get added we can also use those to test with valgrind.
I updated scripts for travis such that it runs memory checks only in build with llvm 5.0. Not sure if I did it right because I added sbt command alias that includes all tests except memory tests:
addCommandAlias(
"verifyWithoutMemoryChecks",
"; ^test:compile ; " +
"^testOnly -- -z \"should exist\" -z \"correct bindings\" ; " +
"^scripted ; " +
"docs/makeSite")
So when new tests are added verifyWithoutMemoryChecks should be updated.
How about using ScalaTest tags? https://alvinalexander.com/scala/scalatest-mark-tests-tags-to-include-exclude-sbt