|
18 | 18 | (shell/command "clojure -M:sci-test:gen-reflection" fname)
|
19 | 19 | (status/line :detail fname))
|
20 | 20 |
|
21 |
| -(defn interpret-tests [] |
| 21 | +(defn interpret-tests [exe-fname] |
22 | 22 | (status/line :head "Interpreting tests with sci using natively compiled binary")
|
23 |
| - (let [exe-fname (if (= :win (env/get-os)) |
24 |
| - "target/sci-test-rewrite-clj.exe" |
25 |
| - "target/sci-test-rewrite-clj")] |
26 |
| - (when (not (.exists (io/file exe-fname))) |
27 |
| - (status/die 1 "native image %s not found." exe-fname)) |
28 |
| - (shell/command exe-fname "--file" "script/sci_test_runner.clj" "--classpath" "test"))) |
| 23 | + (when (not (.exists (io/file exe-fname))) |
| 24 | + (status/die 1 "native image %s not found." exe-fname)) |
| 25 | + (shell/command exe-fname "--file" "script/sci_test_runner.clj" "--classpath" "test")) |
29 | 26 |
|
30 | 27 | (defn -main [& args]
|
31 | 28 | (when (main/doc-arg-opt args)
|
32 | 29 | (let [native-image-xmx "6g"
|
33 | 30 | graal-reflection-fname "target/native-image/reflection.json"
|
34 | 31 | target-path "target"
|
35 | 32 | target-exe "sci-test-rewrite-clj"
|
36 |
| - full-target-exe (str (io/file target-path target-exe))] |
| 33 | + full-target-exe (str target-path "/" target-exe (when (= :win (env/get-os)) ".exe"))] |
37 | 34 | (status/line :head "Creating native image for testing via sci")
|
38 | 35 | (status/line :detail "java -version")
|
39 | 36 | (shell/command "java -version")
|
|
53 | 50 | :entry-class "sci_test.main"})))
|
54 | 51 | (status/line :head "build done")
|
55 | 52 | (status/line :detail "built: %s, %d bytes" full-target-exe (.length (io/file full-target-exe)))
|
56 |
| - (interpret-tests))) |
| 53 | + (interpret-tests full-target-exe))) |
57 | 54 | nil)
|
58 | 55 |
|
59 | 56 | (main/when-invoked-as-script
|
|
0 commit comments