summaryrefslogtreecommitdiff
path: root/funcs.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-04-09 18:59:38 +0300
committerLars Wirzenius <liw@liw.fi>2020-04-09 18:59:38 +0300
commit840300655a0bab67c2bfe8243578ee10deb3c822 (patch)
tree188a7a3a00a21ee4f519cc6bc5e469886a3bc6c2 /funcs.py
parent44f50e884d5a4e14c404bf0412b996aa4f3c351c (diff)
downloadick-contractor-840300655a0bab67c2bfe8243578ee10deb3c822.tar.gz
Fix: shut down worker cleanly at end
So that workspace disk gets synced and unmounted cleanly. Otherwise we lose data there.
Diffstat (limited to 'funcs.py')
-rw-r--r--funcs.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/funcs.py b/funcs.py
index 3c1c3c9..64bad4d 100644
--- a/funcs.py
+++ b/funcs.py
@@ -55,6 +55,14 @@ def create_file(ctx, filename=None):
f.write(get_file(filename))
+# Check that a file exists.
+def file_exists(ctx, filename=None):
+ print(os.listdir())
+ print(os.listdir('ws'))
+ print(os.listdir('ws/src'))
+ assert_eq(os.path.exists(filename), True)
+
+
# Copy a file from srcdir.
def copy_file_from_srcdir(ctx, filename=None):
shutil.copy(os.path.join(srcdir, './' + filename), '.')