-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
x�Q | ||
� ��;�P�5]��VV �"��Nߌ�KL�������{&�h�iT����/�{��Ǵ�Ő�"����o���� | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
clime
Contributor
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
d19d24884c26aa037fc31606b9efb88dae83b273 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
d19d24884c26aa037fc31606b9efb88dae83b273 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
[ | ||
{ | ||
"_description": "test mageia-6 chroot", | ||
"_expected_outcome": "success", | ||
|
||
"build_id": 100, | ||
"buildroot_pkgs": null, | ||
"chroot": "mageia-6-x86_64", | ||
"enable_net": true, | ||
"git_branch": "mga6", | ||
"git_hash": "d19d24884c26aa037fc31606b9efb88dae83b273", | ||
"git_repo": "@copr/copr-dev/example", | ||
"memory_reqs": 2048, | ||
"package_name": "example", | ||
"package_version": "1.0.5-1.git.6.4278ca6.fc23", | ||
"pkgs": "", | ||
"project_name": "copr-dev", | ||
"project_owner": "@copr", | ||
"repos": "", | ||
"submitter": "clime", | ||
"task_id": "100-mageia-6-x86_64", | ||
"timeout": 21600 | ||
}, | ||
{ | ||
"_description": "test mageia-cauldron chroot", | ||
"_expected_outcome": "success", | ||
|
||
"build_id": 110, | ||
"buildroot_pkgs": null, | ||
"chroot": "mageia-cauldron-x86_64", | ||
"enable_net": true, | ||
"git_branch": "cauldron", | ||
"git_hash": "d19d24884c26aa037fc31606b9efb88dae83b273", | ||
"git_repo": "@copr/copr-dev/example", | ||
"memory_reqs": 2048, | ||
"package_name": "example", | ||
"package_version": "1.0.5-1.git.6.4278ca6.fc23", | ||
"pkgs": "", | ||
"project_name": "copr-dev", | ||
"project_owner": "@copr", | ||
"repos": "", | ||
"submitter": "clime", | ||
"task_id": "110-mageia-cauldron-x86_64", | ||
"timeout": 21600 | ||
} | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
|
||
. /usr/bin/rhts-environment.sh || exit 1 | ||
. /usr/share/beakerlib/beakerlib.sh || exit 1 | ||
|
||
export TESTPATH="$( builtin cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
export IN=$TESTPATH/build-tasks.json | ||
export OUT=$TESTPATH/build-results.out.json | ||
|
||
rlJournalStart | ||
rlPhaseStartSetup | ||
docker exec copr-backend /bin/mock --scrub=all | ||
rlPhaseEnd | ||
|
||
rlPhaseStartTest Builds | ||
# input crunching | ||
rlRun "/usr/share/copr/mocks/frontend/app.py $TESTPATH $TESTPATH/static" 0 | ||
|
||
# basic outcomes test | ||
rlRun "jq -e -n --argfile a $IN --argfile b $OUT\ | ||
'(\$a | sort_by(.build_id) | map({build_id: .build_id, status: (if (._expected_outcome == \"success\") then 1 else 0 end)})) ==\ | ||
(\$b | sort_by(.build_id) | map({build_id: .build_id, status: .status}))'" 0 "Compare expected and actual build outcomes (success/fail)." | ||
|
||
# further tests | ||
outsize=`jq 'length' $OUT` | ||
for (( i = 0; i < $outsize; i++ )); do | ||
results_repo_url=`jq ".[$i] | .results_repo_url" $OUT` | ||
chroot=`jq ".[$i] | .chroot" $OUT` | ||
package_name=`jq ".[$i] | .package_name" $OUT` | ||
build_status=`jq ".[$i] | .status" $OUT` | ||
if [[ build_status -eq 1 ]]; then | ||
repo_url=$results_repo_url/$chroot | ||
rlRun "dnf -y --repofrompath repo,$repo_url --disablerepo=* --enablerepo=repo --quiet --refresh repoquery $package_name" 0 | ||
fi | ||
done | ||
rlPhaseEnd | ||
rlJournalEnd &> /dev/null |
Please remove such binary blobs from repository. You'll never make the git repository smaller :(. Up to that, within such changes might be hidden ugly things :)