u1      !"#$%&'()*+,-./0Safe 123456789:;<=289:;<= 123456789:;<=None$I >An attribute for a tag.? An alias for @ with no interesting type.@(The type for constructing HTML. It is a A and B=. Typically the value paramter is '()', in which case use ?.CEscape a URL using % encoding.DGet the value out of an @.E Render some ?.FaTurn a string into a text fragment of HTML, escaping any characters which mean something in HTML.GWTurn a string into an HTML fragment, applying no escaping. Use this function carefully.HNConstruct an Attribute from a key and value string. The value will be escaped.IUGiven a tag name, a list of attributes, and some content HTML, produce some new HTML.JLike I but with no attributes.E>KL?@MNOPQRSCDETFGUVHIJWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~3>?@CDEFGHIJWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|~?>KL?@MNOPQRSCDETFGUVHIJWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~None!"IL7A Var, but where readCVar returns the last cached value6Calculate the difference between two times in seconds.$One way function used for encryptinghGiven a relation and a starting value, find the transitive closure. The resulting list will be a set.Given a relation and a starting list, find a cycle if there is one. The resulting list will be a set, and will contain a cycle (but not necessarily be minimal).0+-None!"$9:;ADILOQRTJ3 None           None !"$09;ITInformation about a test.\A type representing a translation between a value and a string, which can be produced by readShowStringy if the type has both  and  instances. The functions  and 3 should be inverses of each other. The function Z shows a value in a way suitable for humans, and can discard uninteresting information.WThe central type defining a continuous integration system. Usually constructed with  then filled out with other  modifiers such as ovenGit and .The types are: stateG is the base state of the system (think HEAD on the master branch); patch. is a change that is proposed (think a diff); test& is the type of tests that are run.XAll IO operations will be called in a direct subdirectory of the directory you start bake from. In particular: , will always be called single-threaded from  bake-init; , will always be called single-threaded from  bake-update-hash;   will always be called from  bake-extra-hash;   and  will always be called from  bake-test-hash.Get an initial stateVGiven a state, and a set of candiates that have passed, merge to create a new state @Prepare a candidate to be run, produces the tests that must pass  Produce information about a test +Tell an author some information. The first 0 is a subject line, the second an HTML fragment. ^Extra information about a patch, a single line (HTML span), and a longer chunk (HTML block) Default server to useGGiven two patches (first on submitted first) is the first now redundantGiven a  for test~, and a function that when run on a code base returns the list of tests that need running, and a function to populate a  , modify the  with a test type.+Add an additional notification to the list.Produce notifications on stdout5 when users should be notified about success/failure.TThe default oven, which doesn't do anything interesting. Usually the starting point.<Change the number of threads a test requires, defaults to 1.mRecord that a test requires all available threads on a machine, typically used for the build step. Use getNumCapabilities1 to find out how many threads you were allocated.Require the following tests have been evaluated on this machine before this test is run. Typically used to require compilation before running most tests.The action associated with a test.lSet the priority of a test, those with higher priority are run first. Tests have a default priority of 0.Is a particular client capable of running a test. Usually an OS check. To run a test must have all its requirements met. Clients can satisfy a requirement by passing  --provide=... on the command line.VCheck a set of tests is valid - no cycles and no dependencies that cannot be satisfied> !"#$%&'()*+,-./0123456 789:;<=>?6 !"#$%'(*+-.0162345 789:;  !"#$%&'()*+,-./0123456  789:;<=>?None!"2Send notifications using the given SMTP host/port. None$@QConvert a SHA1 obtained from Git into a SHA1. Only done by ovenInit or ovenUpdate Modify an U to work with the Git version control system. Requires the name of the repo (e.g. &https://github.com/ndmitchell/bake.git$) and the name of a branch (e.g. masterJ). You can optionally give a path fragment which is used to clone into.A src/Paths.hs | 11 ++ src/Test.hs | 258 ++++++++++++------------ travis.hs | 4 +- 28 files changed, 1612 insertions(+), 1302 deletions(-)B diff --git a/bake.cabal b/bake.cabal index 1aa1251..785cecc 100755 --- a/bake.cabal +++ b/bake.cabal @@ -1,7 +1,7 @@ cabal-version: >= 1.10 build-type: Simple name: bake -version: 0.1 +version: 0.2C@DEFGHIJABK@DFH C@DEFGHIJABK None!"$Define an oven that allows foo=... annotations to be added to the strings. These can be used to annotate important information, e.g. instead of talking about Git SHA1's, you can talk about  person=SHA1 or  branch=SHA1. An oven suitable for use with < that supersedes patches which have the same pretty name.LM NLM LM N None !"9;<=I;OPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~0QSUWYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~6OPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ None!"$!Oven creation for modules using git with the step strategy. Note that any files not in .gitignore will be removed at each step, so make sure your incremental build-products are properly ignored.!YFunction that does a compile and returns the pieces that should be available at test timeGit repo you are using)Branch used as the initial starting point,Path under which the git will be checked out-.gitignore patterns where build products live Normal oven!! None!"T None!",$ None!"0  None!""#$%&'()"#$%&'()"#$%&'()None !"$LQRTO     6U     "       None!"%&LOT =Are we running in a simulation (don't spawn separate process)The oven under testThe pretty functions -People responsible for overall administration!All the information on disk"BA list of fatal error messages that have been raised by the server#)Latest time of a ping sent by each client$7Questions you have sent to clients and are waiting for.%Pretend the queued is empty&{The target we are working at (some may already be rejected). Note that when restarting, we throw away the rejected ones.&'()*+,-./012345 !"#$%&6789:;<=>?@AB%'()*+,-./012345$&! "#%6789:;<=>?@A ' ()*+,-./01234 5 !"#$%&6789:;<=>?@ABNone!"LC<I can reject the tests rejected because of the given patchesD*I can mark all active patches as plausibleEI can merge all active patchesF(Add in all extra patches that are queuedG-Throw out the patches that have been rejectedCDEFGCDEFGCDEFGNone!"LH2Given a state, figure out what you should do next.IHGiven the passes, and the fails, suggest what you would like to try nextJKLMNOHI'45$&! "#%6789:;JKJKLMNOHINone!"$LQRT PQRSTUVWXYZ[WXYPQRSTUVWXYZ[None!"$L\]^_`abcdefghijklmnopqrstuh\ ]^_`abcdefghijklmnopqrstuNone!"#$LvGet information about a patch*wxyv**wxyvNonez;Age in seconds, will be positive (unless clock adjustments)+9Garbage collect enough files to satisfy the requirements.{?Given a list of directories, find the possible garbage present.|}~z+PMinimum number of bytes you want free on the drive (use 0 if you don't want any)rRatio of the drive you want free, e.g. 0.25 to demand a quarter of the drive free (1 to delete everything you can) Minimum age to delete in seconds!Directories containing Bake stuff{+|}~z+{None!"$T,,,None!"0T-7The entry point to the system. Usually you will define: main = bake myOvenWhere myOvenY defines details about the server. The program deals with command line arguments, run --help for details.'--9-None!"$.This requires a version of cp(. On Windows, you can get that here: 6http://gnuwin32.sourceforge.net/packages/coreutils.htm./0./0./0None1  !"#$%&'()*+,-./01- ! ./0*,+$%)"#&'( !!"#$%&'()*+,-./01234567 8 9 : ; <=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^\]_`abcdefgYh[ijklmnopqrstuvwxyz{|}~\      !"#$%&'()*+,-./01234567\89\:;\]<=>>?@ABCCDEEFGGHIIJKLMNOPQRSTUVWX Y Z [ 8 \ ] ^ _ ` a b c d d e f f g g h h i i j j k l m n o p q r s t u v w x y z { | } ~                                                  !"#$%&'()*+,-../0123456789##::;<=>?@ABCDEFGHIJKLMNOPQRSSTUVWXYZ[\]]^_`abcdefghijklmnopqrstuvwxyz{{|}~Cl1bake-0.5-4f5pJv9l41RDFwFk3MgZc3Development.Bake Paths_bake General.HTML General.ExtraGeneral.DatabaseGeneral.BigStringDevelopment.Bake.Core.TypeDevelopment.Bake.EmailDevelopment.Bake.GitDevelopment.Bake.Pretty Development.Bake.Server.DatabaseDevelopment.Bake.StepGit General.WebDevelopment.Bake.Core.MessageDevelopment.Bake.Core.RunDevelopment.Bake.Core.SendDevelopment.Bake.Server.StoreDevelopment.Bake.Server.Memory Development.Bake.Server.PropertyDevelopment.Bake.Server.BrainDevelopment.Bake.Server.StatsDevelopment.Bake.Server.WebDevelopment.Bake.Server.StartDevelopment.Bake.Core.GCDevelopment.Bake.Core.ClientDevelopment.Bake.Core.ArgsDevelopment.Bake.BuildTestInfoStringy stringyTo stringyFrom stringyPrettyOvenovenInit ovenUpdate ovenPrepare ovenTestInfo ovenNotifyovenPatchExtra ovenServer ovenSupersedePortHostAuthorovenTest ovenNotifyAddovenNotifyStdout defaultOventhreads threadsAlldependrunpriorityrequireovenNotifyEmailSHA1ovenGit ovenPrettyovenPrettyMerge ovenStepGit sendPause sendUnpause sendAddPatch sendDelPatch sendRequeue sendAddSkip sendDelSkip sendSetState startServergarbageCollect startClientbakeovenIncrementalincrementalStartincrementalDonecatchIOversionbindirlibdirdatadir libexecdir sysconfdir getBinDir getLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName AttributeHTMLHTML_baseGHC.BaseMonadMonoidurl_ valueHTML renderHTMLstr_raw_ attribute_tag__tag_ fromAttribute fromHTML_RopeBranchLeaf renderRopenullRopenullHTML escapeHTMLvalidbr_hr_link__style__pre_b_i_html_head_title_body_h1_h2_ul_ol_li_p_table_thead_tr_td_tbody_a__span__p__h2__tr__ol__href_class_name_rel_type_style_id_unlines_commas_ commasLimit_limit_header_ $fNFDataHTML_ $fMonoidHTML_ $fMonoidRope $fNFDataRope $fOrdRope$fEqRope Data.Monoid<>CVardiffTime encryptishtransitiveClosure findCycleWorker cvarCachecvarReal addSeconds relativeTimeshowRelativeTime showUTCTime timeToDate dateToTimereadDateshowDatelogTimetimeInit createDirLock createDirpicktimedtime_timemakeRelativeEx withFileLocknewCVarreadCVar modifyCVar modifyCVar_masterregisterMaster forkSlave newWorkermemoIO0memoIO1 catMaybesSetwhenLeft whenRight retrySleepputBlockcommas commasLimit unwordsLimitlimitmaybe'withs time-1.6.0.1Data.Time.Clock.UTCUTCTime"extra-1.5.1-HeeVckCVl1V9DE6lYqg83ISystem.Time.ExtraSecondsData.Either.Extra eitherToMaybeData.Time.Clock.POSIXgetCurrentTimePredPNullPNotNullPEqPNEqPGtPLtPEqPPLikePAnd PDistinctPOrderPLimitUpd:=Columnscolumns TypeField typeFieldColumn_ColumncolTablecolName colSqlTypeTabletblNametblKeystblCols Uncolumnscolumn_tablecolumnrowidnorowid sqlInsert sqlUpdate sqlDelete sqlSelectsqlEnsureTable sqlUnsafeunupdatedistinct orderDescorderAscnullPlikeP%&&%==%>%<%/=%==%unpred $fFromField()$fColumns(,,,,,,,,)$fColumns(,,,,,,,)$fColumns(,,,,,,)$fColumns(,,,,,)$fColumns(,,,,)$fColumns(,,,) $fColumns(,,) $fColumns(,) $fColumnsOnly$fColumnsColumn $fColumns()$fTypeFieldMaybe$fTypeFieldBool$fTypeFieldUTCTime$fTypeFieldDouble$fTypeFieldInt $fTypeField[] BigStringMemoryFilebigStringFromFilebigStringWithFile writeHandle readHandleunsafeWriteHandleunsafeReadHandlebigStringFromTextbigStringFromStringbigStringToFilebigStringToTextbigStringToStringbigStringWithStringbigStringFromByteStringbigStringToByteStringbigStringBackEndwithBigStringPart$fShowBigString$fNFDataBigString$fMonoidBigStringGHC.ReadReadGHC.ShowShowString validTestsPrettys prettyState prettyPatch prettyTestPointClient fromClientTestfromTestPatch fromPatchState fromState testThreads testAction testRequire testDepend testPrioritytoStatetoPatchtoTesttoClientconcrete$fMonoidTestInfo$fFunctorTestInfo $fStringy[] $fStringy()toSHA1 prettyStat prettyDifffromSHA1 checkSHA1gitInittraced gitPatchExtra reduceStatdiff $fStringySHA1Pretty$fStringyPrettyPatchIdsPatchIdStateIdRunIdPointIdpatchIdspatchIdsSuperset fromPatchIdssaTablesaIdsaStatesaCreatesaPoint saDurationpcTablepcIdpcPatchpcAuthorpcQueuepcStartpcDelete pcSupersedepcReject pcPlausiblepcMergerjTablerjPatchrjTestrjRunptTableptIdptState ptPatchesrnTablernIdrnPointrnTest rnSuccessrnClientrnStart rnDurationtsTabletsPointtsTestskTableskTest skCommentcreatesave $fReadRunId $fShowPatchId $fShowStateId $fShowRunId $fShowPointIdOutput OutputString OutputHTML OutputFile OutputError OutputMissingInputinputURL inputArgs inputBodysendserver exception$fNFDataOutputPingpClientpAuthorpProvide pMaxThreads pNowThreadsAnsweraStdout aDurationaTestsaSuccessQuestion qCandidateqTestqThreadsqClientMessageSetStateAddPatchDelPatchRequeuePauseUnpauseAddSkipDelSkipPingedFinishedquestionanswertoJSONCandidatefromJSONCandidatemessageToInputmessageFromInputquestionToOutput sendMessage$fFromJSONQuestion$fToJSONQuestion $fNFDataPing$fNFDataAnswer$fNFDataQuestion$fNFDataMessagerunningstatepatchtestrunInit runUpdaterunTestrunExtrarunAllUpdateIUStateIUQueueIUStartIUDeleteIUReject IUPlausible IUSupersedeIUMergeSUAddSUDelPURunPPppPatchppRejectppMxStoreconnpathcacheextraCache cachePointId cachePatch cacheState cachePoint cacheSkip cacheAlivecacheSupersetPass StateInfo stCreatedstSource stDuration PatchInfopaAuthorpaQueuedpaStartpaDelete paSupersedepaReject paPlausiblepaMerge PointInfopoTodopoPasspoFailpoTestpaAlivenewCachenewStore storeSavestoreSQL storePoint storeIsPatch storePatch storeStatestoreItemsDate storeSkip storeAlivestoreSupersetPass storeRunListstoreStateList storeUpdatesafelystoreStateFile storeRunFilestoreExtraFile storeExtra storeExtraAdd$fNFDataUpdate $fFromRowPP $fShowStore$fMonoidPointInfo simulatedovenprettysadminsstorefatalclientspausedactiveShowershowLink showPatch showExtrashowTest showTestAt showQuestion showClient showState showCandidateshowTime showThreads ClientInfo ciPingTimeciPingciAliveciTests stateFailure newMemorynotify notifyAdminssummaryshower$fNFDataMemory rejectable plausible mergeable extendActiverestrictActiveoutputbisectexpireprodreactsfailingTestOutputreactupdateStat statHistory statCountstatSumstatMaxrecordedrecordrecordIOstats $fMonoidStatArgs argsStateargsDate argsPatch argsClientargsTestargsRun argsServer argsAdmin argsStatsargsRawweb argsEmptyargs argsFilteradmintemplatefailuresprogress showAnswer rowHistory rowUpdaterowPatch rowClient patchExtra clientChangeinitialiseFake initialisegAge garbageQueryGarbagegPathBakeServerGCAdminViewRunInit RunUpdateRunTestRunExtraportauthortimeouthostnameprovidepingbytesratiodaysdirspasswordfilebakeModebake_check defaultNames