Skip to content

Commit f15fff8

Browse files
committed
native tests: upgrade sci-test
The sci-test project supports testing rewrite-clj when exposed via sci. It has moved from a single-segment namespace to a multi-segment namespace to expose lib under test. Supports use of clj-easy/graal-build-time: #165
1 parent 3d8f28b commit f15fff8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

deps.edn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
:sci-test {:override-deps {org.clojure/clojure {:mvn/version "1.10.3"}}
8888
:extra-paths ["target/generated/sci-test/src"]
8989
:extra-deps {lread/sci-test {:git/url "https://github.com/lread/sci-test.git"
90-
:sha "9fbac1d8d7ef73a35b03446fdf3844c0872d178e"}}}
90+
:sha "db4f6886774e865bd451fc500721d1148a6618b4"}}}
9191

9292
:native-test {:override-deps {org.clojure/clojure {:mvn/version "1.10.3"}}
9393
:extra-paths ["target/generated/graal"]}

script/sci_test_gen_publics.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
:exclude-ns-regexes ["rewrite-clj\\.node\\.coercer" ]
5757
:exclude-var-regexes [".*Node.*"]
5858
:fn-wrappers {'import/fn-out-to-sci-out [".*/print" ".*/print-root"]}}
59-
ns-name "lib-under-sci-test"
59+
ns-name "lib-under-sci-test.defs"
6060
pubs (-> (find-nses opts)
6161
(find-pubs opts))
6262
nses (->> (keys pubs)
@@ -72,7 +72,7 @@
7272
(list (list 'def 'namespaces (gen-sci-ns-map-code pubs opts))))]
7373
(binding [pprint/*print-right-margin* 130
7474
pprint/*print-miser-width* 130]
75-
(let [out-file (io/file "target/generated/sci-test/src" (str (.replace ns-name "-" "_") ".clj"))]
75+
(let [out-file (io/file "target/generated/sci-test/src" (str (string/escape ns-name {\- "_" \. "/"}) ".clj"))]
7676
(io/make-parents out-file)
7777
(io/delete-file out-file true)
7878
(run! #(pprint/pprint % (io/writer out-file :append true)) code)

0 commit comments

Comments
 (0)