Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Changed Clojure version from 1.6.0-master-SNAPSHOT to 1.7.0-master-SNAPSHOT in some examples

...

To reduce the duration of the pseudo-randomly generated generative tests from 60 sec down to 1 sec (for example), edit the file src/scripts/run_tests.clj and change the 60000 number.  Just be careful not to include such changes in any patches you submit.

Run An Individual Test

First, build the latest Clojure without running any tests:

Code Block
languagebash
$ ant jar
# If no compilation errors, 'ant jar' creates clojure.jar in Clojure tree root dir

# Or, if you prefer Maven
$ mvn -Dmaven.test.skip=true package
# If no compilation errors, mvn command above creates target/clojure-1.67.0-master-SNAPSHOT.jar

The commands above build a Clojure jar file, but neither compile nor run the tests.

...

Code Block
# Replace clojure.jar with target/clojure-1.67.0-master-SNAPSHOT.jar if you ran mvn command
$ java -cp test:clojure.jar clojure.main
Clojure 1.67.0-master-SNAPSHOT
;; We're testing with clojure.test 
=> (require 'clojure.test)
nil
;; Load a test file 
user=> (require 'clojure.test-clojure.data)
nil
;; Run it 
user=> (clojure.test/run-tests 'clojure.test-clojure.data)
 
Testing clojure.test-clojure.data
Ran 1 tests containing 17 assertions.
0 failures, 0 errors.
{:type :summary, :pass 17, :test 1, :error 0, :fail 0}