3 testname=`basename "$0"`
4 test_description="Do not fail if two always-ed targets run simultaneously"
5 . $SHARNESS_TEST_SRCDIR/sharness.sh
6 export REDO_TOP_DIR="`pwd`" REDO_NO_PROGRESS=1
8 echo redo-ifchange version.h > all.do
9 cat > version.h.do <<EOF
10 redo-ifchange date version version.h.in
11 VERSION=\$(cat version)
14 sed -e "s/%%VERSION%%/\${VERSION}/g" \
15 -e "s/%%DATE%%/\${DATE}/g" \
19 cat > version.do <<EOF
20 git rev-parse --short HEAD > "\$3"
25 date +'%Y%m%d_%H%M%S' >"\$3"
29 cat > version.h.in <<EOF
30 #define PRJ_VERSION "%%VERSION%%"
31 #define PRJ_BLDDATE "%%DATE%%"
34 test_expect_success "first run is successful" redo
36 test_expect_success "second run is successful" redo