Lines Matching +full:ninja +full:- +full:bin

1 #!/bin/bash -eu
3 set -o pipefail
18 local bootstrap_mtime1=$(stat -c "%y" out/soong/.bootstrap/build.ninja)
19 local output_mtime1=$(stat -c "%y" out/soong/build.ninja)
21 local bootstrap_mtime2=$(stat -c "%y" out/soong/.bootstrap/build.ninja)
22 local output_mtime2=$(stat -c "%y" out/soong/build.ninja)
26 fail "Bootstrap Ninja file did not change on null build"
30 fail "Output Ninja file changed on null build"
37 local mtime1=$(stat -c "%y" out/soong/.bootstrap/build.ninja)
39 sed -i 's/pluginGenSrcCmd/pluginGenSrcCmd2/g' build/blueprint/bootstrap/bootstrap.go
42 local mtime2=$(stat -c "%y" out/soong/.bootstrap/build.ninja)
45 fail "Bootstrap Ninja file did not change"
51 mkdir -p a
61 grep -q "^# Module:.*my_little_binary_host" out/soong/build.ninja || fail "module not found"
72 grep -q "^# Module:.*my_little_binary_host" out/soong/build.ninja && fail "old module found"
73 grep -q "^# Module:.*my_great_binary_host" out/soong/build.ninja || fail "new module not found"
80 local mtime1=$(stat -c "%y" out/soong/build.ninja)
82 mkdir -p a
92 local mtime2=$(stat -c "%y" out/soong/build.ninja)
94 fail "Output Ninja file did not change"
97 …grep -q "^# Module:.*my_little_binary_host$" out/soong/build.ninja || fail "New module not in outp…
104 mkdir -p a
114 grep -q "^# Module:.*my_little_binary_host$" out/soong/build.ninja || fail "Module not in output"
119 if grep -q "^# Module:.*my_little_binary_host$" out/soong/build.ninja; then
132 rm -rf out
134 mkdir -p a
143 local ninja_mtime1=$(stat -c "%y" out/soong/build.ninja)
147 if [ -e "$glob_deps_file" ]; then
152 local ninja_mtime2=$(stat -c "%y" out/soong/build.ninja)
157 if [ ! -e "$glob_deps_file" ]; then
161 local glob_deps_mtime2=$(stat -c "%y" "$glob_deps_file")
164 fail "Ninja file rewritten on null incremental build"
168 local ninja_mtime3=$(stat -c "%y" out/soong/build.ninja)
169 local glob_deps_mtime3=$(stat -c "%y" "$glob_deps_file")
172 fail "Ninja file rewritten on null incremental build"
184 mkdir -p a
193 local mtime1=$(stat -c "%y" out/soong/build.ninja)
198 local mtime2=$(stat -c "%y" out/soong/build.ninja)
200 fail "Output Ninja file did not change"
203 grep -q my_little_library.py out/soong/build.ninja || fail "new file is not in output"
209 mkdir -p cherry
217 "soong-android",
269 grep -q "CHERRY IS TASTY" out/soong/build.ninja \
274 grep -q "CHERRY IS RED" out/soong/build.ninja \
276 local mtime1=$(stat -c "%y" out/soong/build.ninja)
279 local mtime2=$(stat -c "%y" out/soong/build.ninja)
281 fail "Output Ninja file changed when environment variable did not"
289 local mtime1=$(stat -c "%y" out/soong/build.ninja)
291 mkdir -p a
294 name: "picard-soong-rules",
299 "soong-android",
351 local mtime2=$(stat -c "%y" out/soong/build.ninja)
353 fail "Output Ninja file did not change"
356 grep -q "Make it so" out/soong/build.ninja || fail "New action not present"
364 mkdir -p a
370 name: "picard-soong-rules",
375 "soong-android",
429 local mtime1=$(stat -c "%y" out/soong/build.ninja)
431 grep -q "Make it so" out/soong/build.ninja || fail "Original action not present"
435 name: "worf-soong-rules",
440 "soong-android",
441 "picard-soong-rules",
461 local mtime2=$(stat -c "%y" out/soong/build.ninja)
463 fail "Output Ninja file did not change"
466 grep -q "Engage" out/soong/build.ninja || fail "New action not present"
468 if grep -q "Make it so" out/soong/build.ninja; then
476 local mtime1=$(stat -c "%y" out/soong/build.ninja)
478 prebuilts/build-tools/linux-x86/bin/ninja -f out/soong/build.ninja soong_docs
480 local mtime2=$(stat -c "%y" out/soong/build.ninja)
483 fail "Output Ninja file changed on null build"
490 [[ -e out/soong/.bootstrap/bp2build_workspace_marker ]] || fail "bp2build marker file not created"
491 [[ -e out/soong/workspace ]] || fail "Bazel workspace not created"
497 mkdir -p a
508 [[ -e out/soong/bp2build/a/BUILD ]] || fail "a/BUILD not created"
509 [[ -L out/soong/workspace/a/BUILD ]] || fail "a/BUILD not symlinked"
511 mkdir -p b
522 [[ -e out/soong/bp2build/b/BUILD ]] || fail "a/BUILD not created"
523 [[ -L out/soong/workspace/b/BUILD ]] || fail "a/BUILD not symlinked"
530 local mtime1=$(stat -c "%y" out/soong/build.ninja)
533 local mtime2=$(stat -c "%y" out/soong/build.ninja)
536 fail "Output Ninja file changed on null build"
543 mkdir -p a
554 grep -q a1.txt out/soong/bp2build/a/BUILD || fail "a1.txt not in BUILD file"
558 grep -q a2.txt out/soong/bp2build/a/BUILD || fail "a2.txt not in BUILD file"
564 if [[ ! -r "$MOCK_TOP/modules.json" ]]; then
572 mkdir -p a/b
584 [[ -e out/soong/workspace ]] || fail "Bazel workspace not created"
585 [[ -d out/soong/workspace/a/b ]] || fail "module directory not a directory"
586 [[ -L out/soong/workspace/a/b/BUILD ]] || fail "BUILD file not symlinked"
587 [[ "$(readlink -f out/soong/workspace/a/b/BUILD)" =~ bp2build/a/b/BUILD$ ]] \
589 [[ -L out/soong/workspace/a/b/b.txt ]] || fail "a/b/b.txt not symlinked"
590 [[ -L out/soong/workspace/a/a.txt ]] || fail "a/b/a.txt not symlinked"
591 [[ ! -e out/soong/workspace/out ]] || fail "out directory symlinked"
597 mkdir -p a
611 [[ -L out/soong/workspace/a/a2.txt ]] || fail "a/a2.txt not symlinked"
617 mkdir -p a
629 [[ -L out/soong/workspace/a/BUILD ]] || fail "BUILD file not symlinked"
630 [[ "$(readlink -f out/soong/workspace/a/BUILD)" =~ bp2build/a/BUILD$ ]] \
637 mkdir -p a/BUILD
647 mkdir -p b/BUILD
661 grep -q "a/BUILD' exist" "$MOCK_TOP/errors" || fail "Error for a/BUILD not found"
662 grep -q "b/BUILD' exist" "$MOCK_TOP/errors" || fail "Error for b/BUILD not found"