Index: tests/pybin/settings.py
===================================================================
--- tests/pybin/settings.py	(revision d65f92c77f5cc157071fd474ca2ad557b54f447b)
+++ tests/pybin/settings.py	(revision 5c4a473263a1f2ef808350180716b59825140af6)
@@ -4,5 +4,8 @@
 from . import tools
 
+global original_path
+
 try :
+	original_path = os.getcwd()
 	testpath = os.path.dirname(os.path.abspath(os.path.join(os.getcwd(), sys.argv[0])))
 	sys.path.append(testpath)
@@ -118,5 +121,9 @@
 	global timeout
 	global output_width
+<<<<<<< HEAD
 	global distcc
+=======
+	global archive
+>>>>>>> master
 
 	dry_run      = options.dry_run
@@ -128,5 +135,9 @@
 	timeout      = Timeouts(options.timeout, options.global_timeout)
 	output_width = 24
+<<<<<<< HEAD
 	distcc       = "DISTCC_CFA_PATH=~/.cfadistcc/%s/cfa" % tools.config_hash()
+=======
+	archive      = os.path.abspath(os.path.join(original_path, options.archive_errors)) if options.archive_errors else None
+>>>>>>> master
 
 	if distribute and not os.environ.get('DISTCC_LOG'):
Index: tests/pybin/tools.py
===================================================================
--- tests/pybin/tools.py	(revision d65f92c77f5cc157071fd474ca2ad557b54f447b)
+++ tests/pybin/tools.py	(revision 5c4a473263a1f2ef808350180716b59825140af6)
@@ -2,4 +2,5 @@
 import argparse
 import contextlib
+import datetime
 import fileinput
 import multiprocessing
@@ -289,4 +290,10 @@
 	return out.strip()
 
+# get pretty string for time of day
+def pretty_now():
+	ts = time.time()
+	print(ts, file=sys.stderr)
+	return datetime.datetime.fromtimestamp(ts).strftime('%Y-%m-%d_%H:%M:%S')
+
 # check if arguments is yes or no
 def yes_no(string):
@@ -320,4 +327,21 @@
 	return sh('gdb', '-n', path, core, '-batch', '-x', cmd, output_file=subprocess.PIPE)
 
+def core_archive(dst, name, exe):
+	# Get the files to copy
+	core = os.path.join(os.getcwd(), "core" )
+
+	# Uncomment if we want timestamps on coredumps
+	# dst  = os.path.join(dst, "%s_%s" % (name, pretty_now()))
+
+	# make a directory for this test
+	mkdir(os.path.join(dst, "dir"))
+
+	# moves the files
+	mv( core, os.path.join(dst, "core" ) )
+	mv( exe , os.path.join(dst, name   ) )
+
+	# return explanatory test
+	return "Archiving %s (executable and core) to %s" % (os.path.relpath(exe, settings.BUILDDIR), os.path.relpath(dst, settings.original_path))
+
 class Timed:
     def __enter__(self):
