aboutsummaryrefslogtreecommitdiff
path: root/tests/run_tests.py
diff options
context:
space:
mode:
authorEric B Munson <ebmunson@us.ibm.com>2010-02-04 17:31:04 +0000
committerEric B Munson <ebmunson@us.ibm.com>2010-02-04 21:06:59 +0000
commit30c9d6c77246225e28fe3282cab92b554b5f8bb2 (patch)
treea51f70e0cf8cb251d9fbeb3716e93ee5f1f47edb /tests/run_tests.py
parentfcb283a0d981ea3702913a70db6dc978421ef23b (diff)
downloadlibhugetlbfs-30c9d6c77246225e28fe3282cab92b554b5f8bb2.tar.gz
Make run_tests.py detect valid word sizes
Currently run_tests.py blindly tries both 32 and 64 bit tests regardless of what is available. This patch makes run_tests.py detect available word sizes before starting the tests. Signed-off-by: Eric B Munson <ebmunson@us.ibm.com>
Diffstat (limited to 'tests/run_tests.py')
-rwxr-xr-xtests/run_tests.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/run_tests.py b/tests/run_tests.py
index ebf9c80..99f382a 100755
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -240,6 +240,16 @@ def get_pagesizes():
for size in out.split("\n"): sizes.add(int(size))
return sizes
+def get_wordsizes():
+ """
+ Checks for obj32 and obj64 subdirs to determine valid word sizes.
+ """
+ sizes = set()
+ if os.path.isdir("./obj32"): sizes.add(32)
+ if os.path.isdir("./obj64"): sizes.add(64)
+
+ return sizes
+
def check_hugetlbfs_path():
"""
Check each combination of page size and word size for validity.
@@ -658,7 +668,7 @@ def main():
else:
assert False, "unhandled option"
if len(testsets) == 0: testsets = set(["func", "stress"])
- if len(wordsizes) == 0: wordsizes = set([32, 64])
+ if len(wordsizes) == 0: wordsizes = get_wordsizes()
if len(pagesizes) == 0: pagesizes = get_pagesizes()
if len(pagesizes) == 0: