diff options
author | gasperfele@fri1.uni-lj.si <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2015-02-06 11:24:17 +0000 |
---|---|---|
committer | gasperfele@fri1.uni-lj.si <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2015-02-06 11:24:17 +0000 |
commit | dce4f4a70c6c2e2b585c6e4d3efe5dd5fa2796ec (patch) | |
tree | 1154784981ea3cdd9b89dc1ee918950c9735a955 | |
parent | b5c1a3bd1ff20a8153f1525f373bd0773372547b (diff) |
Finished grep test for task 4; moving on with other tasks.
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@268 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
-rw-r--r-- | kpov_judge/tasks/copy_rename_20_files_tail_env/task.py | 14 |
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') |