-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added hyperfidle rcf project #7
Conversation
ieugen
commented
Aug 26, 2022
•
edited
Loading
edited
- tests under src do not work
- Once it is done, should cover How to run rcf tests in a polylith project? hyperfiddle/rcf#62
Output is bellow.
|
Standalone kaocha in rcf base works as expected:
|
It seems tests are not found / reported by polylith-kaocha even though they are run. |
Test plan for standalone kaocha in bases/rcf is bellow. clojure -M:itest-runner --print-test-plan
{:kaocha.test-plan/tests
({:kaocha.test-plan/tests
({:kaocha.testable/type :kaocha.type/ns,
:kaocha.testable/id :polylith-kaocha.rcf.sample-test,
:kaocha.testable/desc "polylith-kaocha.rcf.sample-test",
:kaocha.ns/name polylith-kaocha.rcf.sample-test,
:kaocha.testable/meta nil,
:kaocha.ns/ns
#object[clojure.lang.Namespace 0x3bd5dff5 "polylith-kaocha.rcf.sample-test"],
:kaocha.test-plan/tests
({:kaocha.var/test
#object[polylith_kaocha.rcf.sample_test$fn__8289 0x2052c49f "polylith_kaocha.rcf.sample_test$fn__8289@2052c49f"],
:kaocha.plugin.randomize/sort-key 1137953475,
:kaocha.testable/meta
{:line 4,
:column 1,
:ns
#object[clojure.lang.Namespace 0x3bd5dff5 "polylith-kaocha.rcf.sample-test"],
:test
#object[polylith_kaocha.rcf.sample_test$fn__8289 0x2052c49f "polylith_kaocha.rcf.sample_test$fn__8289@2052c49f"],
:file "polylith_kaocha/rcf/sample_test.clj",
:name RCF__4},
:kaocha.testable/type :kaocha.type/var,
:kaocha.var/name polylith-kaocha.rcf.sample-test/RCF__4,
:kaocha.var/var #'polylith-kaocha.rcf.sample-test/RCF__4,
:kaocha.testable/desc "RCF__4",
:kaocha.testable/wrap [],
:kaocha.testable/id :polylith-kaocha.rcf.sample-test/RCF__4}),
:kaocha.plugin.randomize/sort-key -1978629519}
{:kaocha.testable/type :kaocha.type/ns,
:kaocha.testable/id :polylith-kaocha.rcf.src-ns,
:kaocha.testable/desc "polylith-kaocha.rcf.src-ns",
:kaocha.ns/name polylith-kaocha.rcf.src-ns,
:kaocha.testable/meta nil,
:kaocha.ns/ns
#object[clojure.lang.Namespace 0x4ed7db72 "polylith-kaocha.rcf.src-ns"],
:kaocha.test-plan/tests
({:kaocha.var/test
#object[polylith_kaocha.rcf.src_ns$fn__8353 0x30ae3c46 "polylith_kaocha.rcf.src_ns$fn__8353@30ae3c46"],
:kaocha.plugin.randomize/sort-key 1076190538,
:kaocha.testable/meta
{:line 4,
:column 1,
:ns
#object[clojure.lang.Namespace 0x4ed7db72 "polylith-kaocha.rcf.src-ns"],
:test
#object[polylith_kaocha.rcf.src_ns$fn__8353 0x30ae3c46 "polylith_kaocha.rcf.src_ns$fn__8353@30ae3c46"],
:file "polylith_kaocha/rcf/src_ns.clj",
:name RCF__4},
:kaocha.testable/type :kaocha.type/var,
:kaocha.var/name polylith-kaocha.rcf.src-ns/RCF__4,
:kaocha.var/var #'polylith-kaocha.rcf.src-ns/RCF__4,
:kaocha.testable/desc "RCF__4",
:kaocha.testable/wrap [],
:kaocha.testable/id :polylith-kaocha.rcf.src-ns/RCF__4}),
:kaocha.plugin.randomize/sort-key -1491989653}
{:kaocha.testable/type :kaocha.type/ns,
:kaocha.testable/id :polylith-kaocha.rcf.test-ns,
:kaocha.testable/desc "polylith-kaocha.rcf.test-ns",
:kaocha.ns/name polylith-kaocha.rcf.test-ns,
:kaocha.testable/meta nil,
:kaocha.ns/ns
#object[clojure.lang.Namespace 0x60a4595e "polylith-kaocha.rcf.test-ns"],
:kaocha.test-plan/tests
({:kaocha.var/test
#object[polylith_kaocha.rcf.test_ns$fn__8321 0x7640a191 "polylith_kaocha.rcf.test_ns$fn__8321@7640a191"],
:kaocha.plugin.randomize/sort-key 1351915108,
:kaocha.testable/meta
{:line 4,
:column 1,
:ns
#object[clojure.lang.Namespace 0x60a4595e "polylith-kaocha.rcf.test-ns"],
:test
#object[polylith_kaocha.rcf.test_ns$fn__8321 0x7640a191 "polylith_kaocha.rcf.test_ns$fn__8321@7640a191"],
:file "polylith_kaocha/rcf/test_ns.clj",
:name RCF__4},
:kaocha.testable/type :kaocha.type/var,
:kaocha.var/name polylith-kaocha.rcf.test-ns/RCF__4,
:kaocha.var/var #'polylith-kaocha.rcf.test-ns/RCF__4,
:kaocha.testable/desc "RCF__4",
:kaocha.testable/wrap [],
:kaocha.testable/id :polylith-kaocha.rcf.test-ns/RCF__4}),
:kaocha.plugin.randomize/sort-key -418356821}),
:kaocha.plugin.randomize/sort-key -686334516,
:kaocha/test-paths ["test" "src"],
:kaocha/ns-patterns [".*"],
:kaocha.filter/skip-meta [:kaocha/skip],
:kaocha.testable/type :kaocha.type/clojure.test,
:kaocha/source-paths ["src"],
:kaocha.testable/desc "unit (clojure.test)",
:kaocha.testable/id :unit}
{:kaocha.test-plan/tests
({:kaocha.test-plan/tests (),
:kaocha.plugin.randomize/sort-key -239665861,
:kaocha.spec.test.check/syms :all-fdefs,
:kaocha.testable/meta nil,
:kaocha.spec.test.check/ns-patterns [".*"],
:kaocha.filter/skip-meta [:kaocha/skip :no-gen],
:kaocha.testable/type :kaocha.type/spec.test.ns,
:kaocha/source-paths ["src"],
:kaocha.ns/ns
#object[clojure.lang.Namespace 0x4ed7db72 "polylith-kaocha.rcf.src-ns"],
:kaocha.testable/desc "polylith-kaocha.rcf.src-ns",
:kaocha.ns/name polylith-kaocha.rcf.src-ns,
:kaocha.testable/id :polylith-kaocha.rcf.src-ns}),
:kaocha.plugin.randomize/sort-key 233207983,
:kaocha.spec.test.check/syms :all-fdefs,
:kaocha.filter/skip-meta [:kaocha/skip :no-gen],
:kaocha.testable/type :kaocha.type/spec.test.check,
:kaocha/source-paths ["src"],
:kaocha.testable/desc
"generative-fdef-checks (clojure.spec.test.check)",
:kaocha.testable/id :generative-fdef-checks}),
:kaocha/fail-fast? false,
:kaocha.filter/focus-meta #{},
:kaocha/color? true,
:num-tests 10000000,
:kaocha/cli-options
{:config-file "tests.edn",
:reporter [kaocha.report/documentation],
:print-test-plan true},
:kaocha.plugin.randomize/seed 1923358333,
:kaocha.plugin.randomize/randomize? true,
:kaocha/plugins
[:kaocha.plugin/randomize
:kaocha.plugin/filter
:kaocha.plugin/capture-output
:kaocha.plugin/cloverage
:kaocha.plugin.alpha/spec-test-check],
:cloverage/opts
{:ns-exclude-regex [],
:text? false,
:exclude-call [],
:lcov? false,
:high-watermark 80,
:fail-threshold 0,
:output "target/coverage",
:low-watermark 50,
:ns-regex [],
:test-ns-regex [],
:summary? true,
:src-ns-path [],
:coveralls? false,
:emma-xml? true,
:html? true,
:nop? false,
:codecov? true},
:kaocha.plugin.capture-output/capture-output? true,
:kaocha/reporter [kaocha.report/documentation]} |
Probably affected by lambdaisland/kaocha#305 . |
I think the direct invocation works because you have I don't think that is being taken into account in polylith so the classloader that polylith-kaocha receives will not have it turned on, so rcf won't generate those statements, so kaocha won't find those clojure.test definitions. Using the same hook you tried using (because it gets executed in the project classloader) you might be able to set that JVM property so when kaocha loads the namespaces it will get taken into account and the statements will be generated. That being said, I think the proper solution is still to open an issue with kaocha so rcf tests get first-class support there either built-in or through a 3rd party plugin. |
See https://github.com/ieugen/poly-rcf as well. |
Thanks for figuring these out and documenting them. I added a link to your repo and this PR in a753ab1. I think since the solution is not closely related to this project, linking to prior art should be sufficient guidance, so I'm closing the PR. |