zealot.factor: Test against the clean branch if we are pushing to master.
parent
411a55314c
commit
ff466b894a
|
@ -1,12 +1,12 @@
|
||||||
! Copyright (C) 2017 Doug Coleman.
|
! Copyright (C) 2017 Doug Coleman.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors arrays bootstrap.image bootstrap.image.upload
|
USING: accessors arrays assocs bootstrap.image
|
||||||
calendar cli.git combinators concurrency.combinators environment
|
bootstrap.image.upload calendar cli.git combinators
|
||||||
formatting fry http.client io io.directories io.launcher
|
concurrency.combinators environment formatting fry http.client
|
||||||
io.pathnames kernel math.parser memory modern.paths namespaces
|
io io.directories io.launcher io.pathnames kernel math.parser
|
||||||
parser.notes prettyprint sequences sequences.extras sets
|
memory modern.paths namespaces parser.notes prettyprint
|
||||||
splitting system system-info threads tools.test
|
sequences sequences.extras sets splitting system system-info
|
||||||
tools.test.private vocabs vocabs.hierarchy
|
threads tools.test tools.test.private vocabs vocabs.hierarchy
|
||||||
vocabs.hierarchy.private vocabs.loader vocabs.metadata zealot ;
|
vocabs.hierarchy.private vocabs.loader vocabs.metadata zealot ;
|
||||||
IN: zealot.factor
|
IN: zealot.factor
|
||||||
|
|
||||||
|
@ -170,6 +170,10 @@ M: windows factor-path "./factor.com" ;
|
||||||
[ "ZEALOT TESTING ROOTS" print flush drop zealot-test-commands ]
|
[ "ZEALOT TESTING ROOTS" print flush drop zealot-test-commands ]
|
||||||
} 2cleave ;
|
} 2cleave ;
|
||||||
|
|
||||||
|
: factor-clean-branch ( -- str )
|
||||||
|
os cpu [ name>> ] bi@ { { CHAR: . CHAR: - } } substitute
|
||||||
|
"-" glue "origin/clean-" prepend ;
|
||||||
|
|
||||||
: vocab-path>vocab ( path -- vocab )
|
: vocab-path>vocab ( path -- vocab )
|
||||||
[ parent-directory ] map
|
[ parent-directory ] map
|
||||||
[ "/" split1 nip ] map
|
[ "/" split1 nip ] map
|
||||||
|
@ -190,8 +194,21 @@ M: windows factor-path "./factor.com" ;
|
||||||
: changed-factor-vocabs-from-master ( -- vocabs )
|
: changed-factor-vocabs-from-master ( -- vocabs )
|
||||||
"HEAD" "origin/master" changed-factor-vocabs ;
|
"HEAD" "origin/master" changed-factor-vocabs ;
|
||||||
|
|
||||||
|
: changed-factor-vocabs-from-clean ( -- vocabs )
|
||||||
|
"HEAD" factor-clean-branch changed-factor-vocabs ;
|
||||||
|
|
||||||
|
: testing-a-branch? ( -- ? )
|
||||||
|
"CI_BRANCH" os-env "master" or
|
||||||
|
"master" = not ;
|
||||||
|
|
||||||
: reject-unloadable-vocabs ( vocabs -- vocabs' )
|
: reject-unloadable-vocabs ( vocabs -- vocabs' )
|
||||||
[ don't-load? ] reject ;
|
[ don't-load? ] reject ;
|
||||||
|
|
||||||
|
! Test changes from a CI_BRANCH against origin/master
|
||||||
|
! Test master against last clean build, e.g. origin/clean-linux-x86-64
|
||||||
: ci-vocabs-to-test ( -- vocabs )
|
: ci-vocabs-to-test ( -- vocabs )
|
||||||
changed-factor-vocabs-from-master reject-unloadable-vocabs ;
|
testing-a-branch? [
|
||||||
|
changed-factor-vocabs-from-master
|
||||||
|
] [
|
||||||
|
changed-factor-vocabs-from-clean
|
||||||
|
] if reject-unloadable-vocabs ;
|
Loading…
Reference in New Issue