Test compulsory args. NFC
Change-Id: Iabd058daf6039c77577608f6998f31170f876150
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 @@
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.