scala-native-bindgen icon indicating copy to clipboard operation
scala-native-bindgen copied to clipboard

[WIP] Run tests with valgrind

Open kornilova203 opened this issue 7 years ago • 3 comments

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.

kornilova203 avatar Jul 05 '18 18:07 kornilova203

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.

jonas avatar Jul 06 '18 13:07 jonas

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.

kornilova203 avatar Jul 13 '18 11:07 kornilova203

How about using ScalaTest tags? https://alvinalexander.com/scala/scalatest-mark-tests-tags-to-include-exclude-sbt

jonas avatar Jul 13 '18 21:07 jonas