factor: disable benchmarks in a better way to get travis and macs unstuck.
parent
6bbd1c99fb
commit
17b9133a4c
|
@ -50,7 +50,7 @@ script: >
|
|||
( 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 ]
|
||||
|
|
|
@ -6,6 +6,8 @@ sequences tools.profiler.sampling tools.test tools.time
|
|||
vocabs.hierarchy vocabs.loader ;
|
||||
IN: benchmark
|
||||
|
||||
SYMBOL: benchmarks-disabled?
|
||||
|
||||
: run-timing-benchmark ( vocab -- time )
|
||||
5 swap '[ gc [ _ run ] benchmark ] replicate infimum ;
|
||||
|
||||
|
@ -16,7 +18,12 @@ IN: benchmark
|
|||
"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
|
||||
|
||||
|
|
|
@ -123,17 +123,12 @@ IN: mason.report
|
|||
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 ;
|
||||
|
||||
|
@ -143,7 +138,7 @@ IN: mason.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 )
|
||||
|
|
|
@ -101,8 +101,6 @@ M: method word-vocabulary "method-generic" word-prop word-vocabulary ;
|
|||
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
|
||||
|
@ -114,15 +112,7 @@ SYMBOL: skip-mason-benchmarks
|
|||
[ 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 ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue