Skip to content

Commit

Permalink
Merge pull request #2919 from AYUSHJAIN951/patchapplyissue
Browse files Browse the repository at this point in the history
Fix patch apply issue
  • Loading branch information
Naresh-ibm authored Jan 6, 2025
2 parents 38a2471 + ce61c10 commit 3b4416d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions cpu/dwh.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,13 @@ def setUp(self):

for file_name in ['dwh.cpp', 'Makefile']:
self.copyutil(file_name)
os.chdir(self.teststmpdir)
if dist.name in ['fedora', 'rhel']:
process.system('patch -p0 < %s' %
os.path.abspath(self.get_data('fofd.patch')), shell=True)
cmd = 'patch -p0 < %s' % os.path.abspath(self.get_data('fofd.patch'))
elif dist.name in ['Ubuntu', 'debian']:
process.system("sed -i 's/g++.*/& -lrt/' Makefile", shell=True)
cmd = "sed -i 's/g++.*/& -lrt/' Makefile"
os.chdir(self.teststmpdir)
process.run(cmd, shell=True)

build.make(self.teststmpdir)

def test(self):
Expand Down
2 changes: 1 addition & 1 deletion cpu/ebizzy.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ def setUp(self):

patch = self.params.get(
'patch', default='Fix-build-issues-with-ebizzy.patch')
os.chdir(self.sourcedir)
patch_cmd = 'patch -p0 < %s' % os.path.abspath((self.get_data(patch)))
os.chdir(self.sourcedir)
process.run(patch_cmd, shell=True)
process.run('[ -x configure ] && ./configure', shell=True)
build.make(self.sourcedir)
Expand Down
2 changes: 1 addition & 1 deletion cpu/linsched.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ def setUp(self):
self.sourcedir = os.path.join(
self.workdir, 'linux-scheduler-testing-master')

os.chdir(self.sourcedir)
fix_patch = 'patch -p1 < %s' % os.path.abspath(self.get_data('fix.patch'))
os.chdir(self.sourcedir)
process.run(fix_patch, shell=True, ignore_status=True)

build.make(self.sourcedir)
Expand Down

0 comments on commit 3b4416d

Please sign in to comment.