Skip to content

Commit 3b4416d

Browse files
authored
Merge pull request #2919 from AYUSHJAIN951/patchapplyissue
Fix patch apply issue
2 parents 38a2471 + ce61c10 commit 3b4416d

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

cpu/dwh.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,13 @@ def setUp(self):
6464

6565
for file_name in ['dwh.cpp', 'Makefile']:
6666
self.copyutil(file_name)
67-
os.chdir(self.teststmpdir)
6867
if dist.name in ['fedora', 'rhel']:
69-
process.system('patch -p0 < %s' %
70-
os.path.abspath(self.get_data('fofd.patch')), shell=True)
68+
cmd = 'patch -p0 < %s' % os.path.abspath(self.get_data('fofd.patch'))
7169
elif dist.name in ['Ubuntu', 'debian']:
72-
process.system("sed -i 's/g++.*/& -lrt/' Makefile", shell=True)
70+
cmd = "sed -i 's/g++.*/& -lrt/' Makefile"
71+
os.chdir(self.teststmpdir)
72+
process.run(cmd, shell=True)
73+
7374
build.make(self.teststmpdir)
7475

7576
def test(self):

cpu/ebizzy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ def setUp(self):
7272

7373
patch = self.params.get(
7474
'patch', default='Fix-build-issues-with-ebizzy.patch')
75-
os.chdir(self.sourcedir)
7675
patch_cmd = 'patch -p0 < %s' % os.path.abspath((self.get_data(patch)))
76+
os.chdir(self.sourcedir)
7777
process.run(patch_cmd, shell=True)
7878
process.run('[ -x configure ] && ./configure', shell=True)
7979
build.make(self.sourcedir)

cpu/linsched.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ def setUp(self):
5252
self.sourcedir = os.path.join(
5353
self.workdir, 'linux-scheduler-testing-master')
5454

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

5959
build.make(self.sourcedir)

0 commit comments

Comments
 (0)