{"action":"created","comment":{"url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/pulls/comments/83176438","pull_request_review_id":4034339,"id":83176438,"diff_hunk":"@@ -0,0 +1,103 @@\n+#!/usr/bin/env python\n+\n+# This program is free software; you can redistribute it and/or modify\n+# it under the terms of the GNU General Public License as published by\n+# the Free Software Foundation; either version 2 of the License, or\n+# (at your option) any later version.\n+#\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n+#\n+# See LICENSE for more details.\n+#\n+# Copyright: 2016 IBM.\n+# Author: Ramya BS <ramya@linux.vnet.ibm.com>\n+\n+import os\n+import re\n+from avocado import Test\n+from avocado import main\n+from avocado.utils import archive\n+from avocado.utils import build\n+from avocado.utils import distro\n+from avocado.utils import process\n+from avocado.utils.software_manager import SoftwareManager\n+\n+\n+class GCC(Test):\n+    \"\"\"\n+    This testcase make use of testsuite provided by the\n+    source package.\n+    \"\"\"\n+\n+    def setUp(self):\n+        \"\"\"\n+        Install all the dependency packages required for building\n+        source tarball specific to os,if not tests will stop.\n+        \"\"\"\n+        sm = SoftwareManager()\n+        dist = distro.detect()\n+        packages = ['gcc', 'dejagnu', 'flex', 'bison', 'sharutils']\n+\n+        if dist.name == 'Ubuntu':\n+            packages.extend(['libmpfr-dev', 'libgmp-dev', 'libmpc-dev',\n+                             'texinfo', 'zip', 'libc6-dev', 'libelf1',\n+                             'elfutils', 'gnat', 'autogen'])\n+        elif dist.name == 'SuSE':\n+            packages.extend(['glibc-devel-static', 'zlib-devel', 'elfutils',\n+                             'libelf-devel', 'gcc-c++', 'isl-devel',\n+                             'gmp-devel', 'glibc-devel', 'mpfr-devel',\n+                             'makeinfo', 'texinfo', 'mpc-devel'])\n+        else:\n+            packages.extend(['glibc-static', 'autogen', 'guile',\n+                             'guile-devel', 'libgo', 'libgo-devel',\n+                             'libgo-static', 'elfutils-devel',\n+                             'texinfo-tex', 'texinfo', 'elfutils-libelf-devel',\n+                             'gmp-devel', 'mpfr-devel', 'libmpc-devel',\n+                             'gcc-gnat', 'libgnat', 'zlib-devel',\n+                             'gettext', 'sharutils', 'libgcj', 'libunwind'\n+                             'libgcc', 'libgomp'])\n+\n+        for package in packages:\n+            if not sm.check_installed(package) and not sm.install(package):\n+                self.skip(\n+                    \"Failed to install %s required for this test.\" % package)\n+        if dist.name == 'SuSE':\n+            gcc_version = process.system_output(\"gcc --version\")\n+            get_system_gcc_version = re.search(\n+                'gcc \\(SUSE Linux\\) (.*)\\n',\n+                gcc_version).group(1).replace(\n+                \".\",\n+                \"_\")\n+        else:\n+            get_system_gcc_version = process.system_output(\n+                \"gcc -dumpversion\").replace(\".\", \"_\").split(\"\\n\", 1)[0]\n+        tarball = self.fetch_asset(\n+            \"https://github.com/gcc-mirror/gcc/archive/gcc-%s-release.zip\" %\n+            get_system_gcc_version, expire='7d')","path":"toolchain/gcc.py","position":78,"original_position":78,"commit_id":"ba383f4752188ff131a2016e0ab48ef6e6444033","original_commit_id":"ba383f4752188ff131a2016e0ab48ef6e6444033","user":{"login":"PraveenPenguin","id":11898572,"avatar_url":"https://avatars.githubusercontent.com/u/11898572?v=3","gravatar_id":"","url":"https://api.github.com/users/PraveenPenguin","html_url":"https://github.com/PraveenPenguin","followers_url":"https://api.github.com/users/PraveenPenguin/followers","following_url":"https://api.github.com/users/PraveenPenguin/following{/other_user}","gists_url":"https://api.github.com/users/PraveenPenguin/gists{/gist_id}","starred_url":"https://api.github.com/users/PraveenPenguin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PraveenPenguin/subscriptions","organizations_url":"https://api.github.com/users/PraveenPenguin/orgs","repos_url":"https://api.github.com/users/PraveenPenguin/repos","events_url":"https://api.github.com/users/PraveenPenguin/events{/privacy}","received_events_url":"https://api.github.com/users/PraveenPenguin/received_events","type":"User","site_admin":false},"body":"in fedora 24 it fails\r\n\r\n```\r\n\r\nTraceback (most recent call last):\r\n  File \"/root/gcc.py\", line 78, in setUp\r\n    get_system_gcc_version, expire='7d')\r\n  File \"/usr/lib/python2.7/site-packages/avocado_framework-41.0-py2.7.egg/avocado/core/test.py\", line 654, in fetch_asset\r\n    self.cache_dirs, expire).fetch()\r\n  File \"/usr/lib/python2.7/site-packages/avocado_framework-41.0-py2.7.egg/avocado/utils/asset.py\", line 142, in fetch\r\n    raise EnvironmentError(\"Failed to fetch %s.\" % self.basename)\r\nEnvironmentError: Failed to fetch gcc-6_2_1-release.zip.\r\n\r\nERROR 1-gcc.py:GCC.test -> TestSetupFail: Failed to fetch gcc-6_2_1-release.zip.\r\n\r\nNot logging /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor (file does not exist)\r\nNot logging /proc/pci (file does not exist)\r\nTest results availab \r\n\r\n\r\n```\r\nthis is gcc version \r\n[root@localhost ~]# gcc -dumpversion\r\n6.2.1\r\n[root@localhost ~]# \r\n\r\n","created_at":"2016-10-13T09:30:22Z","updated_at":"2016-10-13T09:33:22Z","html_url":"https://github.com/avocado-framework-tests/avocado-misc-tests/pull/117#discussion_r83176438","pull_request_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/pulls/117","_links":{"self":{"href":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/pulls/comments/83176438"},"html":{"href":"https://github.com/avocado-framework-tests/avocado-misc-tests/pull/117#discussion_r83176438"},"pull_request":{"href":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/pulls/117"}}},"pull_request":{"url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/pulls/117","id":89156647,"html_url":"https://github.com/avocado-framework-tests/avocado-misc-tests/pull/117","diff_url":"https://github.com/avocado-framework-tests/avocado-misc-tests/pull/117.diff","patch_url":"https://github.com/avocado-framework-tests/avocado-misc-tests/pull/117.patch","issue_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/issues/117","number":117,"state":"open","locked":false,"title":"Testcase for gcc package,this testcase make use of testsuite provided…","user":{"login":"ramyabs","id":16132621,"avatar_url":"https://avatars.githubusercontent.com/u/16132621?v=3","gravatar_id":"","url":"https://api.github.com/users/ramyabs","html_url":"https://github.com/ramyabs","followers_url":"https://api.github.com/users/ramyabs/followers","following_url":"https://api.github.com/users/ramyabs/following{/other_user}","gists_url":"https://api.github.com/users/ramyabs/gists{/gist_id}","starred_url":"https://api.github.com/users/ramyabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramyabs/subscriptions","organizations_url":"https://api.github.com/users/ramyabs/orgs","repos_url":"https://api.github.com/users/ramyabs/repos","events_url":"https://api.github.com/users/ramyabs/events{/privacy}","received_events_url":"https://api.github.com/users/ramyabs/received_events","type":"User","site_admin":false},"body":"… by the source package.\r\n\r\nDescription :\r\nThe gcc package contains the GNU Compiler Collection version.\r\nYou'll need this package in order to compile C code.\r\n\r\nSigned-off-by: Ramya BS <ramya@linux.vnet.ibm.com>\r\nTested-by     : Ramya BS <ramya@linux.vnet.ibm.com>","created_at":"2016-10-13T08:28:30Z","updated_at":"2016-10-13T09:33:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"75b462d60363c1555d3de5d7125011441f3bca5d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/pulls/117/commits","review_comments_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/pulls/117/comments","review_comment_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/pulls/comments{/number}","comments_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/issues/117/comments","statuses_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/statuses/ba383f4752188ff131a2016e0ab48ef6e6444033","head":{"label":"ramyabs:gcc_test2","ref":"gcc_test2","sha":"ba383f4752188ff131a2016e0ab48ef6e6444033","user":{"login":"ramyabs","id":16132621,"avatar_url":"https://avatars.githubusercontent.com/u/16132621?v=3","gravatar_id":"","url":"https://api.github.com/users/ramyabs","html_url":"https://github.com/ramyabs","followers_url":"https://api.github.com/users/ramyabs/followers","following_url":"https://api.github.com/users/ramyabs/following{/other_user}","gists_url":"https://api.github.com/users/ramyabs/gists{/gist_id}","starred_url":"https://api.github.com/users/ramyabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramyabs/subscriptions","organizations_url":"https://api.github.com/users/ramyabs/orgs","repos_url":"https://api.github.com/users/ramyabs/repos","events_url":"https://api.github.com/users/ramyabs/events{/privacy}","received_events_url":"https://api.github.com/users/ramyabs/received_events","type":"User","site_admin":false},"repo":{"id":70032223,"name":"avocado-misc-tests","full_name":"ramyabs/avocado-misc-tests","owner":{"login":"ramyabs","id":16132621,"avatar_url":"https://avatars.githubusercontent.com/u/16132621?v=3","gravatar_id":"","url":"https://api.github.com/users/ramyabs","html_url":"https://github.com/ramyabs","followers_url":"https://api.github.com/users/ramyabs/followers","following_url":"https://api.github.com/users/ramyabs/following{/other_user}","gists_url":"https://api.github.com/users/ramyabs/gists{/gist_id}","starred_url":"https://api.github.com/users/ramyabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramyabs/subscriptions","organizations_url":"https://api.github.com/users/ramyabs/orgs","repos_url":"https://api.github.com/users/ramyabs/repos","events_url":"https://api.github.com/users/ramyabs/events{/privacy}","received_events_url":"https://api.github.com/users/ramyabs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ramyabs/avocado-misc-tests","description":"Community maintained Avocado tests repository","fork":true,"url":"https://api.github.com/repos/ramyabs/avocado-misc-tests","forks_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/forks","keys_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/teams","hooks_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/hooks","issue_events_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/issues/events{/number}","events_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/events","assignees_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/assignees{/user}","branches_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/branches{/branch}","tags_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/tags","blobs_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/statuses/{sha}","languages_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/languages","stargazers_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/stargazers","contributors_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/contributors","subscribers_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/subscribers","subscription_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/subscription","commits_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/issues/comments{/number}","contents_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/contents/{+path}","compare_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/merges","archive_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/downloads","issues_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/issues{/number}","pulls_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/pulls{/number}","milestones_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/milestones{/number}","notifications_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/labels{/name}","releases_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/releases{/id}","deployments_url":"https://api.github.com/repos/ramyabs/avocado-misc-tests/deployments","created_at":"2016-10-05T05:19:48Z","updated_at":"2016-10-05T05:19:49Z","pushed_at":"2016-10-13T08:27:08Z","git_url":"git://github.com/ramyabs/avocado-misc-tests.git","ssh_url":"git@github.com:ramyabs/avocado-misc-tests.git","clone_url":"https://github.com/ramyabs/avocado-misc-tests.git","svn_url":"https://github.com/ramyabs/avocado-misc-tests","homepage":"","size":1566,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"avocado-framework-tests:master","ref":"master","sha":"81e4ab48c1c9f22025dfb83b5d3323e02352afbd","user":{"login":"avocado-framework-tests","id":21237888,"avatar_url":"https://avatars.githubusercontent.com/u/21237888?v=3","gravatar_id":"","url":"https://api.github.com/users/avocado-framework-tests","html_url":"https://github.com/avocado-framework-tests","followers_url":"https://api.github.com/users/avocado-framework-tests/followers","following_url":"https://api.github.com/users/avocado-framework-tests/following{/other_user}","gists_url":"https://api.github.com/users/avocado-framework-tests/gists{/gist_id}","starred_url":"https://api.github.com/users/avocado-framework-tests/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avocado-framework-tests/subscriptions","organizations_url":"https://api.github.com/users/avocado-framework-tests/orgs","repos_url":"https://api.github.com/users/avocado-framework-tests/repos","events_url":"https://api.github.com/users/avocado-framework-tests/events{/privacy}","received_events_url":"https://api.github.com/users/avocado-framework-tests/received_events","type":"Organization","site_admin":false},"repo":{"id":66541747,"name":"avocado-misc-tests","full_name":"avocado-framework-tests/avocado-misc-tests","owner":{"login":"avocado-framework-tests","id":21237888,"avatar_url":"https://avatars.githubusercontent.com/u/21237888?v=3","gravatar_id":"","url":"https://api.github.com/users/avocado-framework-tests","html_url":"https://github.com/avocado-framework-tests","followers_url":"https://api.github.com/users/avocado-framework-tests/followers","following_url":"https://api.github.com/users/avocado-framework-tests/following{/other_user}","gists_url":"https://api.github.com/users/avocado-framework-tests/gists{/gist_id}","starred_url":"https://api.github.com/users/avocado-framework-tests/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avocado-framework-tests/subscriptions","organizations_url":"https://api.github.com/users/avocado-framework-tests/orgs","repos_url":"https://api.github.com/users/avocado-framework-tests/repos","events_url":"https://api.github.com/users/avocado-framework-tests/events{/privacy}","received_events_url":"https://api.github.com/users/avocado-framework-tests/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/avocado-framework-tests/avocado-misc-tests","description":"Community maintained Avocado tests repository","fork":false,"url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests","forks_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/forks","keys_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/teams","hooks_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/hooks","issue_events_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/issues/events{/number}","events_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/events","assignees_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/assignees{/user}","branches_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/branches{/branch}","tags_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/tags","blobs_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/statuses/{sha}","languages_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/languages","stargazers_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/stargazers","contributors_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/contributors","subscribers_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/subscribers","subscription_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/subscription","commits_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/issues/comments{/number}","contents_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/contents/{+path}","compare_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/merges","archive_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/downloads","issues_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/issues{/number}","pulls_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/pulls{/number}","milestones_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/milestones{/number}","notifications_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/labels{/name}","releases_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/releases{/id}","deployments_url":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/deployments","created_at":"2016-08-25T08:50:54Z","updated_at":"2016-08-25T10:47:34Z","pushed_at":"2016-10-13T08:28:30Z","git_url":"git://github.com/avocado-framework-tests/avocado-misc-tests.git","ssh_url":"git@github.com:avocado-framework-tests/avocado-misc-tests.git","clone_url":"https://github.com/avocado-framework-tests/avocado-misc-tests.git","svn_url":"https://github.com/avocado-framework-tests/avocado-misc-tests","homepage":"","size":1705,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":7,"forks":18,"open_issues":7,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/pulls/117"},"html":{"href":"https://github.com/avocado-framework-tests/avocado-misc-tests/pull/117"},"issue":{"href":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/issues/117"},"comments":{"href":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/issues/117/comments"},"review_comments":{"href":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/pulls/117/comments"},"review_comment":{"href":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/pulls/117/commits"},"statuses":{"href":"https://api.github.com/repos/avocado-framework-tests/avocado-misc-tests/statuses/ba383f4752188ff131a2016e0ab48ef6e6444033"}}}}
{"actor":{"display_login":"PraveenPenguin"}}