How to use test_push method in uiautomator

Best Python code snippet using uiautomator

beagle.py

Source: beagle.py Github

copy

Full Screen

1# This is for gecko-dev, which is a developer-oriented repo with2# release-train and inbound branches.3import os4import socket5hostname = socket.gethostname()6CVS_MANIFEST = """[{7"size": 1301484692,8"digest": "89df462d8d20f54402caaaa4e3c10aa54902a1d7196cdf86b7790b76e62d302ade3102dc3f7da4145dd832e6938b0472370ce6a321e0b3bcf0ad050937bd0e9a",9"algorithm": "sha512",10"filename": "mozilla-cvs-history.tar.bz2"11}]12"""13config = {14 "log_name": "beagle",15 "log_max_rotate": 99,16 "repos": [{17 "repo": "https:/​/​hg.mozilla.org/​users/​hwine_mozilla.com/​repo-sync-tools",18 "vcs": "hg",19 }],20 "job_name": "beagle",21 "conversion_dir": "beagle",22 "initial_repo": {23 "repo": "https:/​/​hg.mozilla.org/​mozilla-central",24 "revision": "default",25 "repo_name": "mozilla-central",26 "targets": [{27 "target_dest": "beagle/​.git",28 "vcs": "git",29 "test_push": True,30 }, {31 "target_dest": "gitmo-beagle",32 }, {33 "target_dest": "github-beagle",34 }],35 "vcs": "hg",36 "branch_config": {37 "branches": {38 "default": "master",39 },40 },41 },42 "backup_dir": "/​mnt/​netapp/​github_sync/​aki/​%s" % hostname,43 "cvs_manifest": CVS_MANIFEST,44 "cvs_history_tarball": "/​home/​pmoore/​mozilla-cvs-history.tar.bz2",45 "env": {46 "PATH": "%(PATH)s:/​usr/​libexec/​git-core",47 },48 "conversion_repos": [{49 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-b2g18",50 "revision": "default",51 "repo_name": "mozilla-b2g18",52 "targets": [{53 "target_dest": "beagle/​.git",54 "vcs": "git",55 "test_push": True,56 }, {57 "target_dest": "gitmo-beagle",58 }, {59 "target_dest": "github-beagle",60 "tag_config": {61 "tag_regexes": [62 "^B2G_",63 ],64 },65 }],66 "vcs": "hg",67 "branch_config": {68 "branches": {69 "default": "b2g18",70 },71 },72 "tag_config": {73 "tag_regexes": [74 "^B2G_",75 ],76 },77 "mapper": {78 "url": "https:/​/​api.pub.build.mozilla.org/​mapper",79 "project": "gecko-dev"80 },81 }, {82 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-b2g26_v1_2",83 "revision": "default",84 "repo_name": "mozilla-b2g26_v1_2",85 "targets": [{86 "target_dest": "beagle/​.git",87 "vcs": "git",88 "test_push": True,89 }, {90 "target_dest": "gitmo-beagle",91 }, {92 "target_dest": "github-beagle",93 "tag_config": {94 "tag_regexes": [95 "^B2G_",96 ],97 },98 }],99 "vcs": "hg",100 "branch_config": {101 "branches": {102 "default": "b2g26_v1_2",103 },104 },105 "tag_config": {106 "tag_regexes": [107 "^B2G_",108 ],109 },110 "mapper": {111 "url": "https:/​/​api.pub.build.mozilla.org/​mapper",112 "project": "gecko-dev"113 },114 }, {115 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-b2g26_v1_2f",116 "revision": "default",117 "repo_name": "mozilla-b2g26_v1_2f",118 "targets": [{119 "target_dest": "beagle/​.git",120 "vcs": "git",121 "test_push": True,122 }, {123 "target_dest": "gitmo-beagle",124 }, {125 "target_dest": "github-beagle",126 "tag_config": {127 "tag_regexes": [128 "^B2G_",129 ],130 },131 }],132 "vcs": "hg",133 "branch_config": {134 "branches": {135 "default": "b2g26_v1_2f",136 },137 },138 "tag_config": {139 "tag_regexes": [140 "^B2G_",141 ],142 },143 "mapper": {144 "url": "https:/​/​api.pub.build.mozilla.org/​mapper",145 "project": "gecko-dev"146 },147 }, {148 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-b2g28_v1_3",149 "revision": "default",150 "repo_name": "mozilla-b2g28_v1_3",151 "targets": [{152 "target_dest": "beagle/​.git",153 "vcs": "git",154 "test_push": True,155 }, {156 "target_dest": "gitmo-beagle",157 }, {158 "target_dest": "github-beagle",159 "tag_config": {160 "tag_regexes": [161 "^B2G_",162 ],163 },164 }],165 "vcs": "hg",166 "branch_config": {167 "branches": {168 "default": "b2g28_v1_3",169 },170 },171 "tag_config": {172 "tag_regexes": [173 "^B2G_",174 ],175 },176 "mapper": {177 "url": "https:/​/​api.pub.build.mozilla.org/​mapper",178 "project": "gecko-dev"179 },180 }, {181 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-b2g28_v1_3t",182 "revision": "default",183 "repo_name": "mozilla-b2g28_v1_3t",184 "targets": [{185 "target_dest": "beagle/​.git",186 "vcs": "git",187 "test_push": True,188 }, {189 "target_dest": "gitmo-beagle",190 }, {191 "target_dest": "github-beagle",192 "tag_config": {193 "tag_regexes": [194 "^B2G_",195 ],196 },197 }],198 "vcs": "hg",199 "branch_config": {200 "branches": {201 "default": "b2g28_v1_3t",202 },203 },204 "tag_config": {205 "tag_regexes": [206 "^B2G_",207 ],208 },209 "mapper": {210 "url": "https:/​/​api.pub.build.mozilla.org/​mapper",211 "project": "gecko-dev"212 },213 }, {214 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-b2g30_v1_4",215 "revision": "default",216 "repo_name": "mozilla-b2g30_v1_4",217 "targets": [{218 "target_dest": "beagle/​.git",219 "vcs": "git",220 "test_push": True,221 }, {222 "target_dest": "gitmo-beagle",223 }, {224 "target_dest": "github-beagle",225 "tag_config": {226 "tag_regexes": [227 "^B2G_",228 ],229 },230 }],231 "vcs": "hg",232 "branch_config": {233 "branches": {234 "default": "b2g30_v1_4",235 },236 },237 "tag_config": {238 "tag_regexes": [239 "^B2G_",240 ],241 },242 "mapper": {243 "url": "https:/​/​api.pub.build.mozilla.org/​mapper",244 "project": "gecko-dev"245 },246 }, {247 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-b2g34_v2_1",248 "revision": "default",249 "repo_name": "mozilla-b2g34_v2_1",250 "targets": [{251 "target_dest": "beagle/​.git",252 "vcs": "git",253 "test_push": True,254 }, {255 "target_dest": "gitmo-beagle",256 }, {257 "target_dest": "github-beagle",258 }],259 "vcs": "hg",260 "branch_config": {261 "branches": {262 "default": "b2g34_v2_1",263 },264 },265 "tag_config": {266 "tag_regexes": [267 "^B2G_",268 ],269 },270 "mapper": {271 "url": "https:/​/​api.pub.build.mozilla.org/​mapper",272 "project": "gecko-dev"273 },274 }, {275 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-b2g37_v2_2",276 "revision": "default",277 "repo_name": "mozilla-b2g37_v2_2",278 "targets": [{279 "target_dest": "beagle/​.git",280 "vcs": "git",281 "test_push": True,282 }, {283 "target_dest": "gitmo-beagle",284 }, {285 "target_dest": "github-beagle",286 }],287 "vcs": "hg",288 "branch_config": {289 "branches": {290 "default": "b2g37_v2_2",291 },292 },293 "tag_config": {294 "tag_regexes": [295 "^B2G_",296 ],297 },298 "mapper": {299 "url": "https:/​/​api.pub.build.mozilla.org/​mapper",300 "project": "gecko-dev"301 },302 }, {303 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-b2g37_v2_2r",304 "revision": "default",305 "repo_name": "mozilla-b2g37_v2_2r",306 "targets": [{307 "target_dest": "beagle/​.git",308 "vcs": "git",309 "test_push": True,310 }, {311 "target_dest": "gitmo-beagle",312 }, {313 "target_dest": "github-beagle",314 }],315 "vcs": "hg",316 "branch_config": {317 "branches": {318 "default": "b2g37_v2_2r",319 },320 },321 "tag_config": {322 "tag_regexes": [323 "^B2G_",324 ],325 },326 "mapper": {327 "url": "https:/​/​api.pub.build.mozilla.org/​mapper",328 "project": "gecko-dev"329 },330 }, {331 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-b2g32_v2_0",332 "revision": "default",333 "repo_name": "mozilla-b2g32_v2_0",334 "targets": [{335 "target_dest": "beagle/​.git",336 "vcs": "git",337 "test_push": True,338 }, {339 "target_dest": "gitmo-beagle",340 }, {341 "target_dest": "github-beagle",342 }],343 "vcs": "hg",344 "branch_config": {345 "branches": {346 "default": "b2g32_v2_0",347 },348 },349 "tag_config": {350 "tag_regexes": [351 "^B2G_",352 ],353 },354 "mapper": {355 "url": "https:/​/​api.pub.build.mozilla.org/​mapper",356 "project": "gecko-dev"357 },358 }, {359 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-b2g32_v2_0m",360 "revision": "default",361 "repo_name": "mozilla-b2g32_v2_0m",362 "targets": [{363 "target_dest": "beagle/​.git",364 "vcs": "git",365 "test_push": True,366 }, {367 "target_dest": "gitmo-beagle",368 }, {369 "target_dest": "github-beagle",370 }],371 "vcs": "hg",372 "branch_config": {373 "branches": {374 "default": "b2g32_v2_0m",375 },376 },377 "tag_config": {378 "tag_regexes": [379 "^B2G_",380 ],381 },382 "mapper": {383 "url": "https:/​/​api.pub.build.mozilla.org/​mapper",384 "project": "gecko-dev"385 },386 }, {387 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-b2g18_v1_1_0_hd",388 "revision": "default",389 "repo_name": "mozilla-b2g18_v1_1_0_hd",390 "targets": [{391 "target_dest": "beagle/​.git",392 "vcs": "git",393 "test_push": True,394 }, {395 "target_dest": "gitmo-beagle",396 }, {397 "target_dest": "github-beagle",398 }],399 "vcs": "hg",400 "branch_config": {401 "branches": {402 "default": "b2g18_v1_1_0_hd",403 },404 },405 "tag_config": {406 "tag_regexes": [407 "^B2G_",408 ],409 },410 "mapper": {411 "url": "https:/​/​api.pub.build.mozilla.org/​mapper",412 "project": "gecko-dev"413 },414 }, {415 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-b2g18_v1_0_1",416 "revision": "default",417 "repo_name": "mozilla-b2g18_v1_0_1",418 "targets": [{419 "target_dest": "beagle/​.git",420 "vcs": "git",421 "test_push": True,422 }, {423 "target_dest": "gitmo-beagle",424 }, {425 "target_dest": "github-beagle",426 }],427 "vcs": "hg",428 "branch_config": {429 "branches": {430 "default": "b2g18_v1_0_1",431 },432 },433 "tag_config": {434 "tag_regexes": [435 "^B2G_",436 ],437 },438 "mapper": {439 "url": "https:/​/​api.pub.build.mozilla.org/​mapper",440 "project": "gecko-dev"441 },442 }, {443 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-b2g18_v1_0_0",444 "revision": "default",445 "repo_name": "mozilla-b2g18_v1_0_0",446 "targets": [{447 "target_dest": "beagle/​.git",448 "vcs": "git",449 "test_push": True,450 }, {451 "target_dest": "gitmo-beagle",452 }, {453 "target_dest": "github-beagle",454 }],455 "vcs": "hg",456 "branch_config": {457 "branches": {458 "default": "b2g18_v1_0_0",459 },460 },461 "tag_config": {462 "tag_regexes": [463 "^B2G_",464 ],465 },466 "mapper": {467 "url": "https:/​/​api.pub.build.mozilla.org/​mapper",468 "project": "gecko-dev"469 },470 }, {471 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-aurora",472 "revision": "default",473 "repo_name": "mozilla-aurora",474 "targets": [{475 "target_dest": "beagle/​.git",476 "vcs": "git",477 "test_push": True,478 }, {479 "target_dest": "gitmo-beagle",480 }, {481 "target_dest": "github-beagle",482 }],483 "vcs": "hg",484 "branch_config": {485 "branches": {486 "default": "aurora",487 },488 },489 "tag_config": {490 "tag_regexes": [491 "^B2G_",492 ],493 },494 "mapper": {495 "url": "https:/​/​api.pub.build.mozilla.org/​mapper",496 "project": "gecko-dev"497 },498 }, {499 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-beta",500 "revision": "default",501 "repo_name": "mozilla-beta",502 "targets": [{503 "target_dest": "beagle/​.git",504 "vcs": "git",505 "test_push": True,506 }, {507 "target_dest": "gitmo-beagle",508 }, {509 "target_dest": "github-beagle",510 }],511 "vcs": "hg",512 "branch_config": {513 "branches": {514 "default": "beta",515 },516 "branch_regexes": [517 "^GECKO[0-9_]*RELBRANCH$",518 "^MOBILE[0-9_]*RELBRANCH$",519 ],520 },521 "tag_config": {522 "tag_regexes": [523 "^(B2G|RELEASE_BASE)_",524 ],525 },526 "mapper": {527 "url": "https:/​/​api.pub.build.mozilla.org/​mapper",528 "project": "gecko-dev"529 },530 }, {531 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-release",532 "revision": "default",533 "repo_name": "mozilla-release",534 "targets": [{535 "target_dest": "beagle/​.git",536 "vcs": "git",537 "test_push": True,538 }, {539 "target_dest": "gitmo-beagle",540 }, {541 "target_dest": "github-beagle",542 }],543 "vcs": "hg",544 "branch_config": {545 "branches": {546 "default": "release",547 },548 "branch_regexes": [549 "^GECKO[0-9_]*RELBRANCH$",550 "^MOBILE[0-9_]*RELBRANCH$",551 ],552 },553 "tag_config": {554 "tag_regexes": [555 "^(B2G|RELEASE_BASE)_",556 ],557 },558 "mapper": {559 "url": "https:/​/​api.pub.build.mozilla.org/​mapper",560 "project": "gecko-dev"561 },562 }, {563 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-esr17",564 "revision": "default",565 "repo_name": "mozilla-esr17",566 "targets": [{567 "target_dest": "beagle/​.git",568 "vcs": "git",569 "test_push": True,570 }, {571 "target_dest": "gitmo-beagle",572 }, {573 "target_dest": "github-beagle",574 }],575 "vcs": "hg",576 "branch_config": {577 "branches": {578 "default": "esr17",579 },580 },581 "tag_config": {582 "tag_regexes": [583 "^B2G_",584 ],585 },586 "mapper": {587 "url": "https:/​/​api.pub.build.mozilla.org/​mapper",588 "project": "gecko-dev"589 },590 }, {591 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-esr31",592 "revision": "default",593 "repo_name": "mozilla-esr31",594 "targets": [{595 "target_dest": "beagle/​.git",596 "vcs": "git",597 "test_push": True,598 }, {599 "target_dest": "gitmo-beagle",600 }, {601 "target_dest": "github-beagle",602 }],603 "vcs": "hg",604 "branch_config": {605 "branches": {606 "default": "esr31",607 },608 "branch_regexes": [609 "^GECKO[0-9]+esr_[0-9]+_RELBRANCH$",610 ],611 },612 "tag_config": {613 "tag_regexes": [614 "^B2G_",615 ],616 },617 "mapper": {618 "url": "https:/​/​api.pub.build.mozilla.org/​mapper",619 "project": "gecko-dev"620 },621 }, {622 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-esr38",623 "revision": "default",624 "repo_name": "mozilla-esr38",625 "targets": [{626 "target_dest": "beagle/​.git",627 "vcs": "git",628 "test_push": True,629 }, {630 "target_dest": "gitmo-beagle",631 }, {632 "target_dest": "github-beagle",633 }],634 "vcs": "hg",635 "branch_config": {636 "branches": {637 "default": "esr38",638 },639 "branch_regexes": [640 "^GECKO[0-9]+esr_[0-9]+_RELBRANCH$",641 ],642 },643 "tag_config": {644 "tag_regexes": [645 "^B2G_",646 ],647 },648 "mapper": {649 "url": "https:/​/​api.pub.build.mozilla.org/​mapper",650 "project": "gecko-dev"651 },652 }, {653 "repo": "https:/​/​hg.mozilla.org/​integration/​mozilla-inbound",654 "revision": "default",655 "repo_name": "mozilla-inbound",656 "targets": [{657 "target_dest": "beagle/​.git",658 "vcs": "git",659 "test_push": True,660 }, {661 "target_dest": "gitmo-beagle",662 }, {663 "target_dest": "github-beagle",664 }],665 "vcs": "hg",666 "branch_config": {667 "branches": {668 "default": "inbound",669 },670 },671 "tag_config": {},672 "mapper": {673 "url": "https:/​/​api.pub.build.mozilla.org/​mapper",674 "project": "gecko-dev"675 },676 }, {677 "repo": "https:/​/​hg.mozilla.org/​integration/​b2g-inbound",678 "revision": "default",679 "repo_name": "b2g-inbound",680 "targets": [{681 "target_dest": "beagle/​.git",682 "vcs": "git",683 "test_push": True,684 }, {685 "target_dest": "gitmo-beagle",686 }, {687 "target_dest": "github-beagle",688 }],689 "vcs": "hg",690 "branch_config": {691 "branches": {692 "default": "b2g-inbound",693 },694 },695 "tag_config": {},696 "mapper": {697 "url": "https:/​/​api.pub.build.mozilla.org/​mapper",698 "project": "gecko-dev"699 },700 }, {701 "repo": "https:/​/​hg.mozilla.org/​integration/​fx-team",702 "revision": "default",703 "repo_name": "fx-team",704 "targets": [{705 "target_dest": "beagle/​.git",706 "vcs": "git",707 "test_push": True,708 }, {709 "target_dest": "gitmo-beagle",710 }, {711 "target_dest": "github-beagle",712 }],713 "vcs": "hg",714 "branch_config": {715 "branches": {716 "default": "fx-team",717 },718 },719 "tag_config": {},720 "mapper": {721 "url": "https:/​/​api.pub.build.mozilla.org/​mapper",722 "project": "gecko-dev"723 },724 }],725 "remote_targets": {726 "github-beagle": {727 "repo": "git@github.com:mozilla/​gecko-dev.git",728 "ssh_key": "~/​.ssh/​releng-github-id_rsa",729 "vcs": "git",730 },731 "gitmo-beagle": {732 "repo": "gitolite3@git.mozilla.org:integration/​gecko-dev.git",733 "ssh_key": "~/​.ssh/​vcs-sync_rsa",734 "vcs": "git",735 },736 },737 "exes": {738 # bug 828140 - shut https warnings up.739 # http:/​/​kiln.stackexchange.com/​questions/​2816/​mercurial-certificate-warning-certificate-not-verified-web-cacerts740 "hg": [os.path.join(os.getcwd(), "build", "venv", "bin", "hg"), "--config", "web.cacerts=/​etc/​pki/​tls/​certs/​ca-bundle.crt"],741 "tooltool.py": [742 os.path.join(os.getcwd(), "build", "venv", "bin", "python"),743 os.path.join(os.getcwd(), "mozharness", "external_tools", "tooltool.py"),744 ],745 },746 "virtualenv_modules": [747 "bottle==0.11.6",748 "dulwich==0.9.0",749 "ordereddict==1.1",750 "hg-git==0.4.0-moz2",751 "mapper==0.1",752 "mercurial==2.6.3",753 "mozfile==0.9",754 "mozinfo==0.5",755 "mozprocess==0.11",756 "requests==2.8.1",757 ],758 "find_links": [759 "http:/​/​pypi.pvt.build.mozilla.org/​pub",760 "http:/​/​pypi.pub.build.mozilla.org/​pub",761 ],762 "pip_index": False,763 "default_notify_from": "developer-services+%s@mozilla.org" % hostname,764 "notify_config": [{765 "to": "releng-ops-trial@mozilla.com",766 "failure_only": False,767 "skip_empty_messages": True,768 }],769 # Disallow sharing, since we want pristine .hg and .git directories.770 "vcs_share_base": None,771 "hg_share_base": None,772 "default_actions": [773 'list-repos',774 'create-virtualenv',775 'update-stage-mirror',776 'update-work-mirror',777 'publish-to-mapper',778 'push',779 'combine-mapfiles',780 'notify',781 ],...

Full Screen

Full Screen

gecko-git.py

Source: gecko-git.py Github

copy

Full Screen

1# This is for gecko.git, which is a partner-oriented repo with2# B2G release branches + tags.3import os4import socket5hostname = socket.gethostname()6CVS_MANIFEST = """[{7"size": 1301484692,8"digest": "89df462d8d20f54402caaaa4e3c10aa54902a1d7196cdf86b7790b76e62d302ade3102dc3f7da4145dd832e6938b0472370ce6a321e0b3bcf0ad050937bd0e9a",9"algorithm": "sha512",10"filename": "mozilla-cvs-history.tar.bz2"11}]12"""13config = {14 "log_name": "gecko-git",15 "log_max_rotate": 99,16 "repos": [{17 "repo": "https:/​/​hg.mozilla.org/​users/​hwine_mozilla.com/​repo-sync-tools",18 "vcs": "hg",19 }],20 "job_name": "gecko-git",21 "conversion_dir": "gecko-git",22 "initial_repo": {23 "repo": "https:/​/​hg.mozilla.org/​mozilla-central",24 "revision": "default",25 "repo_name": "mozilla-central",26 "targets": [{27 "target_dest": "gecko-git/​.git",28 "vcs": "git",29 "test_push": True,30 }, {31 "target_dest": "github-gecko-git",32 }],33 "vcs": "hg",34 "branch_config": {35 "branches": {36 "default": "master",37 },38 },39 },40 "backup_dir": "/​mnt/​netapp/​github_sync/​aki/​%s" % hostname,41 "cvs_manifest": CVS_MANIFEST,42 "cvs_history_tarball": "/​home/​pmoore/​mozilla-cvs-history.tar.bz2",43 "env": {44 "PATH": "%(PATH)s:/​usr/​libexec/​git-core",45 },46 "conversion_repos": [{47 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-b2g37_v2_2",48 "revision": "default",49 "repo_name": "mozilla-b2g37_v2_2",50 "targets": [{51 "target_dest": "gecko-git/​.git",52 "vcs": "git",53 "test_push": True,54 }, {55 "target_dest": "github-gecko-git",56 }],57 "vcs": "hg",58 "branch_config": {59 "branches": {60 "default": "v2.2",61 },62 },63 "tag_config": {64 "tag_regexes": [65 "^B2G_",66 ],67 },68 }, {69 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-b2g37_v2_2r",70 "revision": "default",71 "repo_name": "mozilla-b2g37_v2_2r",72 "targets": [{73 "target_dest": "gecko-git/​.git",74 "vcs": "git",75 "test_push": True,76 }, {77 "target_dest": "github-gecko-git",78 }],79 "vcs": "hg",80 "branch_config": {81 "branches": {82 "default": "v2.2r",83 },84 },85 "tag_config": {86 "tag_regexes": [87 "^B2G_",88 ],89 },90 }, {91 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-b2g34_v2_1",92 "revision": "default",93 "repo_name": "mozilla-b2g34_v2_1",94 "targets": [{95 "target_dest": "gecko-git/​.git",96 "vcs": "git",97 "test_push": True,98 }, {99 "target_dest": "github-gecko-git",100 }],101 "vcs": "hg",102 "branch_config": {103 "branches": {104 "default": "v2.1",105 },106 },107 "tag_config": {108 "tag_regexes": [109 "^B2G_",110 ],111 },112 }, {113 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-b2g34_v2_1s",114 "revision": "default",115 "repo_name": "mozilla-b2g34_v2_1s",116 "targets": [{117 "target_dest": "gecko-git/​.git",118 "vcs": "git",119 "test_push": True,120 }, {121 "target_dest": "github-gecko-git",122 }],123 "vcs": "hg",124 "branch_config": {125 "branches": {126 "default": "v2.1s",127 },128 },129 "tag_config": {130 "tag_regexes": [131 "^B2G_",132 ],133 },134 }, {135 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-b2g32_v2_0",136 "revision": "default",137 "repo_name": "mozilla-b2g32_v2_0",138 "targets": [{139 "target_dest": "gecko-git/​.git",140 "vcs": "git",141 "test_push": True,142 }, {143 "target_dest": "github-gecko-git",144 }],145 "vcs": "hg",146 "branch_config": {147 "branches": {148 "default": "v2.0",149 },150 },151 "tag_config": {152 "tag_regexes": [153 "^B2G_",154 ],155 },156 }, {157 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-b2g32_v2_0m",158 "revision": "default",159 "repo_name": "mozilla-b2g32_v2_0m",160 "targets": [{161 "target_dest": "gecko-git/​.git",162 "vcs": "git",163 "test_push": True,164 }, {165 "target_dest": "github-gecko-git",166 }],167 "vcs": "hg",168 "branch_config": {169 "branches": {170 "default": "v2.0m",171 },172 },173 "tag_config": {174 "tag_regexes": [175 "^B2G_",176 ],177 },178 }, {179 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-b2g30_v1_4",180 "revision": "default",181 "repo_name": "mozilla-b2g30_v1_4",182 "targets": [{183 "target_dest": "gecko-git/​.git",184 "vcs": "git",185 "test_push": True,186 }, {187 "target_dest": "github-gecko-git",188 }],189 "vcs": "hg",190 "branch_config": {191 "branches": {192 "default": "v1.4",193 },194 },195 "tag_config": {196 "tag_regexes": [197 "^B2G_",198 ],199 },200 }, {201 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-b2g28_v1_3",202 "revision": "default",203 "repo_name": "mozilla-b2g28_v1_3",204 "targets": [{205 "target_dest": "gecko-git/​.git",206 "vcs": "git",207 "test_push": True,208 }, {209 "target_dest": "github-gecko-git",210 }],211 "vcs": "hg",212 "branch_config": {213 "branches": {214 "default": "v1.3",215 },216 },217 "tag_config": {218 "tag_regexes": [219 "^B2G_",220 ],221 },222 }, {223 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-b2g28_v1_3t",224 "revision": "default",225 "repo_name": "mozilla-b2g28_v1_3t",226 "targets": [{227 "target_dest": "gecko-git/​.git",228 "vcs": "git",229 "test_push": True,230 }, {231 "target_dest": "github-gecko-git",232 }],233 "vcs": "hg",234 "branch_config": {235 "branches": {236 "default": "v1.3t",237 },238 },239 "tag_config": {240 "tag_regexes": [241 "^B2G_",242 ],243 },244 }, {245 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-b2g26_v1_2",246 "revision": "default",247 "repo_name": "mozilla-b2g26_v1_2",248 "targets": [{249 "target_dest": "gecko-git/​.git",250 "vcs": "git",251 "test_push": True,252 }, {253 "target_dest": "github-gecko-git",254 }],255 "vcs": "hg",256 "branch_config": {257 "branches": {258 "default": "v1.2",259 },260 },261 "tag_config": {262 "tag_regexes": [263 "^B2G_",264 ],265 },266 }, {267 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-b2g26_v1_2f",268 "revision": "default",269 "repo_name": "mozilla-b2g26_v1_2f",270 "targets": [{271 "target_dest": "gecko-git/​.git",272 "vcs": "git",273 "test_push": True,274 }, {275 "target_dest": "github-gecko-git",276 }],277 "vcs": "hg",278 "branch_config": {279 "branches": {280 "default": "v1.2f",281 },282 },283 "tag_config": {284 "tag_regexes": [285 "^B2G_",286 ],287 },288 }, {289 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-b2g18",290 "revision": "default",291 "repo_name": "mozilla-b2g18",292 "targets": [{293 "target_dest": "gecko-git/​.git",294 "vcs": "git",295 "test_push": True,296 }, {297 "target_dest": "github-gecko-git",298 "tag_config": {299 "tag_regexes": [300 "^B2G_",301 ],302 },303 }],304 "vcs": "hg",305 "branch_config": {306 "branches": {307 "default": "gecko-18",308 },309 },310 "tag_config": {311 "tag_regexes": [312 "^B2G_",313 ],314 },315 }, {316 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-b2g18_v1_1_0_hd",317 "revision": "default",318 "repo_name": "mozilla-b2g18_v1_1_0_hd",319 "targets": [{320 "target_dest": "gecko-git/​.git",321 "vcs": "git",322 "test_push": True,323 }, {324 "target_dest": "github-gecko-git",325 }],326 "vcs": "hg",327 "branch_config": {328 "branches": {329 "default": "v1.1.0hd",330 },331 },332 "tag_config": {333 "tag_regexes": [334 "^B2G_",335 ],336 },337 }, {338 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-b2g18_v1_0_1",339 "revision": "default",340 "repo_name": "mozilla-b2g18_v1_0_1",341 "targets": [{342 "target_dest": "gecko-git/​.git",343 "vcs": "git",344 "test_push": True,345 }, {346 "target_dest": "github-gecko-git",347 }],348 "vcs": "hg",349 "branch_config": {350 "branches": {351 "default": "v1.0.1",352 },353 },354 "tag_config": {355 "tag_regexes": [356 "^B2G_",357 ],358 },359 }, {360 "repo": "https:/​/​hg.mozilla.org/​releases/​mozilla-b2g18_v1_0_0",361 "revision": "default",362 "repo_name": "mozilla-b2g18_v1_0_0",363 "targets": [{364 "target_dest": "gecko-git/​.git",365 "vcs": "git",366 "test_push": True,367 }, {368 "target_dest": "github-gecko-git",369 }],370 "vcs": "hg",371 "branch_config": {372 "branches": {373 "default": "v1.0.0",374 },375 },376 "tag_config": {377 "tag_regexes": [378 "^B2G_",379 ],380 },381 }],382 "remote_targets": {383 "github-gecko-git": {384 "repo": "git@github.com:escapewindow/​test-gecko-git.git",385 "ssh_key": "~/​.ssh/​escapewindow_github_rsa",386 "vcs": "git",387 },388 },389 "exes": {390 # bug 828140 - shut https warnings up.391 # http:/​/​kiln.stackexchange.com/​questions/​2816/​mercurial-certificate-warning-certificate-not-verified-web-cacerts392 "hg": [os.path.join(os.getcwd(), "build", "venv", "bin", "hg"), "--config", "web.cacerts=/​etc/​pki/​tls/​certs/​ca-bundle.crt"],393 "tooltool.py": [394 os.path.join(os.getcwd(), "build", "venv", "bin", "python"),395 os.path.join(os.getcwd(), "mozharness", "external_tools", "tooltool.py"),396 ],397 },398 "virtualenv_modules": [399 "bottle==0.11.6",400 "dulwich==0.9.0",401 "ordereddict==1.1",402 "hg-git==0.4.0-moz2",403 "mapper==0.1",404 "mercurial==2.6.3",405 "mozfile==0.9",406 "mozinfo==0.5",407 "mozprocess==0.11",408 ],409 "find_links": [410 "http:/​/​pypi.pvt.build.mozilla.org/​pub",411 "http:/​/​pypi.pub.build.mozilla.org/​pub",412 ],413 "pip_index": False,414 "upload_config": [{415 "ssh_key": "~/​.ssh/​id_rsa",416 "ssh_user": "pmoore",417 "remote_host": "github-sync2",418 "remote_path": "/​home/​pmoore/​upload/​gecko-git-upload",419 }],420 "default_notify_from": "developer-services+%s@mozilla.org" % hostname,421 "notify_config": [{422 "to": "releng-ops-trial@mozilla.com",423 "failure_only": False,424 "skip_empty_messages": True,425 }],426 # Disallow sharing, since we want pristine .hg and .git directories.427 "vcs_share_base": None,428 "hg_share_base": None,...

Full Screen

Full Screen

test_push_unittest.py

Source: test_push_unittest.py Github

copy

Full Screen

1#!/​usr/​bin/​python2# Copyright (c) 2013 The Chromium OS Authors. All rights reserved.3# Use of this source code is governed by a BSD-style license that can be4# found in the LICENSE file.5import StringIO6import mox7import unittest8import urllib29import mock10import common11from autotest_lib.client.common_lib.cros import retry12from autotest_lib.server import site_utils13from autotest_lib.server.cros.dynamic_suite import reporting14# Mock retry.retry used in test_push before importing test_push.15retry.retry = mock.create_autospec(retry.retry, return_value=lambda func: func)16from autotest_lib.site_utils import test_push17AUTOFILED_COUNT_2 = '%s2' % reporting.Reporter.AUTOFILED_COUNT18class TestPushUnittests(mox.MoxTestBase):19 """Unittest for test_push script."""20 def setUp(self):21 """Initialize the unittest."""22 super(TestPushUnittests, self).setUp()23 # Overwrite expected test results.24 test_push.EXPECTED_TEST_RESULTS = {25 '^SERVER_JOB$': 'GOOD',26 '.*control.dependency$': 'TEST_NA',27 '.*dummy_Fail.RetryFail$': 'FAIL',28 }29 test_push.TKO = None30 def stub_out_methods(self, test_views):31 """Stub out methods in test_push module with given test results.32 @param test_views: Desired test result views.33 """34 self.mox.UnsetStubs()35 response = StringIO.StringIO('some_value')36 self.mox.StubOutWithMock(urllib2, 'urlopen')37 urllib2.urlopen(mox.IgnoreArg()).AndReturn(response)38 self.mox.StubOutWithMock(test_push, 'get_default_build')39 test_push.get_default_build(mox.IgnoreArg(), mox.IgnoreArg()).AndReturn(40 'stumpy-release/​R36-5881-0.0')41 test_push.get_default_build(mox.IgnoreArg(), mox.IgnoreArg()).AndReturn(42 'quawks-release/​R36-5881-0.0')43 self.mox.StubOutWithMock(test_push, 'check_dut_image')44 test_push.check_dut_image(mox.IgnoreArg(), mox.IgnoreArg()).AndReturn(45 None)46 self.mox.StubOutWithMock(test_push, 'do_run_suite')47 test_push.do_run_suite(48 test_push.PUSH_TO_PROD_SUITE, mox.IgnoreArg(), mox.IgnoreArg(),49 mox.IgnoreArg(), mox.IgnoreArg()).AndReturn((1))50 self.mox.StubOutWithMock(site_utils, 'get_test_views_from_tko')51 site_utils.get_test_views_from_tko(1, None).AndReturn(test_views)52 def test_suite_success(self):53 """Test test_suite method with matching results."""54 test_views = {'SERVER_JOB': 'GOOD',55 'dummy_fail/​control.dependency': 'TEST_NA',56 'dummy_Fail.RetryFail': 'FAIL'57 }58 self.stub_out_methods(test_views)59 self.mox.ReplayAll()60 test_push.test_suite(test_push.PUSH_TO_PROD_SUITE, test_views,61 arguments=test_push.parse_arguments())62 self.mox.VerifyAll()63 def test_suite_fail_with_missing_test(self):64 """Test test_suite method that should fail with missing test."""65 test_views = {'SERVER_JOB': 'GOOD',66 'dummy_fail/​control.dependency': 'TEST_NA',67 }68 self.stub_out_methods(test_views)69 self.mox.ReplayAll()70 test_push.test_suite(test_push.PUSH_TO_PROD_SUITE, test_views,71 arguments=test_push.parse_arguments())72 self.mox.VerifyAll()73 def test_suite_fail_with_unexpected_test_results(self):74 """Test test_suite method that should fail with unexpected test results.75 """76 test_views = {'SERVER_JOB': 'FAIL',77 'dummy_fail/​control.dependency': 'TEST_NA',78 'dummy_Fail.RetryFail': 'FAIL',79 }80 self.stub_out_methods(test_views)81 self.mox.ReplayAll()82 test_push.test_suite(test_push.PUSH_TO_PROD_SUITE, test_views,83 arguments=test_push.parse_arguments())84 self.mox.VerifyAll()85 def test_suite_fail_with_extra_test(self):86 """Test test_suite method that should fail with extra test."""87 test_views = {'SERVER_JOB': 'GOOD',88 'dummy_fail/​control.dependency': 'TEST_NA',89 'dummy_Fail.RetryFail': 'FAIL',90 'dummy_Fail.ExtraTest': 'GOOD',91 }92 self.stub_out_methods(test_views)93 self.mox.ReplayAll()94 test_push.test_suite(test_push.PUSH_TO_PROD_SUITE, test_views,95 arguments=test_push.parse_arguments())96 self.mox.VerifyAll()97if __name__ == '__main__':...

Full Screen

Full Screen

Blogs

Check out the latest blogs from LambdaTest on this topic:

Testing Modern Applications With Playwright ????

Web applications continue to evolve at an unbelievable pace, and the architecture surrounding web apps get more complicated all of the time. With the growth in complexity of the web application and the development process, web application testing also needs to keep pace with the ever-changing demands.

Joomla Testing Guide: How To Test Joomla Websites

Before we discuss the Joomla testing, let us understand the fundamentals of Joomla and how this content management system allows you to create and maintain web-based applications or websites without having to write and implement complex coding requirements.

Test Optimization for Continuous Integration

“Test frequently and early.” If you’ve been following my testing agenda, you’re probably sick of hearing me repeat that. However, it is making sense that if your tests detect an issue soon after it occurs, it will be easier to resolve. This is one of the guiding concepts that makes continuous integration such an effective method. I’ve encountered several teams who have a lot of automated tests but don’t use them as part of a continuous integration approach. There are frequently various reasons why the team believes these tests cannot be used with continuous integration. Perhaps the tests take too long to run, or they are not dependable enough to provide correct results on their own, necessitating human interpretation.

7 Skills of a Top Automation Tester in 2021

With new-age project development methodologies like Agile and DevOps slowly replacing the old-age waterfall model, the demand for testing is increasing in the industry. Testers are now working together with the developers and automation testing is vastly replacing manual testing in many ways. If you are new to the domain of automation testing, the organization that just hired you, will expect you to be fast, think out of the box, and able to detect bugs or deliver solutions which no one thought of. But with just basic knowledge of testing, how can you be that successful test automation engineer who is different from their predecessors? What are the skills to become a successful automation tester in 2019? Let’s find out.

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run uiautomator automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful