blob: c83d2f43af652b361faba23e1fc6d4378a491d2b [file] [log] [blame]
# Check our handling of timestamp collisions and update-if-newer behavior.
# Verify that we perform update-if-newer if the output and the input have the
# exact same timestamp (using touch -r).
#
# RUN: rm -rf %t.build
# RUN: mkdir -p %t.build
# RUN: cp %s %t.build/build.ninja
# RUN: touch -r / %t.build/input %t.build/output
# RUN: %{llbuild} ninja build --no-db --jobs 1 --chdir %t.build &> %t1.out
# RUN: %{FileCheck} --check-prefix CHECK-COLLISION --input-file %t1.out %s
#
# CHECK-COLLISION: no work to do
# Verify that we perform a stricter check in --strict mode.
#
# RUN: %{llbuild} ninja build --strict --no-db --jobs 1 --chdir %t.build &> %t2.out
# RUN: %{FileCheck} --check-prefix CHECK-STRICT --input-file %t2.out %s
#
# CHECK-STRICT: [1/{{.*}}] cat input > output
rule CAT
command = cat ${in} > ${out}
# We mark this as a generator command to avoid comparisons on the command hash.
generator = 1
build output: CAT input