Skip to content

Commit

Permalink
[beaker-tests-backend] tests for building mageia targets
Browse files Browse the repository at this point in the history
  • Loading branch information
clime committed Sep 15, 2016
1 parent 1abc2b6 commit a69c178
Show file tree
Hide file tree
Showing 11 changed files with 91 additions and 0 deletions.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
x�Tkk�0��ӯXG_�wv��9J�$��6ܥ�� �[�,)���4��ʗ�ݒ�;;3;������M7�`���A� C���FE>�w�ʈ��h�w����%w�W�ki-}��p9�:/ Q'&�fr@ ��A���z?�^zo���Zq��Y�P+�I���pU>燌k��l2a�r�ɍӅ����F(cL��`N2��!����H�j�hk�Jc[�zm�9��:`�j�Kr>;e7YO���в�j\������s�
ڧY���k�xF
�`��.gTi�9�\p���8"��3��J�*9�\"���Οt�F6q���U�1�z��f�������$V��:��b) ���o�I*&֔F����w���X��6h\#�g�x+(��������ۋ�u+)��3�VV� b_�e�3Zq��_����=������^�ʬա��O�G?Z�u������X��նI�y ��6����9 a�R����`~�[x���'�;���({Ƨ�a�.� ��b�<��c��TK��`�6VI���q��Ӂ�դ9���/!���a�
Expand Down
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.

Copy link
@praiskup

praiskup Sep 16, 2016

Member

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 :)

This comment has been minimized.

Copy link
@clime

clime Sep 17, 2016

Contributor

These files got generated after a commit into the repo, which was done to support new test-cases. I strongly think removing them isn't a good idea.

This comment has been minimized.

Copy link
@praiskup

praiskup Sep 17, 2016

Member

So you claim this hasn't got generated before you've pushed that?

Usually people generate the stuff dynamically during tests, or during release time into tarballs -- but never put such things into git please.

This comment has been minimized.

Copy link
@praiskup

praiskup Sep 17, 2016

Member

:-(

$ time git clone https://github.com/fedora-copr/copr.git
Cloning into 'copr'...
warning: templates not found /home/praiskup/.git_templates
remote: Counting objects: 27304, done.
remote: Compressing objects: 100% (146/146), done.
remote: Total 27304 (delta 62), reused 0 (delta 0), pack-reused 27143
Receiving objects: 100% (27304/27304), 78.94 MiB | 590.00 KiB/s, done.
Resolving deltas: 100% (19729/19729), done.
Checking connectivity... done.

real    2m30.079s
user    0m5.034s
sys     0m4.119s

This comment has been minimized.

Copy link
@clime

clime Sep 17, 2016

Contributor

So you claim this hasn't got generated before you've pushed that?

Pushed into the dist-git repo which forms test data for backend suite, yes.

Usually people generate the stuff dynamically during tests, or during release time into tarballs -- but never put such >things into git please.

I don't see any issue in putting test data into git repo. Making it a tarball is something that might be done.

This comment has been minimized.

Copy link
@praiskup

praiskup Sep 18, 2016

Member

Please put into VCS only sources. That's my wish.
Not only the size, but also unpredictable content is a good reason to avoid binaries in VCS. I'm obviously missing
something important here in this case, but in general - please.

Binary file not shown.
Binary file not shown.
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
}
]
38 changes: 38 additions & 0 deletions beaker-tests/Regression/backend/tests/mageia-builds/run.sh
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
Binary file not shown.

0 comments on commit a69c178

Please sign in to comment.