Fork me on GitHub
#kaocha
<
2020-04-30
>
salam01:04:20

@dansudol since user.timezone is a java system property, you should be able to set it via the command that starts the kaocha test runner (and the JRE, of course). for example, with the clojure cli, you can run the kaocha test runner with clojure -J-Duser.timezone=UTC -A:test --main kaocha.runner

4
daniel.spaniel02:04:41

sweet .. that worked @abdusalam thanks 🙂

Drew Verlee19:04:58

greetings! Given i have a clojure deps project that references other deps projects e.g the deps looks like

{:deps child-project {:local/root "path/to/child"}}
Can Kaocha effectively run the tests for the parent project and its children? I'm guessing this would look like [parent dir]$ clj -A:all-test and then i would need to tell kaocha about the children somehow. Currently i'm doing this via a makefile where i just cd into each child and run their tests.

Drew Verlee19:04:34

looks like i just use a test.edn file

Drew Verlee20:04:33

err except each project has its own deps file.

tanzoniteblack20:04:35

because deps doesn't allow you to inherit aliases, which is where I assume your test paths are specified, this doesn't work out @drewverlee. At Yummly, we do a similar thing, where we individually run all the tests for each project as separate processes

tanzoniteblack20:04:17

but, if you really wanted to do it all in a single run, you can probably get away with combining all of the test paths in the parent's test alias?

tanzoniteblack20:04:48

you then have to also coordinate any test-only dependencies you might have across all the projects universally

tanzoniteblack20:04:13

we didn't go down that route because coordinating all of them just didn't really seem worth it compared to just running each project's tests separately

Drew Verlee20:04:51

@tanzoniteblack that's really helpful. Thanks. Were probably going to do something similar.

tanzoniteblack20:04:02

@drewverlee, I just open sourced one of our company's libraries you might find helpful. https://github.com/yummly/clj-deps-project-hash We use this to generate a hash of a project's dependencies (library + version) & source files and compare it to known test successes (we store these in DynamoDB). If that particular hash has never been tested, then if it completes we add it to our dynamo table. This way we don't have to re-run the tests for every submodule in our main repo on every build

👍 8