| # Sanity check graphviz output |
| |
| # We run the build in a sandbox in the temp directory to ensure we don't |
| # interact with the source dirs. |
| # |
| # RUN: rm -rf %t.build |
| # RUN: mkdir -p %t.build |
| # RUN: cp %s %t.build/build.ninja |
| # RUN: %{llbuild} ninja build --jobs 1 --chdir %t.build --no-db --simulate --dump-graph %t.dot |
| # RUN: %{FileCheck} < %t.dot %s |
| # |
| # CHECK: digraph {{.*}} { |
| # CHECK: "a.c" |
| # |
| # CHECK: "a.o" |
| # CHECK-NEXT: "a.o" -> "a.c" |
| # |
| # CHECK: "a.out" |
| # We skip a -next here, to avoid a dependency on the traversal order. |
| # CHECK: "a.out" -> "a.o" |
| # |
| # CHECK: "b.c" |
| # |
| # CHECK: "b.o" |
| # CHECK-NEXT: "b.o" -> "b.c" |
| |
| rule CC |
| command = cc -c -o ${out} ${in} |
| rule LINK |
| command = cc -o ${out} ${in} |
| |
| build a.o: CC a.c |
| build b.o: CC b.c |
| build a.out: LINK a.o b.o |
| |
| default a.out |