Skip to content

Commit

Permalink
test: disable find_source tests
Browse files Browse the repository at this point in the history
As we seem to be unable to download older revisions of gcc
via dnf, let's disable the find_source tests for now until
we find a better alternative.
  • Loading branch information
rupran committed May 17, 2021
1 parent b0c2fe9 commit 1eb55dd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
# Install debuginfod and dependencies. Use a pinned version of gcc for
# which we know a path (important for testing the 'source' command).
- name: Install dnf dependencies
run: dnf install -y elfutils-debuginfod-client python-pip gcc-11.0.1-0.4.fc35
run: dnf install -y elfutils-debuginfod-client python-pip gcc

# Install required python packages
- name: Install dependencies from pip
Expand Down
28 changes: 14 additions & 14 deletions test/test_libdebuginfod.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
TEST_BINARY = '/bin/gcc'
# Source path from a specific version of gcc in rawhide. This needs to be
# installed in the correct version in the test.yml file
TEST_SRCPATH = '/usr/src/debug/gcc-11.0.1-0.4.fc35.x86_64/obj-x86_64-redhat-linux/gcc/../../gcc/gcc-main.c'
# TEST_SRCPATH = '/usr/src/debug/gcc-11.0.1-0.4.fc35.x86_64/obj-x86_64-redhat-linux/gcc/../../gcc/gcc-main.c'

class TestDebugInfoD(unittest.TestCase):

Expand Down Expand Up @@ -75,19 +75,19 @@ def test_2_fail_get_executable(self):
self.assertLess(fdesc, 0)
self.assertIsNone(path)

def test_3_get_source(self):
with DebugInfoD() as client:
fdesc, path = client.find_source(self.buildid, TEST_SRCPATH)
if fdesc > 0:
os.close(fdesc)
self.assertIsNotNone(path)
os.remove(path)

def test_3_fail_get_source(self):
with DebugInfoD() as client:
fdesc, path = client.find_source(self.buildid + 'f', TEST_SRCPATH)
self.assertLess(fdesc, 0)
self.assertIsNone(path)
# def test_3_get_source(self):
# with DebugInfoD() as client:
# fdesc, path = client.find_source(self.buildid, TEST_SRCPATH)
# if fdesc > 0:
# os.close(fdesc)
# self.assertIsNotNone(path)
# os.remove(path)

# def test_3_fail_get_source(self):
# with DebugInfoD() as client:
# fdesc, path = client.find_source(self.buildid + 'f', TEST_SRCPATH)
# self.assertLess(fdesc, 0)
# self.assertIsNone(path)

def test_4_get_url(self):
with DebugInfoD() as client:
Expand Down

0 comments on commit 1eb55dd

Please sign in to comment.