aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiana Picus <diana.picus@linaro.org>2018-02-15 17:09:45 +0100
committerDiana Picus <diana.picus@linaro.org>2018-02-23 11:47:11 +0100
commitc1b4d34db47d9c1c14b9a6807afe37f957f52fd3 (patch)
treecc3628a34e265cde9cf5698a1a357de999a9cf3b
parentfec612c2a0bb8d1dd9c0a51a03c7b40caf66764e (diff)
downloadlinaro-scripts-c1b4d34db47d9c1c14b9a6807afe37f957f52fd3.tar.gz
Test compulsory args. NFC
Change-Id: Iabd058daf6039c77577608f6998f31170f876150
-rw-r--r--tests/cli/testbuildandtest.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/cli/testbuildandtest.py b/tests/cli/testbuildandtest.py
index fe879a2..da3d14b 100644
--- a/tests/cli/testbuildandtest.py
+++ b/tests/cli/testbuildandtest.py
@@ -23,6 +23,30 @@ class Testllvmbuildandtest(LLVMTestCase):
print(content, file=theFile, flush=True)
return theFile
+ @require_command_arg("--repos")
+ def test_repos_dir_is_compulsory(self):
+ """Test that we get an error if we don't pass the path to the repos."""
+ self.run_with_output(
+ self.llvm_build_and_test("--source-dir=somewhere",
+ "--stage1-build-dir=elsewhere"))
+
+ @require_command_arg("--source-dir")
+ def test_source_dir_is_compulsory(self):
+ """Test that we get an error if we don't pass the path to the sources."""
+ self.run_with_output(
+ self.llvm_build_and_test("--repos-dir=somewhere",
+ "--stage1-build-dir=elsewhere"))
+
+ @require_command_arg("--stage1-build-dir")
+ def test_stage1_build_dir_is_compulsory(self):
+ """
+ Test that we get an error if we don't pass the path to the stage 1
+ build directory.
+ """
+ self.run_with_output(
+ self.llvm_build_and_test("--repos-dir=somewhere",
+ "--source-dir=elsewhere"))
+
def test_default_stage1(self):
"""
Test that we dump the correct commands for a single stage build of LLVM.