Skip to content

Commit

Permalink
Removing build and test control files from WORKSPACE and just relying…
Browse files Browse the repository at this point in the history
… on those in INSTALL_ROOT, this is because we need to nuke the workspace on each run with JGit.
  • Loading branch information
jelu committed Dec 18, 2013
1 parent 9e947fd commit bf1567d
Showing 1 changed file with 9 additions and 49 deletions.
58 changes: 9 additions & 49 deletions testing/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit bf1567d

Please sign in to comment.