blob: d0f6d1d82c06b9e87bffd90630f1b1039a6eff0d [file] [log] [blame]
Diana Picus3b2ef822016-10-13 16:53:18 +03001"""Command line interface tests for llvmprojs.py
2
3Note that although this uses the unittest framework, it does *not* contain unit
4tests.
5
6"""
7
8import shutil
9import os
10import subprocess
11import unittest
12
Diana Picus3b2ef822016-10-13 16:53:18 +030013from tempfile import mkdtemp
14from uuid import uuid4
15
16from linaropy.cd import cd
Diana Picus9276b782018-01-24 14:40:46 +010017from llvmtestcase import LLVMTestCase, require_command_arg
Diana Picus3b2ef822016-10-13 16:53:18 +030018
19
Diana Picus3601bea2017-05-29 11:26:18 +020020class Testllvmprojs(LLVMTestCase):
Diana Picusb4307602017-04-05 19:48:39 +020021
Diana Picus3b2ef822016-10-13 16:53:18 +030022 @classmethod
Diana Picus81089db2017-05-05 22:26:49 +020023 def llvm_projects(cls, *args, **kwargs):
Diana Picus3601bea2017-05-29 11:26:18 +020024 return cls.command_with_defaults("projects", *args, **kwargs)
Diana Picus81089db2017-05-05 22:26:49 +020025
26 @classmethod
Diana Picusefc7bda2017-06-09 19:14:08 +020027 def get_subproj_repo(cls, subproj):
28 return os.path.join(cls.repos, subproj)
29
30 @classmethod
Diana Picus3b2ef822016-10-13 16:53:18 +030031 def setUpClass(cls):
32 """Create the file structure and environment that llvmprojs expects"""
33 cls.llvm_root = mkdtemp()
34 cls.repos = os.path.join(cls.llvm_root, "repos")
35
36 cls.all_repos = ("llvm", "clang", "compiler-rt", "lld", "lldb",
37 "libcxx", "libcxxabi", "libunwind", "test-suite")
38
Diana Picus3b2ef822016-10-13 16:53:18 +030039 # Create dummy repos
40 for reponame in cls.all_repos:
Diana Picus3601bea2017-05-29 11:26:18 +020041 cls.create_dummy_repo(cls.get_subproj_repo(reponame))
Diana Picus3b2ef822016-10-13 16:53:18 +030042
43 @classmethod
44 def tearDownClass(cls):
45 shutil.rmtree(cls.llvm_root)
46
47 @classmethod
48 def setUp(cls):
Diana Picus81089db2017-05-05 22:26:49 +020049 cls.env = os.path.join(cls.llvm_root, "env" + str(uuid4()))
50 cls.llvm_src = os.path.join(cls.env, "llvm")
Diana Picus3b2ef822016-10-13 16:53:18 +030051
52 # Create LLVM worktree
53 cls.branch = "br" + str(uuid4())
Diana Picus3601bea2017-05-29 11:26:18 +020054 cls.add_worktree(cls.get_subproj_repo("llvm"), cls.llvm_src,
55 cls.branch)
Diana Picus3b2ef822016-10-13 16:53:18 +030056
Diana Picus3b2ef822016-10-13 16:53:18 +030057 @classmethod
58 def tearDown(cls):
59 # Clean up the directories where we might have added subprojects.
60 # This isn't 100% clean, because we don't clean up the repos between
61 # tests (so any branches will remain), but it's good enough for the
62 # current tests.
63 for subprojdir in (os.path.join(cls.llvm_src, "projects"),
64 os.path.join(cls.llvm_src, "tools")):
65 if os.path.isdir(subprojdir):
66 shutil.rmtree(subprojdir)
67 os.makedirs(subprojdir)
68
69 # Run prune on the original repos, to remove any dangling worktrees.
70 for reponame in cls.all_repos:
Diana Picus3601bea2017-05-29 11:26:18 +020071 repopath = cls.get_subproj_repo(reponame)
Diana Picus3b2ef822016-10-13 16:53:18 +030072 with cd(repopath):
73 cls.run_quietly(["git", "worktree", "prune"])
74
Diana Picusadb07c42017-11-22 16:12:57 +010075 def test_repos_arg_is_compulsory_for_add(self):
Diana Picus81089db2017-05-05 22:26:49 +020076 """
Diana Picusadb07c42017-11-22 16:12:57 +010077 Test that we must pass in the repos when adding a subproject, but not
78 for other combinations of arguments.
Diana Picus81089db2017-05-05 22:26:49 +020079 """
80 with self.assertRaises(subprocess.CalledProcessError) as context:
Diana Picus81089db2017-05-05 22:26:49 +020081 self.run_with_output(
Diana Picus9f756862017-12-20 10:35:08 +010082 self.llvm_projects(
83 "--source-dir",
84 self.llvm_src,
85 "--add",
86 "clang"))
Diana Picus81089db2017-05-05 22:26:49 +020087
88 self.assertRegex(
89 str(context.exception.output),
Diana Picusadb07c42017-11-22 16:12:57 +010090 "(.*\n)*.*When adding a subproject you must also pass the --repos argument(.*\n)*")
Diana Picus81089db2017-05-05 22:26:49 +020091
Diana Picusadb07c42017-11-22 16:12:57 +010092 # These should not raise.
Diana Picus9f756862017-12-20 10:35:08 +010093 self.run_with_output(self.llvm_projects("--source-dir", self.llvm_src))
Diana Picusadb07c42017-11-22 16:12:57 +010094 self.run_with_output(
Diana Picus9f756862017-12-20 10:35:08 +010095 self.llvm_projects(
96 "--source-dir",
97 self.llvm_src,
98 "--remove",
99 "clang"))
Diana Picus81089db2017-05-05 22:26:49 +0200100
Diana Picus9276b782018-01-24 14:40:46 +0100101 @require_command_arg("--source-dir")
Diana Picus9f756862017-12-20 10:35:08 +0100102 def test_source_dir_is_compulsory(self):
Diana Picus81089db2017-05-05 22:26:49 +0200103 """
Diana Picus9f756862017-12-20 10:35:08 +0100104 Test that we must pass in the source dir for various combinations of
Diana Picus81089db2017-05-05 22:26:49 +0200105 input args.
106 """
Diana Picus9276b782018-01-24 14:40:46 +0100107 self.run_with_output(self.llvm_projects())
Diana Picus81089db2017-05-05 22:26:49 +0200108
Diana Picus9276b782018-01-24 14:40:46 +0100109 @require_command_arg("--source-dir")
110 def test_source_dir_ir_compulsory_for_add(self):
111 self.run_with_output(
112 self.llvm_projects(
113 "--repos", self.repos,
114 "--add", "clang", env=None))
Diana Picus81089db2017-05-05 22:26:49 +0200115
Diana Picus9276b782018-01-24 14:40:46 +0100116 @require_command_arg("--source-dir")
117 def test_source_dir_ir_compulsory_for_remove(self):
118 self.run_with_output(
119 self.llvm_projects(
120 "--remove", "clang", env=None))
Diana Picus81089db2017-05-05 22:26:49 +0200121
Diana Picus3b2ef822016-10-13 16:53:18 +0300122 def test_dump_empty_config(self):
123 """
124 Test that we're correctly dumping an empty configuration (i.e. no
125 projects linked) when running llvmprojs without arguments.
126 """
Diana Picus9f756862017-12-20 10:35:08 +0100127 output = self.run_with_output(
128 self.llvm_projects("--source-dir", self.llvm_src))
Diana Picusb4307602017-04-05 19:48:39 +0200129 self.assertRegex(output, "Projects linked:.*\n.*none.*")
Diana Picus3b2ef822016-10-13 16:53:18 +0300130
131 def test_add_remove_subprojects(self):
132 """
133 Test that we can add and remove one or several subprojects.
134 """
Diana Picusadb07c42017-11-22 16:12:57 +0100135 output = self.run_with_output(self.llvm_projects(
Diana Picus9f756862017-12-20 10:35:08 +0100136 "--source-dir", self.llvm_src,
Diana Picusadb07c42017-11-22 16:12:57 +0100137 "--repos", self.repos,
138 "--add", "clang"))
Diana Picusb4307602017-04-05 19:48:39 +0200139 self.assertRegex(output, "Projects linked:.*\n.*clang.*")
Diana Picus3b2ef822016-10-13 16:53:18 +0300140
Diana Picus81089db2017-05-05 22:26:49 +0200141 output = self.run_with_output(
142 self.llvm_projects(
Diana Picus9f756862017-12-20 10:35:08 +0100143 "--source-dir", self.llvm_src,
Diana Picusadb07c42017-11-22 16:12:57 +0100144 "--repos", self.repos,
Diana Picus81089db2017-05-05 22:26:49 +0200145 "--add", "libcxx", "lldb"))
Diana Picusb4307602017-04-05 19:48:39 +0200146 self.assertRegex(
Diana Picus3b2ef822016-10-13 16:53:18 +0300147 output,
148 "Projects linked:.*\n" +
149 ".*clang.*\n" +
150 ".*libcxx.*\n" +
151 ".*lldb.*")
152
Diana Picus9f756862017-12-20 10:35:08 +0100153 output = self.run_with_output(
154 self.llvm_projects(
155 "--source-dir",
156 self.llvm_src,
157 "--remove",
158 "libcxx"))
Diana Picusb4307602017-04-05 19:48:39 +0200159 self.assertRegex(output,
160 "Projects linked:.*\n" +
161 ".*clang.*\n" +
162 ".*lldb.*")
Diana Picus3b2ef822016-10-13 16:53:18 +0300163
Diana Picus81089db2017-05-05 22:26:49 +0200164 output = self.run_with_output(
165 self.llvm_projects(
Diana Picus9f756862017-12-20 10:35:08 +0100166 "--source-dir", self.llvm_src,
Diana Picus81089db2017-05-05 22:26:49 +0200167 "--remove", "clang", "lldb"))
Diana Picusb4307602017-04-05 19:48:39 +0200168 self.assertRegex(output,
169 "Projects linked:.*\n" +
170 ".*none.*")
Diana Picus3b2ef822016-10-13 16:53:18 +0300171
172 def test_add_remove_invalid_subprojects(self):
173 """
174 Test that we error out nicely when trying to add/remove invalid
175 subprojects.
176 """
177 with self.assertRaises(subprocess.CalledProcessError) as context:
Diana Picus81089db2017-05-05 22:26:49 +0200178 self.run_with_output(
179 self.llvm_projects(
Diana Picus9f756862017-12-20 10:35:08 +0100180 "--source-dir", self.llvm_src,
Diana Picusadb07c42017-11-22 16:12:57 +0100181 "--repos", self.repos,
Diana Picus81089db2017-05-05 22:26:49 +0200182 "--add", "inventedsubproject"))
Diana Picus3b2ef822016-10-13 16:53:18 +0300183
Diana Picusb4307602017-04-05 19:48:39 +0200184 self.assertRegex(
185 str(context.exception.output),
Diana Picus3b2ef822016-10-13 16:53:18 +0300186 "(.*\n)*.*invalid choice:.*inventedsubproject(.*\n)*")
187
188 with self.assertRaises(subprocess.CalledProcessError) as context:
Diana Picus81089db2017-05-05 22:26:49 +0200189 self.run_with_output(
190 self.llvm_projects(
Diana Picus9f756862017-12-20 10:35:08 +0100191 "--source-dir", self.llvm_src,
Diana Picus81089db2017-05-05 22:26:49 +0200192 "--remove",
193 "inventedsubproject"))
Diana Picus3b2ef822016-10-13 16:53:18 +0300194
Diana Picusb4307602017-04-05 19:48:39 +0200195 self.assertRegex(
196 str(context.exception.output),
Diana Picus3b2ef822016-10-13 16:53:18 +0300197 "(.*\n)*.*invalid choice:.*inventedsubproject(.*\n)*")
198
199 def test_duplicate_add_remove(self):
200 """
201 Test that we don't crash when trying to add / remove the same subproject
202 twice with the same command.
203 """
Diana Picus81089db2017-05-05 22:26:49 +0200204 output = self.run_with_output(
205 self.llvm_projects(
Diana Picus9f756862017-12-20 10:35:08 +0100206 "--source-dir", self.llvm_src,
Diana Picusadb07c42017-11-22 16:12:57 +0100207 "--repos", self.repos,
Diana Picus81089db2017-05-05 22:26:49 +0200208 "--add", "clang", "lld", "clang"))
Diana Picusb4307602017-04-05 19:48:39 +0200209 self.assertRegex(output,
210 "Projects linked:.*\n" +
211 ".*clang.*\n" +
212 ".*lld.*")
Diana Picus3b2ef822016-10-13 16:53:18 +0300213
Diana Picus81089db2017-05-05 22:26:49 +0200214 output = self.run_with_output(
215 self.llvm_projects(
Diana Picus9f756862017-12-20 10:35:08 +0100216 "--source-dir", self.llvm_src,
Diana Picus81089db2017-05-05 22:26:49 +0200217 "--remove", "lld", "lld", "clang"))
Diana Picusb4307602017-04-05 19:48:39 +0200218 self.assertRegex(output,
219 "Projects linked:.*\n" +
220 ".*none.*")
Diana Picus3b2ef822016-10-13 16:53:18 +0300221
222 def test_redundant_add_remove(self):
223 """
224 Test that we can add a subproject that already exists (either because it
225 was added by our script or manually) or remove a subproject that doesn't
226 exist.
227 """
Diana Picus3601bea2017-05-29 11:26:18 +0200228 self.add_worktree(self.get_subproj_repo("clang"),
229 os.path.join(self.llvm_src, "tools", "clang"),
230 self.branch)
231 self.add_worktree(
232 self.get_subproj_repo("compiler-rt"),
Diana Picus3b2ef822016-10-13 16:53:18 +0300233 os.path.join(self.llvm_src, "projects", "compiler-rt"),
234 self.branch)
235
Diana Picusadb07c42017-11-22 16:12:57 +0100236 output = self.run_with_output(self.llvm_projects(
Diana Picus9f756862017-12-20 10:35:08 +0100237 "--source-dir", self.llvm_src,
Diana Picusadb07c42017-11-22 16:12:57 +0100238 "--repos", self.repos,
239 "--add", "clang"))
Diana Picusb4307602017-04-05 19:48:39 +0200240 self.assertRegex(output,
241 "Projects linked:.*\n" +
242 ".*clang.*")
Diana Picus3b2ef822016-10-13 16:53:18 +0300243
Diana Picus81089db2017-05-05 22:26:49 +0200244 output = self.run_with_output(
245 self.llvm_projects(
Diana Picus9f756862017-12-20 10:35:08 +0100246 "--source-dir", self.llvm_src,
Diana Picusadb07c42017-11-22 16:12:57 +0100247 "--repos", self.repos,
Diana Picus81089db2017-05-05 22:26:49 +0200248 "--add", "compiler-rt", "lld"))
Diana Picusb4307602017-04-05 19:48:39 +0200249 self.assertRegex(
Diana Picus3b2ef822016-10-13 16:53:18 +0300250 output,
251 "Projects linked:.*\n" +
252 ".*clang.*\n" +
253 ".*compiler-rt.*\n" +
254 ".*lld.*")
255
Diana Picus81089db2017-05-05 22:26:49 +0200256 output = self.run_with_output(
257 self.llvm_projects(
Diana Picus9f756862017-12-20 10:35:08 +0100258 "--source-dir", self.llvm_src,
Diana Picus81089db2017-05-05 22:26:49 +0200259 "--remove", "lldb", "libcxx", "lld"))
Diana Picusb4307602017-04-05 19:48:39 +0200260 self.assertRegex(
Diana Picus3b2ef822016-10-13 16:53:18 +0300261 output,
262 "Projects linked:.*\n" +
263 ".*clang.*\n" +
264 ".*compiler-rt.*")
265
266 def test_simultaneous_add_remove(self):
267 """
268 Test that we error out when someone is trying to add and remove the same
269 project with the same command.
270 """
271 # Try the really basic case and make sure we're not touching anything
272 with self.assertRaises(subprocess.CalledProcessError) as context:
Diana Picus81089db2017-05-05 22:26:49 +0200273 self.run_with_output(
274 self.llvm_projects(
Diana Picus9f756862017-12-20 10:35:08 +0100275 "--source-dir",
276 self.llvm_src,
Diana Picusadb07c42017-11-22 16:12:57 +0100277 "--repos",
278 self.repos,
Diana Picus81089db2017-05-05 22:26:49 +0200279 "--add",
280 "clang",
281 "--remove",
282 "clang"))
Diana Picus3b2ef822016-10-13 16:53:18 +0300283
Diana Picusb4307602017-04-05 19:48:39 +0200284 self.assertRegex(
285 str(context.exception.output),
Diana Picus3b2ef822016-10-13 16:53:18 +0300286 "(.*\n)*.*Can't add and remove clang at the same time(.*\n)*")
287
288 self.assertFalse(
289 os.path.exists(
290 os.path.join(self.llvm_src, "tools", "clang")))
291
292 # Try something a bit more complicated and make sure we're not touching
293 # anything
Diana Picus3601bea2017-05-29 11:26:18 +0200294 self.add_worktree(
295 self.get_subproj_repo("lld"),
Diana Picus3b2ef822016-10-13 16:53:18 +0300296 os.path.join(self.llvm_src, "tools", "lld"),
297 self.branch)
298
299 with self.assertRaises(subprocess.CalledProcessError) as context:
Diana Picus81089db2017-05-05 22:26:49 +0200300 self.run_with_output(
301 self.llvm_projects(
Diana Picus9f756862017-12-20 10:35:08 +0100302 "--source-dir",
303 self.llvm_src,
Diana Picusadb07c42017-11-22 16:12:57 +0100304 "--repos",
305 self.repos,
Diana Picus81089db2017-05-05 22:26:49 +0200306 "--add",
307 "clang",
308 "lld",
309 "libcxx",
310 "--remove",
311 "lld",
312 "libcxx"))
Diana Picusb4307602017-04-05 19:48:39 +0200313 self.assertRegex(
314 str(context.exception.output),
Diana Picus3b2ef822016-10-13 16:53:18 +0300315 "(.*\n)*" +
316 ".*Can't add and remove (lld|libcxx) at the same time(.*\n)*")
317
318 # Make sure we didn't touch anything
319 self.assertFalse(
320 os.path.exists(
321 os.path.join(self.llvm_src, "tools", "clang")))
322 self.assertTrue(
323 os.path.exists(
324 os.path.join(self.llvm_src, "tools", "lld")))
325 self.assertFalse(
326 os.path.exists(
327 os.path.join(self.llvm_src, "projects", "libcxx")))
328
329 def test_multiple_adds_removes(self):
330 """
331 Test that we can have multiple --add and --remove options in the same
332 command and that only the last one of each kind matters.
333 """
Diana Picus81089db2017-05-05 22:26:49 +0200334 output = self.run_with_output(
335 self.llvm_projects(
Diana Picus9f756862017-12-20 10:35:08 +0100336 "--source-dir",
337 self.llvm_src,
Diana Picusadb07c42017-11-22 16:12:57 +0100338 "--repos",
339 self.repos,
Diana Picus81089db2017-05-05 22:26:49 +0200340 "--add",
341 "libcxxabi",
342 "--remove",
343 "lld",
344 "lldb",
345 "--add",
346 "clang",
347 "libcxx",
348 "--remove",
349 "libunwind"))
Diana Picusb4307602017-04-05 19:48:39 +0200350 self.assertRegex(output,
351 "Projects linked:.*\n" +
352 ".*clang.*\n" +
353 ".*libcxx.*\n")
Diana Picus3b2ef822016-10-13 16:53:18 +0300354
Diana Picus81089db2017-05-05 22:26:49 +0200355 output = self.run_with_output(
356 self.llvm_projects(
Diana Picus9f756862017-12-20 10:35:08 +0100357 "--source-dir",
358 self.llvm_src,
Diana Picusadb07c42017-11-22 16:12:57 +0100359 "--repos",
360 self.repos,
Diana Picus81089db2017-05-05 22:26:49 +0200361 "--add",
362 "libunwind",
363 "libcxxabi",
364 "--remove",
365 "clang",
366 "libcxx",
367 "--add",
368 "compiler-rt",
369 "--remove",
370 "libcxxabi"))
Diana Picusb4307602017-04-05 19:48:39 +0200371 self.assertRegex(output,
372 "Projects linked:.*\n" +
373 ".*clang.*\n" +
374 ".*compiler-rt.*\n" +
375 ".*libcxx.*\n")
Diana Picus3b2ef822016-10-13 16:53:18 +0300376
Diana Picus81089db2017-05-05 22:26:49 +0200377 output = self.run_with_output(
378 self.llvm_projects(
Diana Picus9f756862017-12-20 10:35:08 +0100379 "--source-dir",
380 self.llvm_src,
Diana Picusadb07c42017-11-22 16:12:57 +0100381 "--repos",
382 self.repos,
Diana Picus81089db2017-05-05 22:26:49 +0200383 "--add",
384 "libcxx",
385 "--remove",
386 "lld",
387 "--add",
388 "lld",
389 "--remove",
390 "libcxx"))
Diana Picusb4307602017-04-05 19:48:39 +0200391 self.assertRegex(output,
392 "Projects linked:.*\n" +
393 ".*clang.*\n" +
394 ".*compiler-rt.*\n" +
395 ".*lld.*\n")
Diana Picus81089db2017-05-05 22:26:49 +0200396
397 def test_different_env(self):
398 """
399 Test that we can have different environments in completely different
400 paths and they don't interfere when we try to add/remove projects.
401 """
402 # Create a separate environment
403 new_env = mkdtemp()
Diana Picus9f756862017-12-20 10:35:08 +0100404 new_llvm_src = os.path.join(new_env, "llvm")
Diana Picus81089db2017-05-05 22:26:49 +0200405 new_branch = "br" + str(uuid4())
Diana Picus9f756862017-12-20 10:35:08 +0100406 self.add_worktree(
407 self.get_subproj_repo("llvm"),
408 new_llvm_src,
409 new_branch)
Diana Picus81089db2017-05-05 22:26:49 +0200410
411 # Check that we start with a clean slate in both the new environment and
412 # the one that's already set up
Diana Picus9f756862017-12-20 10:35:08 +0100413 output = self.run_with_output(self.llvm_projects("--source-dir",
414 self.llvm_src))
Diana Picus81089db2017-05-05 22:26:49 +0200415 self.assertRegex(output, "Projects linked:.*\n.*none.*")
416
Diana Picus9f756862017-12-20 10:35:08 +0100417 output = self.run_with_output(self.llvm_projects("--source-dir",
418 new_llvm_src))
Diana Picus81089db2017-05-05 22:26:49 +0200419 self.assertRegex(output, "Projects linked:.*\n.*none.*")
420
421 # Make sure that adding projects works
422 output = self.run_with_output(
423 self.llvm_projects(
Diana Picus9f756862017-12-20 10:35:08 +0100424 "--source-dir", self.llvm_src,
Diana Picusadb07c42017-11-22 16:12:57 +0100425 "--repos", self.repos,
Diana Picus81089db2017-05-05 22:26:49 +0200426 "--add", "clang", "lld"))
427 self.assertRegex(output, "Projects linked:.*\n.*clang.*\n.*lld.*\n")
428
429 output = self.run_with_output(
430 self.llvm_projects(
Diana Picus9f756862017-12-20 10:35:08 +0100431 "--source-dir",
432 new_llvm_src,
Diana Picusadb07c42017-11-22 16:12:57 +0100433 "--repos",
434 self.repos,
Diana Picus81089db2017-05-05 22:26:49 +0200435 "--add",
436 "libcxx",
Diana Picus9f756862017-12-20 10:35:08 +0100437 "libcxxabi"))
Diana Picus81089db2017-05-05 22:26:49 +0200438 self.assertRegex(output,
439 "Projects linked:.*\n.*libcxx.*\n.*libcxxabi.*\n.*")
440
Diana Picus9f756862017-12-20 10:35:08 +0100441 output = self.run_with_output(
442 self.llvm_projects("--source-dir", self.llvm_src))
Diana Picus81089db2017-05-05 22:26:49 +0200443 self.assertRegex(output, "Projects linked:.*\n.*clang.*\n.*lld.*\n")
444
445 # Make sure that removing projects works
Diana Picus9f756862017-12-20 10:35:08 +0100446 output = self.run_with_output(
447 self.llvm_projects(
448 "--source-dir", self.llvm_src,
449 "--remove", "lld"))
Diana Picus81089db2017-05-05 22:26:49 +0200450 self.assertRegex(output, "Projects linked:.*\n.*clang.*\n")
451
452 output = self.run_with_output(self.llvm_projects("--remove", "libcxx",
Diana Picus9f756862017-12-20 10:35:08 +0100453 "--source-dir",
454 new_llvm_src))
Diana Picus81089db2017-05-05 22:26:49 +0200455 self.assertRegex(output,
456 "Projects linked:.*\n.*libcxxabi.*\n.*")
457
Diana Picus9f756862017-12-20 10:35:08 +0100458 output = self.run_with_output(
459 self.llvm_projects("--source-dir", self.llvm_src))
Diana Picus81089db2017-05-05 22:26:49 +0200460 self.assertRegex(output, "Projects linked:.*\n.*clang.*\n")
461
462 shutil.rmtree(new_env)