[gem5-dev] Change in gem5/gem5[master]: tests: Move test programs paths to related test scripts

2019-02-12 Thread Ayaz Akram (Gerrit)
Ayaz Akram has submitted this change and it was merged. (  
https://gem5-review.googlesource.com/c/public/gem5/+/15856 )


Change subject: tests: Move test programs paths to related test scripts
..

tests: Move test programs paths to related test scripts

This change is needed to make sure that the DownloadedProgram fixture
does not fail, in case the test binaries are not stored in test-progs/
(e.g. in the case of cpu tests)

Change-Id: Icf96f2537b038502e78da560c7ccebc44984b509
Signed-off-by: Ayaz Akram 
Reviewed-on: https://gem5-review.googlesource.com/c/15856
Reviewed-by: Andreas Sandberg 
Reviewed-by: Rutuja Govind Oza 
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
---
M tests/gem5/fixture.py
M tests/gem5/hello_se/test_hello_se.py
M tests/gem5/m5_util/test_exit.py
3 files changed, 4 insertions(+), 5 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
  Andreas Sandberg: Looks good to me, approved
  Rutuja Govind Oza: Looks good to me, approved



diff --git a/tests/gem5/fixture.py b/tests/gem5/fixture.py
index a50d73c..df834ef 100644
--- a/tests/gem5/fixture.py
+++ b/tests/gem5/fixture.py
@@ -220,11 +220,9 @@
 super(DownloadedProgram, self).__init__("download-" + program,
 build_once=True, **kwargs)

-self.program_dir = joinpath('test-progs', path)
+self.program_dir = path
 self.path = joinpath(self.program_dir, program)
-
 self.url = self.urlbase + self.path
-
 def _download(self):
 import urllib
 log.test_log.debug("Downloading " + self.url + " to " + self.path)
diff --git a/tests/gem5/hello_se/test_hello_se.py  
b/tests/gem5/hello_se/test_hello_se.py

index 0310064..5017962 100644
--- a/tests/gem5/hello_se/test_hello_se.py
+++ b/tests/gem5/hello_se/test_hello_se.py
@@ -39,7 +39,7 @@
 for isa in test_progs:
 for binary in test_progs[isa]:
 import os
-path = os.path.join('hello', 'bin', isa, 'linux')
+path = os.path.join('test-progs', 'hello', 'bin', isa, 'linux')
 hello_program = DownloadedProgram(path, binary)

 ref_path = joinpath(getcwd(), 'ref')
diff --git a/tests/gem5/m5_util/test_exit.py  
b/tests/gem5/m5_util/test_exit.py

index f5292b1..a766db4 100644
--- a/tests/gem5/m5_util/test_exit.py
+++ b/tests/gem5/m5_util/test_exit.py
@@ -37,7 +37,8 @@
 r'Exiting @ tick \d* because m5_exit instruction encountered'
 )

-test_program = DownloadedProgram('m5-exit/bin/x86/linux/', 'm5_exit')
+test_program = DownloadedProgram('test-progs/m5-exit/bin/x86/linux/',\
+'m5_exit')

 a = verifier.MatchRegex(m5_exit_regex)
 gem5_verify_config(

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/15856
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Icf96f2537b038502e78da560c7ccebc44984b509
Gerrit-Change-Number: 15856
Gerrit-PatchSet: 4
Gerrit-Owner: Ayaz Akram 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Ayaz Akram 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Rutuja Govind Oza 
Gerrit-MessageType: merged
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in gem5/gem5[master]: tests: Move test programs paths to related test scripts

2019-01-23 Thread Ayaz Akram (Gerrit)
Ayaz Akram has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/15856



Change subject: tests: Move test programs paths to related test scripts
..

tests: Move test programs paths to related test scripts

This change is needed to make sure that the DownloadedProgram fixture
does not fail, in case the test binaries are not stored in test-progs/
(e.g. in the case of cpu tests)

Change-Id: Icf96f2537b038502e78da560c7ccebc44984b509
Signed-off-by: Ayaz Akram 
---
M tests/gem5/fixture.py
M tests/gem5/hello_se/test_hello_se.py
M tests/gem5/m5_util/test_exit.py
3 files changed, 4 insertions(+), 5 deletions(-)



diff --git a/tests/gem5/fixture.py b/tests/gem5/fixture.py
index a50d73c..df834ef 100644
--- a/tests/gem5/fixture.py
+++ b/tests/gem5/fixture.py
@@ -220,11 +220,9 @@
 super(DownloadedProgram, self).__init__("download-" + program,
 build_once=True, **kwargs)

-self.program_dir = joinpath('test-progs', path)
+self.program_dir = path
 self.path = joinpath(self.program_dir, program)
-
 self.url = self.urlbase + self.path
-
 def _download(self):
 import urllib
 log.test_log.debug("Downloading " + self.url + " to " + self.path)
diff --git a/tests/gem5/hello_se/test_hello_se.py  
b/tests/gem5/hello_se/test_hello_se.py

index 0310064..5017962 100644
--- a/tests/gem5/hello_se/test_hello_se.py
+++ b/tests/gem5/hello_se/test_hello_se.py
@@ -39,7 +39,7 @@
 for isa in test_progs:
 for binary in test_progs[isa]:
 import os
-path = os.path.join('hello', 'bin', isa, 'linux')
+path = os.path.join('test-progs', 'hello', 'bin', isa, 'linux')
 hello_program = DownloadedProgram(path, binary)

 ref_path = joinpath(getcwd(), 'ref')
diff --git a/tests/gem5/m5_util/test_exit.py  
b/tests/gem5/m5_util/test_exit.py

index f5292b1..a766db4 100644
--- a/tests/gem5/m5_util/test_exit.py
+++ b/tests/gem5/m5_util/test_exit.py
@@ -37,7 +37,8 @@
 r'Exiting @ tick \d* because m5_exit instruction encountered'
 )

-test_program = DownloadedProgram('m5-exit/bin/x86/linux/', 'm5_exit')
+test_program = DownloadedProgram('test-progs/m5-exit/bin/x86/linux/',\
+'m5_exit')

 a = verifier.MatchRegex(m5_exit_regex)
 gem5_verify_config(

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/15856
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Icf96f2537b038502e78da560c7ccebc44984b509
Gerrit-Change-Number: 15856
Gerrit-PatchSet: 1
Gerrit-Owner: Ayaz Akram 
Gerrit-MessageType: newchange
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev