1      !"#$%&'()*+,-./0 Safe-Inferred C123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrs1t145<=>@ADEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijl>123456798:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrsNone 234:=BEHJKMUuvwxyz{|}~u>u ~}|{zyxwv Safe-Inferred  NoneBE8A Var, but where readCVar returns the last cached value %One way function used for encrypting jGiven 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). .(+None+24BMInformation 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.=     ! "#$%&'()*5     ! "#$%&     !  "#$%&'()*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.+,-+,+,-None2Send notifications using the given SMTP host/port. NoneM./0123456789:;< ./0123456789:.3210/456789:;< None0=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkl$=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\_`ab=>?@ABCDEFGHIJKLMNOP \[ZYXWVUTQRS]^_`abcdefghijkl None !"#$%& !"#$%& !"#$%& Nonem;Age in seconds, will be positive (unless clock adjustments)'9Garbage collect enough files to satisfy the requirements.n?Given a list of directories, find the possible garbage present.opqm'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 stuffn'opqm'n None (This requires a version of cp(. On Windows, you can get that here: 6http://gnuwin32.sourceforge.net/packages/coreutils.htm()*()*()*None , 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.r src/Paths.hs | 11 ++ src/Test.hs | 258 ++++++++++++------------ travis.hs | 4 +- 28 files changed, 1612 insertions(+), 1302 deletions(-)s 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.2 +tuv,wxyz{rs|+tuv,wy +tuv,wxyz{rs|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+}~}~None M...None246B;06None  EJKMN     6  !       None!"EHM =Are we running in a simulation (don't spawn separate process)The oven under testThe pretty functions-People responsible for overall administrationAll the information on diskBA list of fatal error messages that have been raised by the server)Latest time of a ping sent by each client7Questions 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.& !"#$%&'()*+,-./0123% !"#$%&'()*+,-./012   !"#$% &'()*+,-./0123NoneE4<I can reject the tests rejected because of the given patches5*I can mark all active patches as plausible6I can merge all active patches7(Add in all extra patches that are queued8-Throw out the patches that have been rejected456784567845678NoneE92Given a state, figure out what you should do next.:HGiven the passes, and the fails, suggest what you would like to try next;<=>?@9:'=>?@ABCDEFGHIJKLMNO%&'()*+,;<;<=>?@9:None EJKM ABCDEFGHIJKLHIJABCDEFGHIJKLNone EMNOPQRSTUVWXYZ[\]^_`abcdefYM NOPQRSTUVWXYZ[\]^_`abcdefNone EgGet information about a patch/hijg//hijgNone+M07The 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.'klmnopqrstuvwxyz{|}~00k9}|{vtrqoml~wxyzus~pn~p~p0None1  !"#$%&'()*+,-./010 +,-()*/.'!"& #$%  !"#$%&'()*+,-./012345678 9 : ; < = > ? @ A B C DEFGHIJKKLMNNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&&'()*++,--.//01123456789:;<=>?@AAB C D E F G H I I J K L M N O P Q Q R S T U V W W X Y Z [ \ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~    E      !"#$%&'(())*+,-./0123456789:;<=>?@ABBCDEFGHIJKLLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuhimjkl+vw0xyz{|}[~bake-0.4Development.Bake General.HTMLGeneral.Database Paths_bake General.ExtraDevelopment.Bake.Core.TypeDevelopment.Bake.PrettyDevelopment.Bake.Email General.WebDevelopment.Bake.Core.MessageDevelopment.Bake.Core.SendDevelopment.Bake.Core.GCDevelopment.Bake.BuildDevelopment.Bake.GitDevelopment.Bake.StepGitDevelopment.Bake.Core.RunDevelopment.Bake.Core.Client Development.Bake.Server.DatabaseDevelopment.Bake.Server.StoreDevelopment.Bake.Server.Memory Development.Bake.Server.PropertyDevelopment.Bake.Server.BrainDevelopment.Bake.Server.StatsDevelopment.Bake.Server.WebDevelopment.Bake.Server.StartDevelopment.Bake.Core.ArgsTestInfoStringy stringyTo stringyFrom stringyPrettyOvenovenInit ovenUpdate ovenPrepare ovenTestInfo ovenNotifyovenPatchExtra ovenServer ovenSupersedePortHostAuthorovenTest ovenNotifyAddovenNotifyStdout defaultOventhreads threadsAlldependrunpriorityrequire ovenPrettyovenPrettyMergeovenNotifyEmail sendPause sendUnpause sendAddPatch sendDelPatch sendRequeue sendAddSkip sendDelSkip sendSetStategarbageCollectovenIncrementalincrementalStartincrementalDoneSHA1ovenGit ovenStepGit startClient startServerbake Attribute fromAttributeHTMLHTML_RopeLeafBranch renderRopenullRopeurl_ valueHTML renderHTMLnullHTMLstr_raw_ escapeHTMLvalid attribute_tag__tag_br_hr_link__style__pre_b_i_html_head_title_body_h1_h2_ul_li_p_table_thead_tr_td_tbody_a__span__p__h2__tr__href_class_name_rel_type_style_id_unlines_commas_ commasLimit_limit_header_ $fMonadHTML_$fApplicativeHTML_$fFunctorHTML_ $fMonoidHTML_ $fMonoidRope $fOrdRope$fEqRopebase Data.Monoid<>PredPLimitPOrder PDistinctPAndPLikePEqPPLtPGtPNEqPEqPNotNullPNullUpd:=Columnscolumns TypeField typeFieldColumn_ColumncolTablecolName colSqlTypeTabletblNametblKeystblCols Uncolumnscolumn_tablecolumnrowidnorowid sqlInsert sqlUpdate sqlDelete sqlSelectsqlEnsureTable sqlUnsafeunupdatedistinctlimit orderDescorderAscnullPlikeP%&&%==%>%<%/=%==%unpred $fFromField()$fColumns(,,,,,,,,)$fColumns(,,,,,,,)$fColumns(,,,,,,)$fColumns(,,,,,)$fColumns(,,,,)$fColumns(,,,) $fColumns(,,) $fColumns(,) $fColumnsOnly$fColumnsColumn $fColumns()$fTypeFieldMaybe$fTypeFieldBool$fTypeFieldUTCTime$fTypeFieldDouble$fTypeFieldInt $fTypeField[]TFCo:R:Uncolumns(,,,,,,,,)TFCo:R:Uncolumns(,,,,,,,)TFCo:R:Uncolumns(,,,,,,)TFCo:R:Uncolumns(,,,,,)TFCo:R:Uncolumns(,,,,)TFCo:R:Uncolumns(,,,)TFCo:R:Uncolumns(,,)TFCo:R:Uncolumns(,)TFCo:R:UncolumnsOnlyTFCo:R:UncolumnsColumnTFCo:R:Uncolumns()catchIOversionbindirlibdirdatadir libexecdir sysconfdir getBinDir getLibDir getDataDir getLibexecDir getSysconfDirgetDataFileNameCVar encryptishtransitiveClosure findCycleWorker cvarCachecvarReal addSeconds relativeTimeshowRelativeTime showUTCTime timeToDate dateToTimereadDateshowDatelogTimetimeInit createDirLock createDir eitherToMaybepicktimedtime_timemakeRelativeEx withFileLocknewCVarreadCVar modifyCVar modifyCVar_masterregisterMaster forkSlave newWorkermemoIO0memoIO1 catMaybesSetwhenLeft whenRightputBlockcommas commasLimit unwordsLimitmaybe' time-1.4.2Data.Time.Clock.UTCUTCTimeData.Time.ClockgetCurrentTimeGHC.ReadReadGHC.ShowShowGHC.BaseStringPrettys prettyState prettyPatch prettyTestPointClient fromClientTestfromTestPatch fromPatchState fromState testThreads testAction testRequire testDepend testPrioritytoStatetoPatchtoTesttoClientconcrete$fMonoidTestInfo$fFunctorTestInfo $fStringy[] $fStringy()Pretty$fStringyPrettyOutput OutputMissing OutputError OutputFile OutputHTML OutputStringInputinputURL inputArgs inputBodysendserver exception$fNFDataOutputPingpClientpAuthorpProvide pMaxThreads pNowThreadsAnsweraStdout aDurationaTestsaSuccessQuestion qCandidateqTestqThreadsqClientMessageFinishedquestionanswerPingedDelSkipAddSkipUnpausePauseRequeueDelPatchAddPatchSetStatetoJSONCandidatefromJSONCandidatemessageToInputmessageFromInputquestionToOutput sendMessage$fFromJSONAnswer$fToJSONAnswer$fFromJSONQuestion$fToJSONQuestion$fFromJSONMessage$fToJSONMessage $fNFDataPing$fNFDataAnswer$fNFDataQuestion$fNFDataMessagegAge garbageQueryGarbagegPath prettyStat prettyDifffromSHA1sha1gitInittraced gitPatchExtra reduceStatdiff $fStringySHA1statepatchtestrunInit runUpdaterunTestrunExtrarunAllPatchIdsPatchIdStateIdRunIdPointIdpatchIdspatchIdsSuperset fromPatchIdssaTablesaIdsaStatesaCreatesaPoint saDurationpcTablepcIdpcPatchpcAuthorpcQueuepcStartpcDelete pcSupersedepcReject pcPlausiblepcMergerjTablerjPatchrjTestrjRunptTableptIdptState ptPatchesrnTablernIdrnPointrnTest rnSuccessrnClientrnStart rnDurationtsTabletsPointtsTestskTableskTest skCommentcreatesave $fReadRunId $fShowPatchId $fShowStateId $fShowRunId $fShowPointIdUpdatePURunSUDelSUAddIUMerge IUSupersede IUPlausibleIURejectIUDeleteIUStartIUQueueIUStatePPppPatchppRejectppMxStoreconnpathcacheextraCache 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 $fFromRowPP $fShowStore$fMonoidPointInfo simulatedovenprettysadminsstorefatalclientsrunningpausedactiveShowershowLink showPatch showExtrashowTest showTestAt showQuestion showClient showState showCandidateshowTime showThreadsMemory 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 initialiseBakeRunExtraRunTest RunUpdateRunInitViewfileAdminpasswordGCbytesratiodaysdirshostnameprovidepingServerportauthortimeoutbakeModebake_check defaultNames