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 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 "=== 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 "=== 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 "=== 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 ]) &&
|
( echo "=== Dump report === " ;[[ "$TRAVIS_OS_NAME" != "osx" ]] && links -dump mason/report || cat mason/report ; ret=$? ; echo "=== $ret ==="; [ $ret == 0 ]) &&
|
||||||
[ ! -s mason/test-all-errors ]
|
[ ! -s mason/test-all-errors ]
|
||||||
|
|
|
@ -6,6 +6,8 @@ sequences tools.profiler.sampling tools.test tools.time
|
||||||
vocabs.hierarchy vocabs.loader ;
|
vocabs.hierarchy vocabs.loader ;
|
||||||
IN: benchmark
|
IN: benchmark
|
||||||
|
|
||||||
|
SYMBOL: benchmarks-disabled?
|
||||||
|
|
||||||
: run-timing-benchmark ( vocab -- time )
|
: run-timing-benchmark ( vocab -- time )
|
||||||
5 swap '[ gc [ _ run ] benchmark ] replicate infimum ;
|
5 swap '[ gc [ _ run ] benchmark ] replicate infimum ;
|
||||||
|
|
||||||
|
@ -16,7 +18,12 @@ IN: benchmark
|
||||||
"benchmark" disk-child-vocab-names [ find-vocab-root ] filter ;
|
"benchmark" disk-child-vocab-names [ find-vocab-root ] filter ;
|
||||||
|
|
||||||
: find-benchmark-vocabs ( -- seq )
|
: 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
|
<PRIVATE
|
||||||
|
|
||||||
|
|
|
@ -123,17 +123,12 @@ IN: mason.report
|
||||||
help-lint-errors-file
|
help-lint-errors-file
|
||||||
error-dump
|
error-dump
|
||||||
|
|
||||||
skip-mason-benchmarks get-global [
|
"Benchmark errors"
|
||||||
f f
|
benchmark-error-vocabs-file
|
||||||
] [
|
benchmark-error-messages-file
|
||||||
"Benchmark errors"
|
error-dump
|
||||||
benchmark-error-vocabs-file
|
|
||||||
benchmark-error-messages-file
|
|
||||||
error-dump
|
|
||||||
|
|
||||||
benchmarks-file eval-file benchmarks-table
|
|
||||||
] if
|
|
||||||
|
|
||||||
|
benchmarks-file eval-file benchmarks-table
|
||||||
] output>array sift
|
] output>array sift
|
||||||
] with-report ;
|
] with-report ;
|
||||||
|
|
||||||
|
@ -143,7 +138,7 @@ IN: mason.report
|
||||||
test-all-vocabs-file
|
test-all-vocabs-file
|
||||||
help-lint-vocabs-file
|
help-lint-vocabs-file
|
||||||
compiler-errors-file
|
compiler-errors-file
|
||||||
skip-mason-benchmarks get [ t ] [ benchmark-error-vocabs-file ] if
|
benchmark-error-vocabs-file
|
||||||
} [ eval-file empty? ] all? ;
|
} [ eval-file empty? ] all? ;
|
||||||
|
|
||||||
: success ( -- status )
|
: success ( -- status )
|
||||||
|
|
|
@ -101,8 +101,6 @@ M: method word-vocabulary "method-generic" word-prop word-vocabulary ;
|
||||||
user-init-errors get-global assoc-empty?
|
user-init-errors get-global assoc-empty?
|
||||||
[ f ] [ :user-init-errors t ] if ;
|
[ f ] [ :user-init-errors t ] if ;
|
||||||
|
|
||||||
SYMBOL: skip-mason-benchmarks
|
|
||||||
|
|
||||||
: do-all ( -- )
|
: do-all ( -- )
|
||||||
f parser-quiet? set-global
|
f parser-quiet? set-global
|
||||||
f restartable-tests? set-global
|
f restartable-tests? set-global
|
||||||
|
@ -114,15 +112,7 @@ SYMBOL: skip-mason-benchmarks
|
||||||
[ generate-help ] benchmark html-help-time-file to-file
|
[ generate-help ] benchmark html-help-time-file to-file
|
||||||
[ do-tests ] benchmark test-time-file to-file
|
[ do-tests ] benchmark test-time-file to-file
|
||||||
[ do-help-lint ] benchmark help-lint-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.
|
[ do-benchmarks ] benchmark benchmark-time-file to-file
|
||||||
! 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-compile-errors
|
do-compile-errors
|
||||||
] with-directory ;
|
] with-directory ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue