kaocha

Official support channel: https://clojureverse.org/c/projects/kaocha
salam 2020-04-30T01:03:20.177800Z

@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

1
daniel.spaniel 2020-04-30T02:10:41.178500Z

sweet .. that worked @abdusalam thanks 🙂

2020-04-30T19:55:58.182600Z

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.

2020-04-30T19:56:34.182800Z

looks like i just use a test.edn file

2020-04-30T20:06:33.183200Z

err except each project has its own deps file.

tanzoniteblack 2020-04-30T20:29:35.184400Z

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

tanzoniteblack 2020-04-30T20:30:17.185300Z

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?

tanzoniteblack 2020-04-30T20:30:48.185900Z

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

tanzoniteblack 2020-04-30T20:31:13.186400Z

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

2020-04-30T20:33:51.188200Z

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

tanzoniteblack 2020-04-30T20:55:02.190400Z

@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

2👍