Some random thoughts on what a decent test environment would need for us to have some kick ass testing.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env escript | |
%% -*- erlang -*- | |
%%! -pa ./src/couchdb -sasl errlog_type error -boot start_sasl -noshell | |
%% | |
main(_) -> | |
code:add_pathz("src/couchdb"), | |
application:load(crypto), | |
crypto:start(), | |
etap:plan(unknown), | |
case (catch test()) of |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/.gitignore b/.gitignore | |
index ea1f975..70788fa 100644 | |
--- a/.gitignore | |
+++ b/.gitignore | |
@@ -1,3 +1,5 @@ | |
+ | |
+# copied from jChirs .gitignore | |
*.beam | |
*.gz | |
*.tpl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# Based on the Notifier example from tutorial | |
# See: http://trac.dbzteam.org/pyinotify/wiki/Tutorial | |
import optparse as op | |
import Queue | |
import subprocess as sp | |
import time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Just drop this in /etc/couchdb/local.d/ and then | |
; start CouchDB normally. | |
; Here couch_node can be anything as long as it's uniq. | |
[os_daemons] | |
couch_node = /Users/davisp/tmp/couch-node.js | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make will use environment variables and set variables that you | |
# specify on the command line. The example below, VAR1 is an enviornment | |
# variable and VAR2 is set from the command line. | |
# | |
# $ VAR1=foo make VAR2=bar | |
# foo | |
# bar | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <fcntl.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <sys/mman.h> | |
#include <sys/time.h> | |
#define SAMPLES 10000 | |
int | |
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ | |
/* Convert latitude/longitude <=> OS National Grid Reference points (c) Chris Veness 2005-2010 */ | |
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ | |
/* | |
* convert geodesic co-ordinates to OS grid reference | |
*/ | |
function LatLongToOSGrid(p) { | |
var lat = p.lat.toRad(), lon = p.lon.toRad(); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PreCommDict = dict:from_list(PreCommitFailures), | |
{_, _, Tr} = lists:foldl(fun(#doc{id=Id,revs={Pos, RevIds}},{RidRevs,RCommitResults,Acc}) -> | |
DocKey = {Id, {Pos, RevIds}}, | |
case lists:keyfind(DocKey,1,RCommitResults) of | |
false -> | |
case dict:find(DocKey,PreCommDict) of | |
error -> | |
{_, GoodVal} = lists:keyfind(DocKey,1,RidRevs), | |
{lists:delete(DocKey,RidRevs), RCommitResults, [GoodVal | Acc]}; | |
{ok, PCommFailVal} -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
import time | |
import uuid | |
import couchdbkit | |
s = couchdbkit.Server("http://127.0.0.1:15986") | |
ordered_doc_id = 0 |
OlderNewer