Example on how to run Hyperfiddle rcf tests with the poly
tool.
I figured out that I could run the tests from the development project with clojure -M:poly test :dev project:dev
. I then created deps-rcf.edn
and deps-261.edn
and tested both with the same statement by first copying them to deps.edn
. I had to add hyperfiddle/rcf
+ slf4j
to bases/empty/deps.edn
for the poly261
project to work. I also removed "src" from :extra-paths
in the :test
alias in bases/rcf/deps.edn
, because it wasn't needed.
With these changes, the workspace (using the original deps.edn
file) behaves like this:
- I can run the
rcf
project withclojure -M:poly test project:rcf
. - I can run the
poly261
project withclojure -M:poly test project:poly261
. - If I run both
rcf
andpoly261
withclojure -M:poly test :all
, thenrfc
works, butpoly261
fails. This is the same behaviour I had before the changes, see issue 261. - If I run both using the polylith-external-test-runner then I can run tests for both projecs with
clojure -M:poly test :all
!
This workspace has been cloned and slightly modified from Poly 261 - Classpath stability for tests:
- Renamed the
issue-261
base toempty
. - Don't include
sqldb
as a dependency fromempty
in itsdeps.edn
. - Changed top namespace from
poly-rcf.rcf
topoly-rcf
. - Made sure all bricks live in the correct namespace (the
rcf
base needed one extrarcf
directory). - Use the latest version of the poly tool, in the
:poly
alias in ./deps.edn. - Removed unused
resources
and references to projecttest
directories. - Added hyperfiddle/rcf + slf4j to
bases/empty/deps.edn
. - Added the
monolith
directory, so that we can execute the code as a monolith withclj -X:test
.