{"action":"created","comment":{"url":"https://api.github.com/repos/01org/AFT/pulls/comments/76374173","id":76374173,"diff_hunk":"@@ -296,38 +298,34 @@ def _run_tests_on_know_good_image(args, device):\n         config.KNOWN_GOOD_IMAGE_FOLDER,\n         device.model.lower())\n \n-\n-    image = None\n-    if device.model.lower() == \"beagleboneblack\":\n-        image = image_directory_path\n-    elif device.model.lower() == \"edison\":\n-        image = os.path.join(\n-            image_directory_path,\n-            \"ostro-image-edison.ext4\")\n-    else:\n-        image = os.path.join(\n-            image_directory_path,\n-            \"good-image.dsk\")\n-\n     if args.verbose:\n-        print(\"Image file: \" + str(image))\n         print(\"Flashing \" + str(device.name))\n \n-    logger.info(\"Image file: \" + str(image))\n+    work_dir = device.name\n+\n+    # delete previous working directory, if present\n+    if os.path.exists(work_dir):\n+        shutil.rmtree(work_dir)\n \n     try:\n-        working_dir = os.getcwd()\n-        os.chdir(os.path.join(image_directory_path, \"iottest\"))\n \n-        os.chdir(image_directory_path)\n+        files = get_file_list(image_directory_path)\n+\n+        create_work_directory(work_dir)\n+        os.chdir(work_dir)\n+\n+        image = populate_work_directory(work_dir, image_directory_path, files)\n+\n+        if args.verbose:\n+            print(\"Image file: \" + image)\n+        logger.info(\"Image file: \" + str(image))\n \n         device.write_image(image)\n \n         tester = Tester(device)\n         tester.execute()\n-        results = (tester.get_results(), tester.get_results_str())\n \n-        os.chdir(working_dir)\n+        results = (tester.get_results(), tester.get_results_str())\n \n         if not results:","path":"tools/device_configuration_checker.py","position":62,"original_position":62,"commit_id":"77dfda5bf8dbb1ff5512c6ec038c78a38225915a","original_commit_id":"77dfda5bf8dbb1ff5512c6ec038c78a38225915a","user":{"login":"Valtis","id":5112749,"avatar_url":"https://avatars.githubusercontent.com/u/5112749?v=3","gravatar_id":"","url":"https://api.github.com/users/Valtis","html_url":"https://github.com/Valtis","followers_url":"https://api.github.com/users/Valtis/followers","following_url":"https://api.github.com/users/Valtis/following{/other_user}","gists_url":"https://api.github.com/users/Valtis/gists{/gist_id}","starred_url":"https://api.github.com/users/Valtis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Valtis/subscriptions","organizations_url":"https://api.github.com/users/Valtis/orgs","repos_url":"https://api.github.com/users/Valtis/repos","events_url":"https://api.github.com/users/Valtis/events{/privacy}","received_events_url":"https://api.github.com/users/Valtis/received_events","type":"User","site_admin":false},"body":"That's actually a vestigial remnant of previous code - the check is always true right now. I'll remove it ","created_at":"2016-08-26T07:18:53Z","updated_at":"2016-08-26T07:18:53Z","html_url":"https://github.com/01org/AFT/pull/13#discussion_r76374173","pull_request_url":"https://api.github.com/repos/01org/AFT/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/01org/AFT/pulls/comments/76374173"},"html":{"href":"https://github.com/01org/AFT/pull/13#discussion_r76374173"},"pull_request":{"href":"https://api.github.com/repos/01org/AFT/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/01org/AFT/pulls/13","id":82691842,"html_url":"https://github.com/01org/AFT/pull/13","diff_url":"https://github.com/01org/AFT/pull/13.diff","patch_url":"https://github.com/01org/AFT/pull/13.patch","issue_url":"https://api.github.com/repos/01org/AFT/issues/13","number":13,"state":"open","locked":false,"title":"AFT: Use separate working directories for health checks","user":{"login":"Valtis","id":5112749,"avatar_url":"https://avatars.githubusercontent.com/u/5112749?v=3","gravatar_id":"","url":"https://api.github.com/users/Valtis","html_url":"https://github.com/Valtis","followers_url":"https://api.github.com/users/Valtis/followers","following_url":"https://api.github.com/users/Valtis/following{/other_user}","gists_url":"https://api.github.com/users/Valtis/gists{/gist_id}","starred_url":"https://api.github.com/users/Valtis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Valtis/subscriptions","organizations_url":"https://api.github.com/users/Valtis/orgs","repos_url":"https://api.github.com/users/Valtis/repos","events_url":"https://api.github.com/users/Valtis/events{/privacy}","received_events_url":"https://api.github.com/users/Valtis/received_events","type":"User","site_admin":false},"body":"Currently all devices with same type share a working directory. This can\r\ncause various issues and in general makes the process unpredictable.\r\nCreate and populate a separate working directory instead.\r\n\r\nAdditionally, a bug with serial record log renaming was found during testing this (absoulute paths + prefixing file names do not mix well). This has been fixed as well.\r\n\r\nA typo in a helper script was additionally found and fixed.\r\n\r\nSigned-off-by: Erkka Kääriä <erkka.kaaria@intel.com>\r\n","created_at":"2016-08-25T10:08:06Z","updated_at":"2016-08-26T07:18:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8040e79d8f5418a6c5505639db39a1e2c0d7e6b3","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/01org/AFT/pulls/13/commits","review_comments_url":"https://api.github.com/repos/01org/AFT/pulls/13/comments","review_comment_url":"https://api.github.com/repos/01org/AFT/pulls/comments{/number}","comments_url":"https://api.github.com/repos/01org/AFT/issues/13/comments","statuses_url":"https://api.github.com/repos/01org/AFT/statuses/77dfda5bf8dbb1ff5512c6ec038c78a38225915a","head":{"label":"Valtis:checker-working-dir","ref":"checker-working-dir","sha":"77dfda5bf8dbb1ff5512c6ec038c78a38225915a","user":{"login":"Valtis","id":5112749,"avatar_url":"https://avatars.githubusercontent.com/u/5112749?v=3","gravatar_id":"","url":"https://api.github.com/users/Valtis","html_url":"https://github.com/Valtis","followers_url":"https://api.github.com/users/Valtis/followers","following_url":"https://api.github.com/users/Valtis/following{/other_user}","gists_url":"https://api.github.com/users/Valtis/gists{/gist_id}","starred_url":"https://api.github.com/users/Valtis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Valtis/subscriptions","organizations_url":"https://api.github.com/users/Valtis/orgs","repos_url":"https://api.github.com/users/Valtis/repos","events_url":"https://api.github.com/users/Valtis/events{/privacy}","received_events_url":"https://api.github.com/users/Valtis/received_events","type":"User","site_admin":false},"repo":{"id":49057887,"name":"AFT","full_name":"Valtis/AFT","owner":{"login":"Valtis","id":5112749,"avatar_url":"https://avatars.githubusercontent.com/u/5112749?v=3","gravatar_id":"","url":"https://api.github.com/users/Valtis","html_url":"https://github.com/Valtis","followers_url":"https://api.github.com/users/Valtis/followers","following_url":"https://api.github.com/users/Valtis/following{/other_user}","gists_url":"https://api.github.com/users/Valtis/gists{/gist_id}","starred_url":"https://api.github.com/users/Valtis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Valtis/subscriptions","organizations_url":"https://api.github.com/users/Valtis/orgs","repos_url":"https://api.github.com/users/Valtis/repos","events_url":"https://api.github.com/users/Valtis/events{/privacy}","received_events_url":"https://api.github.com/users/Valtis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Valtis/AFT","description":"Automated Flasher Tester","fork":true,"url":"https://api.github.com/repos/Valtis/AFT","forks_url":"https://api.github.com/repos/Valtis/AFT/forks","keys_url":"https://api.github.com/repos/Valtis/AFT/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Valtis/AFT/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Valtis/AFT/teams","hooks_url":"https://api.github.com/repos/Valtis/AFT/hooks","issue_events_url":"https://api.github.com/repos/Valtis/AFT/issues/events{/number}","events_url":"https://api.github.com/repos/Valtis/AFT/events","assignees_url":"https://api.github.com/repos/Valtis/AFT/assignees{/user}","branches_url":"https://api.github.com/repos/Valtis/AFT/branches{/branch}","tags_url":"https://api.github.com/repos/Valtis/AFT/tags","blobs_url":"https://api.github.com/repos/Valtis/AFT/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Valtis/AFT/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Valtis/AFT/git/refs{/sha}","trees_url":"https://api.github.com/repos/Valtis/AFT/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Valtis/AFT/statuses/{sha}","languages_url":"https://api.github.com/repos/Valtis/AFT/languages","stargazers_url":"https://api.github.com/repos/Valtis/AFT/stargazers","contributors_url":"https://api.github.com/repos/Valtis/AFT/contributors","subscribers_url":"https://api.github.com/repos/Valtis/AFT/subscribers","subscription_url":"https://api.github.com/repos/Valtis/AFT/subscription","commits_url":"https://api.github.com/repos/Valtis/AFT/commits{/sha}","git_commits_url":"https://api.github.com/repos/Valtis/AFT/git/commits{/sha}","comments_url":"https://api.github.com/repos/Valtis/AFT/comments{/number}","issue_comment_url":"https://api.github.com/repos/Valtis/AFT/issues/comments{/number}","contents_url":"https://api.github.com/repos/Valtis/AFT/contents/{+path}","compare_url":"https://api.github.com/repos/Valtis/AFT/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Valtis/AFT/merges","archive_url":"https://api.github.com/repos/Valtis/AFT/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Valtis/AFT/downloads","issues_url":"https://api.github.com/repos/Valtis/AFT/issues{/number}","pulls_url":"https://api.github.com/repos/Valtis/AFT/pulls{/number}","milestones_url":"https://api.github.com/repos/Valtis/AFT/milestones{/number}","notifications_url":"https://api.github.com/repos/Valtis/AFT/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Valtis/AFT/labels{/name}","releases_url":"https://api.github.com/repos/Valtis/AFT/releases{/id}","deployments_url":"https://api.github.com/repos/Valtis/AFT/deployments","created_at":"2016-01-05T10:04:45Z","updated_at":"2016-01-14T13:14:16Z","pushed_at":"2016-08-25T13:55:22Z","git_url":"git://github.com/Valtis/AFT.git","ssh_url":"git@github.com:Valtis/AFT.git","clone_url":"https://github.com/Valtis/AFT.git","svn_url":"https://github.com/Valtis/AFT","homepage":null,"size":9086,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":0,"forks":2,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"01org:master","ref":"master","sha":"fb9135325db1d99916f033d136a67cf28affd463","user":{"login":"01org","id":1635439,"avatar_url":"https://avatars.githubusercontent.com/u/1635439?v=3","gravatar_id":"","url":"https://api.github.com/users/01org","html_url":"https://github.com/01org","followers_url":"https://api.github.com/users/01org/followers","following_url":"https://api.github.com/users/01org/following{/other_user}","gists_url":"https://api.github.com/users/01org/gists{/gist_id}","starred_url":"https://api.github.com/users/01org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/01org/subscriptions","organizations_url":"https://api.github.com/users/01org/orgs","repos_url":"https://api.github.com/users/01org/repos","events_url":"https://api.github.com/users/01org/events{/privacy}","received_events_url":"https://api.github.com/users/01org/received_events","type":"Organization","site_admin":false},"repo":{"id":48381519,"name":"AFT","full_name":"01org/AFT","owner":{"login":"01org","id":1635439,"avatar_url":"https://avatars.githubusercontent.com/u/1635439?v=3","gravatar_id":"","url":"https://api.github.com/users/01org","html_url":"https://github.com/01org","followers_url":"https://api.github.com/users/01org/followers","following_url":"https://api.github.com/users/01org/following{/other_user}","gists_url":"https://api.github.com/users/01org/gists{/gist_id}","starred_url":"https://api.github.com/users/01org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/01org/subscriptions","organizations_url":"https://api.github.com/users/01org/orgs","repos_url":"https://api.github.com/users/01org/repos","events_url":"https://api.github.com/users/01org/events{/privacy}","received_events_url":"https://api.github.com/users/01org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/01org/AFT","description":"Automated Flasher Tester","fork":false,"url":"https://api.github.com/repos/01org/AFT","forks_url":"https://api.github.com/repos/01org/AFT/forks","keys_url":"https://api.github.com/repos/01org/AFT/keys{/key_id}","collaborators_url":"https://api.github.com/repos/01org/AFT/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/01org/AFT/teams","hooks_url":"https://api.github.com/repos/01org/AFT/hooks","issue_events_url":"https://api.github.com/repos/01org/AFT/issues/events{/number}","events_url":"https://api.github.com/repos/01org/AFT/events","assignees_url":"https://api.github.com/repos/01org/AFT/assignees{/user}","branches_url":"https://api.github.com/repos/01org/AFT/branches{/branch}","tags_url":"https://api.github.com/repos/01org/AFT/tags","blobs_url":"https://api.github.com/repos/01org/AFT/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/01org/AFT/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/01org/AFT/git/refs{/sha}","trees_url":"https://api.github.com/repos/01org/AFT/git/trees{/sha}","statuses_url":"https://api.github.com/repos/01org/AFT/statuses/{sha}","languages_url":"https://api.github.com/repos/01org/AFT/languages","stargazers_url":"https://api.github.com/repos/01org/AFT/stargazers","contributors_url":"https://api.github.com/repos/01org/AFT/contributors","subscribers_url":"https://api.github.com/repos/01org/AFT/subscribers","subscription_url":"https://api.github.com/repos/01org/AFT/subscription","commits_url":"https://api.github.com/repos/01org/AFT/commits{/sha}","git_commits_url":"https://api.github.com/repos/01org/AFT/git/commits{/sha}","comments_url":"https://api.github.com/repos/01org/AFT/comments{/number}","issue_comment_url":"https://api.github.com/repos/01org/AFT/issues/comments{/number}","contents_url":"https://api.github.com/repos/01org/AFT/contents/{+path}","compare_url":"https://api.github.com/repos/01org/AFT/compare/{base}...{head}","merges_url":"https://api.github.com/repos/01org/AFT/merges","archive_url":"https://api.github.com/repos/01org/AFT/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/01org/AFT/downloads","issues_url":"https://api.github.com/repos/01org/AFT/issues{/number}","pulls_url":"https://api.github.com/repos/01org/AFT/pulls{/number}","milestones_url":"https://api.github.com/repos/01org/AFT/milestones{/number}","notifications_url":"https://api.github.com/repos/01org/AFT/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/01org/AFT/labels{/name}","releases_url":"https://api.github.com/repos/01org/AFT/releases{/id}","deployments_url":"https://api.github.com/repos/01org/AFT/deployments","created_at":"2015-12-21T16:15:38Z","updated_at":"2016-07-26T15:32:08Z","pushed_at":"2016-08-25T13:55:22Z","git_url":"git://github.com/01org/AFT.git","ssh_url":"git@github.com:01org/AFT.git","clone_url":"https://github.com/01org/AFT.git","svn_url":"https://github.com/01org/AFT","homepage":null,"size":9051,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/01org/AFT/pulls/13"},"html":{"href":"https://github.com/01org/AFT/pull/13"},"issue":{"href":"https://api.github.com/repos/01org/AFT/issues/13"},"comments":{"href":"https://api.github.com/repos/01org/AFT/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/01org/AFT/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/01org/AFT/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/01org/AFT/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/01org/AFT/statuses/77dfda5bf8dbb1ff5512c6ec038c78a38225915a"}}}}
{"actor":{"display_login":"Valtis"}}