summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kpov_judge/util.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/kpov_judge/util.py b/kpov_judge/util.py
index f465329..6d9e085 100644
--- a/kpov_judge/util.py
+++ b/kpov_judge/util.py
@@ -2,7 +2,7 @@ import os
import yaml
def write_default_config(disk, global_params):
- home = '/home/tester'
+ home = '/home/test'
params_file = os.path.join(home, '.kpov_params.yaml')
default_params = {}
for k in [
@@ -14,9 +14,11 @@ def write_default_config(disk, global_params):
disk.write(params_file, yaml.dump(default_params))
disk.chown(1001, 1001, params_file)
+ mydir = os.path.dirname(os.path.abspath(__file__))
# write testing script and helper
for f in ['test_task.py', 'kpov_util.py']:
- src = os.path.join(os.path.dirname(os.path.abspath(__file__)), f)
- dst = os.path.join('/home/tester', f)
+ src = os.path.join(mydir, f)
+ dst = os.path.join('/home/test', f)
disk.write(dst, open(src).read())
- disk.chown(1001, 1001, dst)
+ disk.chmod(0o755, dst)
+ disk.copy_in(os.path.join(mydir, 'random_data'), '/home/test')