Skip to content

Commit

Permalink
Allow using extra sources
Browse files Browse the repository at this point in the history
This is an ugly hack to be able to reuse the scripts to test custom
repos and rpms

Change-Id: I3ea253c6959cd65b31970416619fda017ff0b5cd
Signed-off-by: David Caro <dcaroest@redhat.com>
  • Loading branch information
david-caro committed Jun 20, 2016
1 parent f4eaad1 commit 1a8f561
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 9 deletions.
14 changes: 11 additions & 3 deletions automation/basic_suite_3.6.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
# mock_runner.sh or chrooter, from the root of the repository:
#
# $ cd repository/root
# $ mock_runner.sh -e automation/basic_suite_3.5.sh
# $ mock_runner.sh -e automation/basic_suite_3.6.sh
# or
# $ chrooter -s automation/basic_suite_3.5.sh
# $ chrooter -s automation/basic_suite_3.6.sh
#

cleanup() {
Expand All @@ -28,6 +28,14 @@ export LIBGUESTFS_BACKEND=direct
#export LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1
trap cleanup SIGTERM EXIT
res=0
./run_suite.sh basic_suite_3.6 \

# This is used to test external sources
# it's done by putting them one by line in the ./extra_sources file
extra_sources_cmd=''
if [[ -e ./extra_sources ]]; then
extra_sources_cmd+="-s \"conf:$PWD/extra_sources\""
fi

./run_suite.sh $extra_sources_cmd basic_suite_3.6 \
|| res=$?
exit $res
14 changes: 11 additions & 3 deletions automation/basic_suite_4.0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
# mock_runner.sh or chrooter, from the root of the repository:
#
# $ cd repository/root
# $ mock_runner.sh -e automation/basic_suite_master.sh
# $ mock_runner.sh -e automation/basic_suite_4.0.sh
# or
# $ chrooter -s automation/basic_suite_master.sh
# $ chrooter -s automation/basic_suite_4.0.sh
#

cleanup() {
Expand All @@ -28,6 +28,14 @@ export LIBGUESTFS_BACKEND=direct
#export LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1
trap cleanup SIGTERM EXIT
res=0
./run_suite.sh basic_suite_4.0 \

# This is used to test external sources
# it's done by putting them one by line in the ./extra_sources file
extra_sources_cmd=''
if [[ -e ./extra_sources ]]; then
extra_sources_cmd+="-s \"conf:$PWD/extra_sources\""
fi

./run_suite.sh $extra_sources_cmd basic_suite_4.0 \
|| res=$?
exit $res
10 changes: 9 additions & 1 deletion automation/basic_suite_master.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ export LIBGUESTFS_BACKEND=direct
#export LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1
trap cleanup SIGTERM EXIT
res=0
./run_suite.sh basic_suite_master \

# This is used to test external sources
# it's done by putting them one by line in the ./extra_sources file
extra_sources_cmd=''
if [[ -e ./extra_sources ]]; then
extra_sources_cmd+="-s \"conf:$PWD/extra_sources\""
fi

./run_suite.sh $extra_sources_cmd basic_suite_master \
|| res=$?
exit $res
2 changes: 1 addition & 1 deletion basic_suite_3.6/control.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ run_suite () {
env_collect "$PWD/test_logs/${SUITE##*/}/post-${scenario##*/}"
if $failed; then
echo "@@@@ ERROR: Failed running $scenario"
break
return 1
fi
done
}
2 changes: 1 addition & 1 deletion image_ng_suite_3.6/control.sh
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ run_suite(){
env_collect "$curdir/test_logs/${suite##*/}/post-${scenario##*/}"
if $failed; then
echo "@@@@ ERROR: Failed running $scenario"
break
return 1
fi
done
}
1 change: 1 addition & 0 deletions run_suite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ env_repo_setup () {\
cd $PREFIX
for extrasrc in "${EXTRA_SOURCES[@]}"; do
extrasrcs+=("--custom-source=$extrasrc")
echo "Adding extra source: $extrasrc"
done
$CLI ovirt reposetup \
--reposync-yum-config $SUITE/reposync-config.repo \
Expand Down

0 comments on commit 1a8f561

Please sign in to comment.