aboutsummaryrefslogtreecommitdiff
path: root/test/test.py
diff options
context:
space:
mode:
authorAlexandre Rames <alexandre.rames@linaro.org>2015-10-05 10:22:18 +0100
committerAlexandre Rames <alexandre.rames@linaro.org>2015-10-12 12:01:12 +0100
commitc95f35c33ed628036a04bd457dee1a0872c692cb (patch)
tree754c891a094c706b77e02988246a977db20ef28a /test/test.py
parent3fec7b5869d05bb06d9cc06ae21ba7929418227a (diff)
downloadart-testing-c95f35c33ed628036a04bd457dee1a0872c692cb.tar.gz
Fix execution of `build.sh` and `run.py` non-root paths.
Change-Id: I36a5899c2883965bc99195507e6903eb71ece3b9
Diffstat (limited to 'test/test.py')
-rwxr-xr-xtest/test.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test.py b/test/test.py
index 8582df0..e574669 100755
--- a/test/test.py
+++ b/test/test.py
@@ -56,9 +56,16 @@ def TestCommand(command, _cwd=None):
def TestBenchmarksOnHost():
rc = 0
+ # Test standard usage of the top-level scripts.
rc |= TestCommand(["./build.sh", "-w"], _cwd=utils.dir_root)
rc |= TestCommand(["./run.py"], _cwd=utils.dir_root)
rc |= TestCommand(["./run.py", "--dont-auto-calibrate"], _cwd=utils.dir_root)
+ # Test executing from a different path than the root.
+ non_root_path = os.path.join(utils.dir_root, "test", "foo", "bar")
+ rc |= TestCommand(["mkdir", "-p", non_root_path])
+ rc |= TestCommand([os.path.join(utils.dir_root, "build.sh"), "-w"], _cwd=non_root_path)
+ rc |= TestCommand([os.path.join(utils.dir_root, "run.py")], _cwd=non_root_path)
+ rc |= TestCommand(["rm", "-rf", non_root_path])
# TODO: Abstract the app name.
rc |= TestCommand(["java", "org.linaro.bench.RunBench", "Intrinsics.NumberOfLeadingZerosIntegerRandom"], _cwd=utils.dir_build_java_classes)
rc |= TestCommand(["java", "org.linaro.bench.RunBench", "BubbleSort"], _cwd=utils.dir_build_java_classes)