( echo "=== Factor Configure Postgresql ===" ; ./factor -e='USING: db.postgresql namespaces memory ; T{ postgresql-db f "localhost" f f f f "postgres" "" } \ postgresql-db set-global save' ; ret=$? ; echo "=== $ret ==="; [ $ret == 0 ] ) &&
( echo "=== Factor Configure Imap ===" ; ./factor -e='USING: imap namespaces memory environment accessors ; T{ imap-settings { host "imap.gmail.com" } } "FACTOR_IMAP_USER" os-env >>email "FACTOR_IMAP_PASSWORD" os-env >>password \ imap-settings set-global save' ; ret=$? ; echo "=== $ret ==="; [ $ret == 0 ] ) &&
( echo "=== Mkdir ===" ; mkdir -p mason/builds ; ret=$? ; echo "=== $ret ==="; [ $ret == 0 ] ) &&
- ( echo "=== Factor tests ===" ; cd mason/builds && ../../factor -e='USING: namespaces tools.test mason.test ; f long-unit-tests-enabled? set-global t skip-mason-benchmarks set-global do-all' < /dev/null | awk 'NR<1000 || /^Loading resource|Unit Test/' ; ret=${PIPESTATUS[0]} ; echo "=== $ret ==="; [ $ret == 0 ]) &&
+ ( echo "=== Factor tests ===" ; cd mason/builds && ../../factor -e='USING: namespaces tools.test mason.test benchmark ; f long-unit-tests-enabled? set-global t benchmarks-disabled? set-global do-all' < /dev/null | awk 'NR<1000 || /^Loading resource|Unit Test/' ; ret=${PIPESTATUS[0]} ; echo "=== $ret ==="; [ $ret == 0 ]) &&
( echo "=== Factor report === " ; cd mason && ../factor -e='USING: mason.config mason.report namespaces ; "." builds-dir [ successful-report ] with-variable' ; ret=$? ; echo "=== $ret ==="; [ $ret == 0 ]) &&
( echo "=== Dump report === " ;[[ "$TRAVIS_OS_NAME" != "osx" ]] && links -dump mason/report || cat mason/report ; ret=$? ; echo "=== $ret ==="; [ $ret == 0 ]) &&
[ ! -s mason/test-all-errors ]
vocabs.hierarchy vocabs.loader ;
IN: benchmark
+SYMBOL: benchmarks-disabled?
+
: run-timing-benchmark ( vocab -- time )
5 swap '[ gc [ _ run ] benchmark ] replicate infimum ;
"benchmark" disk-child-vocab-names [ find-vocab-root ] filter ;
: find-benchmark-vocabs ( -- seq )
- command-line get [ all-benchmark-vocabs ] when-empty ;
+ benchmarks-disabled? get [
+ "benchmarks-disabled? is true, not benchmarking anything!" print
+ { }
+ ] [
+ command-line get [ all-benchmark-vocabs ] when-empty
+ ] if ;
<PRIVATE
help-lint-errors-file
error-dump
- skip-mason-benchmarks get-global [
- f f
- ] [
- "Benchmark errors"
- benchmark-error-vocabs-file
- benchmark-error-messages-file
- error-dump
-
- benchmarks-file eval-file benchmarks-table
- ] if
+ "Benchmark errors"
+ benchmark-error-vocabs-file
+ benchmark-error-messages-file
+ error-dump
+ benchmarks-file eval-file benchmarks-table
] output>array sift
] with-report ;
test-all-vocabs-file
help-lint-vocabs-file
compiler-errors-file
- skip-mason-benchmarks get [ t ] [ benchmark-error-vocabs-file ] if
+ benchmark-error-vocabs-file
} [ eval-file empty? ] all? ;
: success ( -- status )
user-init-errors get-global assoc-empty?
[ f ] [ :user-init-errors t ] if ;
-SYMBOL: skip-mason-benchmarks
-
: do-all ( -- )
f parser-quiet? set-global
f restartable-tests? set-global
[ generate-help ] benchmark html-help-time-file to-file
[ do-tests ] benchmark test-time-file to-file
[ do-help-lint ] benchmark help-lint-time-file to-file
- ! Because of the way mason is written, it expects these files to exist.
- ! So fake them.
- skip-mason-benchmarks get [
- { } benchmarks-file to-file
- benchmark-error-messages-file touch-file
- 0 benchmark-time-file to-file
- ] [
- [ do-benchmarks ] benchmark benchmark-time-file to-file
- ] if
+ [ do-benchmarks ] benchmark benchmark-time-file to-file
do-compile-errors
] with-directory ;