summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kpov_judge/tasks/copy_rename_20_files_tail_env/task.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py b/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py
index 25243c5..0b4bcff 100644
--- a/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py
+++ b/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py
@@ -238,17 +238,21 @@ def task_check(results, params):
linknames.append("".join([ r.choice("123456789abcdefghijk") for j in xrange(8)]))
print( results['grep_mama'])
print( results['grep_napake'])
- for i in dirnames + linknames:
- if results['grep_napake'].find(i) < 0:
+ for i in dirnames + linknames + papa_fnames:
+ if (i not in papa_fnames) and results['grep_napake'].find(i) < 0:
task3_ok = False
if results['grep_mama'].find(i) >= 0:
task3_ok = False
for i in papa_fnames:
- if results['grep_napake'].find(i) < 0:
+ if results['grep_napake'].find(i) >= 0:
task3_ok = False
if results['grep_mama'].find(i) >= 0:
task3_ok = False
-
+ for i in mama_fnames:
+ if results['grep_mama'].find(i) < 0:
+ task3_ok = False
+ if task3_ok:
+ score += 2
# sledenje syslog
print( results['syslog_start_time'])
print( results['syslog_result'])
@@ -280,7 +284,7 @@ def prepare_disks(templates, params):
d.touch(fname)
d.chown("student", "student", fname)
d.mkdir(params['mv_dst_dir'])
- d.chown(params['mv_dst_dir'])
+ d.chown("student", 'student', params['mv_dst_dir'])
# grep mama
# mama fnames
d.mkdir('/home/student/grep_test_dir')