Gabe Black has submitted this change and it was merged. ( https://gem5-review.googlesource.com/c/public/gem5/+/15675 )

Change subject: tests: Fix tests/main.py so it can be run from anywhere.
......................................................................

tests: Fix tests/main.py so it can be run from anywhere.

tests/main.py was trying to find paths relative to itself using the
string __name__ (which was __main__) when it should have been using the
string __file__ which holds the name of the file being executed.

Change-Id: I5ff4c42fc7d8b75ff6b96c3cde61baf731d84738
Reviewed-on: https://gem5-review.googlesource.com/c/15675
Reviewed-by: Jason Lowe-Power <ja...@lowepower.com>
Maintainer: Jason Lowe-Power <ja...@lowepower.com>
---
M tests/main.py
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved



diff --git a/tests/main.py b/tests/main.py
index 509724e..779445d 100755
--- a/tests/main.py
+++ b/tests/main.py
@@ -10,7 +10,7 @@
 import sys
 import os

-base_dir = os.path.dirname(os.path.abspath(__name__))
+base_dir = os.path.dirname(os.path.abspath(__file__))
 ext_path = os.path.join(base_dir, os.pardir, 'ext')

 sys.path.insert(0, base_dir)

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/15675
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: I5ff4c42fc7d8b75ff6b96c3cde61baf731d84738
Gerrit-Change-Number: 15675
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black <gabebl...@google.com>
Gerrit-Reviewer: Gabe Black <gabebl...@google.com>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.com>
Gerrit-Reviewer: Sean Wilson <spwils...@wisc.edu>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to