From bf1567ded0aa87086290754887a63c9cff9f5170 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jerry=20Lundstr=C3=B6m?= Date: Wed, 18 Dec 2013 11:01:26 +0100 Subject: [PATCH] Removing build and test control files from WORKSPACE and just relying on those in INSTALL_ROOT, this is because we need to nuke the workspace on each run with JGit. --- testing/lib.sh | 58 ++++++++------------------------------------------ 1 file changed, 9 insertions(+), 49 deletions(-) diff --git a/testing/lib.sh b/testing/lib.sh index ff6e43a..7a4a369 100644 --- a/testing/lib.sh +++ b/testing/lib.sh @@ -608,17 +608,11 @@ check_if_built () local name_tag="$1" - if [ -f "$WORKSPACE/.$name_tag.build" ]; then - local build_rev=`cat "$WORKSPACE/.$name_tag.build" 2>/dev/null` + if [ -f "$INSTALL_ROOT/.$name_tag.build" ]; then + local build_rev=`cat "$INSTALL_ROOT/.$name_tag.build" 2>/dev/null` if [ "$REVISION" = "$build_rev" ]; then - if [ -f "$INSTALL_ROOT/.$name_tag.build" ]; then - local build_rev=`cat "$INSTALL_ROOT/.$name_tag.build" 2>/dev/null` - - if [ "$REVISION" = "$build_rev" ]; then - return 0 - fi - fi + return 0 fi fi @@ -664,20 +658,6 @@ set_build_ok () exit 1 fi - echo "$REVISION" > "$WORKSPACE/.$name_tag.build" - - if [ -f "$WORKSPACE/.$name_tag.build" ]; then - local build_rev=`cat "$WORKSPACE/.$name_tag.build" 2>/dev/null` - - if [ "$REVISION" != "$build_rev" ]; then - echo "set_build_ok: Can't tag build file $WORKSPACE/.$name_tag.build !" >&2 - return 1 - fi - else - echo "set_build_ok: Can't tag build file $WORKSPACE/.$name_tag.build !" >&2 - return 1 - fi - echo "$REVISION" > "$INSTALL_ROOT/.$name_tag.build" if [ -f "$INSTALL_ROOT/.$name_tag.build" ]; then @@ -710,20 +690,14 @@ check_if_tested () local name_tag="$1" - if [ -f "$WORKSPACE/.$name_tag.test" ]; then - local build_rev=`cat "$WORKSPACE/.$name_tag.test" 2>/dev/null` + if [ -f "$INSTALL_ROOT/.$name_tag.test" ]; then + local build_rev=`cat "$INSTALL_ROOT/.$name_tag.test" 2>/dev/null` if [ "$REVISION" = "$build_rev" ]; then - if [ -f "$INSTALL_ROOT/.$name_tag.test" ]; then - local build_rev=`cat "$INSTALL_ROOT/.$name_tag.test" 2>/dev/null` - - if [ "$REVISION" = "$build_rev" ]; then - if [ -f junit.xml ]; then - touch junit.xml - fi - return 0 - fi - fi + if [ -f junit.xml ]; then + touch junit.xml + fi + return 0 fi fi @@ -846,20 +820,6 @@ set_test_ok () exit 1 fi - echo "$REVISION" > "$WORKSPACE/.$name_tag.test" - - if [ -f "$WORKSPACE/.$name_tag.test" ]; then - local test_rev=`cat "$WORKSPACE/.$name_tag.test" 2>/dev/null` - - if [ "$REVISION" != "$test_rev" ]; then - echo "set_test_ok: Can't tag test file $WORKSPACE/.$name_tag.test !" >&2 - return 1 - fi - else - echo "set_test_ok: Can't tag test file $WORKSPACE/.$name_tag.test !" >&2 - return 1 - fi - echo "$REVISION" > "$INSTALL_ROOT/.$name_tag.test" if [ -f "$INSTALL_ROOT/.$name_tag.test" ]; then