summaryrefslogtreecommitdiff
path: root/funcs.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-04-09 09:21:32 +0300
committerLars Wirzenius <liw@liw.fi>2020-04-09 09:21:32 +0300
commitef0aa4ca8531db4be89d49db1861cb834749145a (patch)
tree812c7f3987651a7ddc67ef616002d8a2779a970c /funcs.py
parent7bf9d733d564a8961495d5d1517239f44a76e9f8 (diff)
downloadick-contractor-ef0aa4ca8531db4be89d49db1861cb834749145a.tar.gz
Add: step to copy file from source tree
This will be used for copying pre-built worker images.
Diffstat (limited to 'funcs.py')
-rw-r--r--funcs.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/funcs.py b/funcs.py
index 931ce4a..3c1c3c9 100644
--- a/funcs.py
+++ b/funcs.py
@@ -55,9 +55,15 @@ def create_file(ctx, filename=None):
f.write(get_file(filename))
+# Copy a file from srcdir.
+def copy_file_from_srcdir(ctx, filename=None):
+ shutil.copy(os.path.join(srcdir, './' + filename), '.')
+
+
# Check that the subprocess we last ran ended with the expected exit
# code.
def exit_code_is(ctx, exit_code=None):
+ print(ctx.as_dict())
assert_eq(ctx['exit'], int(exit_code))