-
Notifications
You must be signed in to change notification settings - Fork 437
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3040 from M0ses/osc-based-testing
first version of osc based testing
- Loading branch information
Showing
8 changed files
with
140 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
set -e | ||
echo "1..1" | ||
|
||
cat <<EOF > $HOME/.oscrc | ||
[general] | ||
apiurl = https://localhost | ||
[https://localhost] | ||
user=Admin | ||
pass=opensuse | ||
EOF | ||
|
||
echo "ok - configuring osc" | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
BASE_DIR=$(dirname $0) | ||
|
||
#export BASH_TAP_ROOT=$BASE_DIR | ||
#. $BASE_DIR/../bash-tap-bootstrap | ||
|
||
# plan | ||
echo "1..1" | ||
|
||
osc meta prj openSUSE.org -F $BASE_DIR/fixtures/openSUSE.org.xml | ||
|
||
if [ $? -gt 0 ];then | ||
echo "not ok - Creation of interconnect project" | ||
else | ||
echo "ok - Creation of interconnect project" | ||
fi | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
# plan | ||
echo "1..1" | ||
|
||
BASE_DIR=$(dirname $0) | ||
TMP_DIR=$BASE_DIR/tmp | ||
|
||
osc meta prj home:Admin -F $BASE_DIR/fixtures/home\:Admin.xml | ||
|
||
if [ $? -gt 0 ];then | ||
echo "not ok - Creation of home:Admin project" | ||
else | ||
echo "ok - Creation of home:Admin project" | ||
fi | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
|
||
RCODE=0 | ||
# plan | ||
echo "1..1" | ||
|
||
BASE_DIR=$(dirname $0) | ||
|
||
#export BASH_TAP_ROOT=$BASE_DIR | ||
#. $BASE_DIR/../bash-tap-bootstrap | ||
|
||
TMP_DIR=$BASE_DIR/tmp | ||
|
||
rm -rf $TMP_DIR | ||
mkdir -p $TMP_DIR | ||
cd $TMP_DIR | ||
|
||
osc co home:Admin | ||
cd home\:Admin | ||
mkdir obs-testpackage | ||
osc add obs-testpackage | ||
cd obs-testpackage | ||
cp $BASE_DIR/fixtures/obs-testpackage._service ./_service | ||
osc ar | ||
osc ci -m "initial version" | ||
osc r -w | ||
|
||
|
||
got=`osc r|grep succeeded|wc -l` | ||
|
||
if [ $got -eq 2 ];then | ||
echo "ok - Checking build results" | ||
else | ||
echo "not ok - Checking build results" | ||
RCODE=1 | ||
fi | ||
|
||
exit $RCODE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
# plan | ||
echo "1..1" | ||
|
||
BASE_DIR=$(dirname $0) | ||
TMP_DIR=$BASE_DIR/tmp | ||
cd $TMP_DIR/home\:Admin | ||
osc delete obs-testpackage | ||
|
||
if [ $? -gt 0 ];then | ||
echo "not ok - Deleting package obs-testpackage" | ||
else | ||
echo "ok - Deleting package obs-testpackage" | ||
fi | ||
|
||
osc ci -m "removed package obs-testpackage" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<project name="home:Admin"> | ||
<title/> | ||
<description/> | ||
<person userid="Admin" role="maintainer"/> | ||
<repository name="openSUSE_Tumbleweed"> | ||
<path project="openSUSE.org:openSUSE:Factory" repository="snapshot"/> | ||
<arch>i586</arch> | ||
</repository> | ||
<repository name="openSUSE_Leap_42.2"> | ||
<path project="openSUSE.org:openSUSE:Leap:42.2" repository="standard"/> | ||
<arch>x86_64</arch> | ||
</repository> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<services> | ||
<service name="obs_scm"> | ||
<param name="versionformat">%ad</param> | ||
<param name="url">git://github.com/M0ses/obs-testpackage.git</param> | ||
<param name="scm">git</param> | ||
<param name="extract">dist/obs-testpackage.spec</param> | ||
</service> | ||
<service name="tar" mode="buildtime"/> | ||
<service name="recompress" mode="buildtime"> | ||
<param name="compression">xz</param> | ||
<param name="file">*.tar</param> | ||
</service> | ||
<service name="set_version" mode="buildtime"/> | ||
</services> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<project name="openSUSE.org"> | ||
<title>Remote OBS instance</title> | ||
<description>This project is representing a remote build service instance.</description> | ||
<remoteurl>https://api.opensuse.org/public</remoteurl> | ||
</project> |