Merge lp:~zyga/checkbox/drop-legacy into lp:~checkbox-dev/checkbox/checkbox-packaging

Proposed by Zygmunt Krynicki
Status: Superseded
Proposed branch: lp:~zyga/checkbox/drop-legacy
Merge into: lp:~checkbox-dev/checkbox/checkbox-packaging
Diff against target: 302468 lines (+298537/-0)
749 files modified
.bzrignore (+24/-0)
.coveragerc (+25/-0)
.gitignore (+24/-0)
.travis.yml (+5/-0)
Vagrantfile (+57/-0)
checkbox-gui/README.rst (+61/-0)
checkbox-gui/TRANSLATIONS.rst (+36/-0)
checkbox-gui/checkbox-gui.pro (+23/-0)
checkbox-gui/checkbox-gui/README.rst (+5/-0)
checkbox-gui/checkbox-gui/WhiteListModelFactory.cpp (+72/-0)
checkbox-gui/checkbox-gui/WhiteListModelFactory.h (+42/-0)
checkbox-gui/checkbox-gui/checkbox-gui.desktop (+12/-0)
checkbox-gui/checkbox-gui/checkbox-gui.pro (+88/-0)
checkbox-gui/checkbox-gui/listmodel.cpp (+162/-0)
checkbox-gui/checkbox-gui/listmodel.h (+78/-0)
checkbox-gui/checkbox-gui/main.cpp (+136/-0)
checkbox-gui/checkbox-gui/qml/DemoWarnings.qml (+112/-0)
checkbox-gui/checkbox-gui/qml/DummyListModel.qml (+45/-0)
checkbox-gui/checkbox-gui/qml/LogViewer.qml (+87/-0)
checkbox-gui/checkbox-gui/qml/ManualInteractionDialog.qml (+245/-0)
checkbox-gui/checkbox-gui/qml/Progress.qml (+48/-0)
checkbox-gui/checkbox-gui/qml/ResumeView.qml (+115/-0)
checkbox-gui/checkbox-gui/qml/RunManagerButtons.qml (+99/-0)
checkbox-gui/checkbox-gui/qml/RunManagerListView.qml (+215/-0)
checkbox-gui/checkbox-gui/qml/RunManagerSuiteDelegate.qml (+168/-0)
checkbox-gui/checkbox-gui/qml/RunManagerTestDelegate.qml (+294/-0)
checkbox-gui/checkbox-gui/qml/RunManagerView.qml (+450/-0)
checkbox-gui/checkbox-gui/qml/SubmissionDialog.qml (+148/-0)
checkbox-gui/checkbox-gui/qml/SuiteSelectionDelegate.qml (+90/-0)
checkbox-gui/checkbox-gui/qml/SuiteSelectionView.qml (+158/-0)
checkbox-gui/checkbox-gui/qml/TestSelectionDetails.qml (+110/-0)
checkbox-gui/checkbox-gui/qml/TestSelectionDetailsItems.qml (+63/-0)
checkbox-gui/checkbox-gui/qml/TestSelectionListView.qml (+554/-0)
checkbox-gui/checkbox-gui/qml/TestSelectionSuiteDelegate.qml (+119/-0)
checkbox-gui/checkbox-gui/qml/TestSelectionTestDelegate.qml (+173/-0)
checkbox-gui/checkbox-gui/qml/TestSelectionView.qml (+277/-0)
checkbox-gui/checkbox-gui/qml/WarningDialog.qml (+102/-0)
checkbox-gui/checkbox-gui/qml/WelcomeView.qml (+133/-0)
checkbox-gui/checkbox-gui/qml/WideDialog.qml (+79/-0)
checkbox-gui/checkbox-gui/qml/artwork/failed.svg (+61/-0)
checkbox-gui/checkbox-gui/qml/artwork/passed.svg (+61/-0)
checkbox-gui/checkbox-gui/qml/artwork/skip-deps-not-met.svg (+49/-0)
checkbox-gui/checkbox-gui/qml/artwork/skip-manual.svg (+49/-0)
checkbox-gui/checkbox-gui/qml/checkbox-gui.qml (+91/-0)
checkbox-gui/checkbox-gui/qmldir (+3/-0)
checkbox-gui/checkbox-gui/qtquick2applicationviewer/qtquick2applicationviewer.cpp (+82/-0)
checkbox-gui/checkbox-gui/qtquick2applicationviewer/qtquick2applicationviewer.h (+34/-0)
checkbox-gui/checkbox-gui/qtquick2applicationviewer/qtquick2applicationviewer.pri (+181/-0)
checkbox-gui/checkbox-gui/settings.cpp (+26/-0)
checkbox-gui/checkbox-gui/settings.h (+24/-0)
checkbox-gui/checkbox-gui/testitem.cpp (+502/-0)
checkbox-gui/checkbox-gui/testitem.h (+315/-0)
checkbox-gui/checkbox-gui/testitemmodel.cpp (+491/-0)
checkbox-gui/checkbox-gui/testitemmodel.h (+53/-0)
checkbox-gui/checkbox-gui/whitelistitem.cpp (+107/-0)
checkbox-gui/checkbox-gui/whitelistitem.h (+76/-0)
checkbox-gui/gui-engine/JobTreeNode.cpp (+218/-0)
checkbox-gui/gui-engine/JobTreeNode.h (+59/-0)
checkbox-gui/gui-engine/PBJsonUtils.cpp (+71/-0)
checkbox-gui/gui-engine/PBJsonUtils.h (+38/-0)
checkbox-gui/gui-engine/PBNames.h (+69/-0)
checkbox-gui/gui-engine/PBTreeNode.cpp (+509/-0)
checkbox-gui/gui-engine/PBTreeNode.h (+125/-0)
checkbox-gui/gui-engine/PBTypes.h (+81/-0)
checkbox-gui/gui-engine/README.rst (+6/-0)
checkbox-gui/gui-engine/gui-engine.cpp (+2598/-0)
checkbox-gui/gui-engine/gui-engine.h (+441/-0)
checkbox-gui/gui-engine/gui-engine.pro (+50/-0)
checkbox-gui/po/bn.po (+339/-0)
checkbox-gui/po/checkbox-gui.pot (+339/-0)
checkbox-gui/po/ja.po (+339/-0)
checkbox-gui/po/po.pro (+59/-0)
checkbox-gui/po/zh_TW.po (+339/-0)
checkbox-gui/requirements/deb-gui.txt (+15/-0)
checkbox-gui/requirements/repo-gui.txt (+2/-0)
checkbox-gui/test-gui-engine/README.rst (+8/-0)
checkbox-gui/test-gui-engine/test-gui-engine.cpp (+93/-0)
checkbox-gui/test-gui-engine/test-gui-engine.h (+36/-0)
checkbox-gui/test-gui-engine/test-gui-engine.pro (+34/-0)
checkbox-ng/.coveragerc (+14/-0)
checkbox-ng/.gitignore (+8/-0)
checkbox-ng/COPYING (+674/-0)
checkbox-ng/MANIFEST.in (+5/-0)
checkbox-ng/README.rst (+16/-0)
checkbox-ng/checkbox_ng/__init__.py (+27/-0)
checkbox-ng/checkbox_ng/certification.py (+131/-0)
checkbox-ng/checkbox_ng/commands/certification.py (+170/-0)
checkbox-ng/checkbox_ng/commands/cli.py (+860/-0)
checkbox-ng/checkbox_ng/commands/service.py (+131/-0)
checkbox-ng/checkbox_ng/commands/sru.py (+287/-0)
checkbox-ng/checkbox_ng/commands/test_cli.py (+152/-0)
checkbox-ng/checkbox_ng/commands/test_sru.py (+75/-0)
checkbox-ng/checkbox_ng/config.py (+123/-0)
checkbox-ng/checkbox_ng/dbus_ex/__init__.py (+59/-0)
checkbox-ng/checkbox_ng/dbus_ex/decorators.py (+369/-0)
checkbox-ng/checkbox_ng/dbus_ex/service.py (+664/-0)
checkbox-ng/checkbox_ng/dbus_ex/test_dbus.py (+47/-0)
checkbox-ng/checkbox_ng/main.py (+192/-0)
checkbox-ng/checkbox_ng/service.py (+1518/-0)
checkbox-ng/checkbox_ng/test_certification.py (+183/-0)
checkbox-ng/checkbox_ng/test_config.py (+46/-0)
checkbox-ng/checkbox_ng/test_main.py (+145/-0)
checkbox-ng/checkbox_ng/tests.py (+50/-0)
checkbox-ng/contrib/canonical-certification-server.conf (+21/-0)
checkbox-ng/contrib/checkbox-ci-mailer.conf (+48/-0)
checkbox-ng/contrib/checkbox-sru.conf (+26/-0)
checkbox-ng/contrib/checkbox-sru.desktop (+10/-0)
checkbox-ng/contrib/com.canonical.certification.PlainBox1.service (+3/-0)
checkbox-ng/contrib/dbus-mini-client.py (+430/-0)
checkbox-ng/docs/changelog.rst (+14/-0)
checkbox-ng/docs/conf.py (+269/-0)
checkbox-ng/docs/index.rst (+63/-0)
checkbox-ng/docs/release.rst (+199/-0)
checkbox-ng/docs/scripts/brightness_test.rst (+4/-0)
checkbox-ng/docs/scripts/index.rst (+7/-0)
checkbox-ng/requirements/deb-dbus.txt (+1/-0)
checkbox-ng/requirements/deb-docs.txt (+1/-0)
checkbox-ng/requirements/pip-core.txt (+2/-0)
checkbox-ng/requirements/pip-dbus.txt (+1/-0)
checkbox-ng/requirements/pip-docs.txt (+1/-0)
checkbox-ng/requirements/remove-deb-core.txt (+4/-0)
checkbox-ng/setup.cfg (+5/-0)
checkbox-ng/setup.py (+78/-0)
checkbox-support/README.rst (+6/-0)
checkbox-support/checkbox_support/contrib/xrandr.py (+1064/-0)
checkbox-support/checkbox_support/dbus/__init__.py (+89/-0)
checkbox-support/checkbox_support/dbus/udisks2.py (+479/-0)
checkbox-support/checkbox_support/heuristics/__init__.py (+56/-0)
checkbox-support/checkbox_support/heuristics/tests/test_udisks2.py (+40/-0)
checkbox-support/checkbox_support/heuristics/udev.py (+44/-0)
checkbox-support/checkbox_support/heuristics/udisks2.py (+62/-0)
checkbox-support/checkbox_support/lib/bit.py (+46/-0)
checkbox-support/checkbox_support/lib/conversion.py (+172/-0)
checkbox-support/checkbox_support/lib/dmi.py (+241/-0)
checkbox-support/checkbox_support/lib/input.py (+585/-0)
checkbox-support/checkbox_support/lib/path.py (+62/-0)
checkbox-support/checkbox_support/lib/pci.py (+89/-0)
checkbox-support/checkbox_support/lib/template.py (+143/-0)
checkbox-support/checkbox_support/lib/tz.py (+55/-0)
checkbox-support/checkbox_support/lib/usb.py (+59/-0)
checkbox-support/checkbox_support/parsers/__init__.py (+7/-0)
checkbox-support/checkbox_support/parsers/cpuinfo.py (+180/-0)
checkbox-support/checkbox_support/parsers/dmidecode.py (+126/-0)
checkbox-support/checkbox_support/parsers/efi.py (+52/-0)
checkbox-support/checkbox_support/parsers/lshwjson.py (+23/-0)
checkbox-support/checkbox_support/parsers/meminfo.py (+46/-0)
checkbox-support/checkbox_support/parsers/modinfo.py (+89/-0)
checkbox-support/checkbox_support/parsers/pactl.py (+543/-0)
checkbox-support/checkbox_support/parsers/tests/fixtures/xinput_quantal.txt (+143/-0)
checkbox-support/checkbox_support/parsers/tests/fixtures/xinput_toshiba.txt (+166/-0)
checkbox-support/checkbox_support/parsers/tests/pactl_data/cards-desktop-precise-0.txt (+33/-0)
checkbox-support/checkbox_support/parsers/tests/pactl_data/cards-desktop-precise-1.txt (+51/-0)
checkbox-support/checkbox_support/parsers/tests/pactl_data/cards-desktop-precise-2.txt (+30/-0)
checkbox-support/checkbox_support/parsers/tests/pactl_data/cards-desktop-precise.txt (+41/-0)
checkbox-support/checkbox_support/parsers/tests/pactl_data/desktop-precise-radeon-hdmi-available.txt (+608/-0)
checkbox-support/checkbox_support/parsers/tests/pactl_data/desktop-precise-radeon.txt (+608/-0)
checkbox-support/checkbox_support/parsers/tests/pactl_data/desktop-precise-xps1340.txt (+466/-0)
checkbox-support/checkbox_support/parsers/tests/pactl_data/desktop-precise.txt (+696/-0)
checkbox-support/checkbox_support/parsers/tests/pactl_data/desktop-raring-t430s-dp-available.txt (+889/-0)
checkbox-support/checkbox_support/parsers/tests/pactl_data/desktop-raring-t430s.txt (+889/-0)
checkbox-support/checkbox_support/parsers/tests/pactl_data/modules-desktop-precise-0.txt (+8/-0)
checkbox-support/checkbox_support/parsers/tests/pactl_data/modules-desktop-precise.txt (+213/-0)
checkbox-support/checkbox_support/parsers/tests/pactl_data/samples-desktop-precise.txt (+60/-0)
checkbox-support/checkbox_support/parsers/tests/pactl_data/sinks-desktop-precise-0.txt (+53/-0)
checkbox-support/checkbox_support/parsers/tests/pactl_data/sinks-desktop-precise-1.txt (+56/-0)
checkbox-support/checkbox_support/parsers/tests/pactl_data/sinks-desktop-precise.txt (+56/-0)
checkbox-support/checkbox_support/parsers/tests/test_dmi.py (+80/-0)
checkbox-support/checkbox_support/parsers/tests/test_dmidecode.py (+60/-0)
checkbox-support/checkbox_support/parsers/tests/test_efi.py (+63/-0)
checkbox-support/checkbox_support/parsers/tests/test_pactl.py (+561/-0)
checkbox-support/checkbox_support/parsers/tests/test_udevadm.py (+628/-0)
checkbox-support/checkbox_support/parsers/tests/test_version.py (+29/-0)
checkbox-support/checkbox_support/parsers/tests/test_xinput.py (+130/-0)
checkbox-support/checkbox_support/parsers/tests/udevadm_data/CALXEDA_HIGHBANK.txt (+6826/-0)
checkbox-support/checkbox_support/parsers/tests/udevadm_data/DELL_INSPIRON3521_TOUCHSCREEN.txt (+5642/-0)
checkbox-support/checkbox_support/parsers/tests/udevadm_data/DELL_LATITUDEE4310.txt (+5158/-0)
checkbox-support/checkbox_support/parsers/tests/udevadm_data/DELL_LATITUDEE6430.txt (+5516/-0)
checkbox-support/checkbox_support/parsers/tests/udevadm_data/DELL_OPTIPLEX9020AIO.txt (+5518/-0)
checkbox-support/checkbox_support/parsers/tests/udevadm_data/DELL_VOSTRO3460_FINGERPRINT.txt (+5373/-0)
checkbox-support/checkbox_support/parsers/tests/udevadm_data/DELL_VOSTROV131.txt (+5357/-0)
checkbox-support/checkbox_support/parsers/tests/udevadm_data/DELL_XPS1340.txt (+5621/-0)
checkbox-support/checkbox_support/parsers/tests/udevadm_data/HOME_MADE.txt (+5383/-0)
checkbox-support/checkbox_support/parsers/tests/udevadm_data/HP_ENVY_15_MEDIATEK_BT.txt (+5163/-0)
checkbox-support/checkbox_support/parsers/tests/udevadm_data/HP_PAVILION14_NOTEBOOK_MEDIATEK_BT.txt (+4947/-0)
checkbox-support/checkbox_support/parsers/tests/udevadm_data/HP_PAVILIONSLEEKBOOK14_ACCELEROMETER.txt (+4447/-0)
checkbox-support/checkbox_support/parsers/tests/udevadm_data/HP_PRO2110.txt (+4642/-0)
checkbox-support/checkbox_support/parsers/tests/udevadm_data/HP_PROBOOK6550B_ACCELEROMETER.txt (+5636/-0)
checkbox-support/checkbox_support/parsers/tests/udevadm_data/LENOVO_E431.txt (+5716/-0)
checkbox-support/checkbox_support/parsers/tests/udevadm_data/LENOVO_E445.txt (+5546/-0)
checkbox-support/checkbox_support/parsers/tests/udevadm_data/LENOVO_T420.txt (+5034/-0)
checkbox-support/checkbox_support/parsers/tests/udevadm_data/LENOVO_T430S.txt (+7630/-0)
checkbox-support/checkbox_support/parsers/tests/udevadm_data/PANDABOARD.txt (+4237/-0)
checkbox-support/checkbox_support/parsers/tests/udevadm_data/SAMSUNG_N310.txt (+4092/-0)
checkbox-support/checkbox_support/parsers/udevadm.py (+781/-0)
checkbox-support/checkbox_support/parsers/xinput.py (+198/-0)
checkbox-support/checkbox_support/scripts/audio_settings.py (+375/-0)
checkbox-support/checkbox_support/scripts/gputest_benchmark.py (+106/-0)
checkbox-support/checkbox_support/scripts/tests/test_audio_settings.py (+151/-0)
checkbox-support/checkbox_support/scripts/tests/test_gputest_benchmark.py (+78/-0)
checkbox-support/checkbox_support/tests/__init__.py (+50/-0)
checkbox-support/checkbox_support/udev.py (+93/-0)
checkbox-support/checkbox_support/vendor/__init__.py (+28/-0)
checkbox-support/checkbox_support/vendor/mock.py (+2367/-0)
checkbox-support/setup.cfg (+2/-0)
checkbox-support/setup.py (+40/-0)
plainbox-client/README.rst (+27/-0)
plainbox-client/client.py (+522/-0)
plainbox-client/demo.py (+111/-0)
plainbox-provider-certification-client/README.rst (+2/-0)
plainbox-provider-certification-client/certification-client.provider (+5/-0)
plainbox-provider-certification-client/provider_whitelists/client-cert-12-04-4.whitelist (+305/-0)
plainbox-provider-certification-client/provider_whitelists/client-cert.whitelist (+318/-0)
plainbox-provider-certification-client/provider_whitelists/client-selftest-12-04-4.whitelist (+309/-0)
plainbox-provider-certification-client/provider_whitelists/client-selftest.whitelist (+326/-0)
plainbox-provider-certification-client/setup.cfg (+2/-0)
plainbox-provider-certification-client/setup.py (+47/-0)
plainbox-provider-certification-server-soc/README.rst (+2/-0)
plainbox-provider-certification-server-soc/certification-server-soc.provider (+5/-0)
plainbox-provider-certification-server-soc/provider_whitelists/server-soc-cert.whitelist (+80/-0)
plainbox-provider-certification-server-soc/provider_whitelists/server-soc-selftest.whitelist (+81/-0)
plainbox-provider-certification-server-soc/setup.cfg (+2/-0)
plainbox-provider-certification-server-soc/setup.py (+47/-0)
plainbox-provider-certification-server/README.rst (+2/-0)
plainbox-provider-certification-server/certification-server.provider (+5/-0)
plainbox-provider-certification-server/provider_whitelists/server-selftest-14.04.whitelist (+97/-0)
plainbox-provider-certification-server/provider_whitelists/virt.whitelist (+48/-0)
plainbox-provider-certification-server/setup.cfg (+2/-0)
plainbox-provider-certification-server/setup.py (+47/-0)
plainbox-provider-checkbox/README.rst (+2/-0)
plainbox-provider-checkbox/checkbox.provider (+5/-0)
plainbox-provider-checkbox/provider_bin/accelerometer_test (+347/-0)
plainbox-provider-checkbox/provider_bin/alsa_info (+939/-0)
plainbox-provider-checkbox/provider_bin/alsa_record_playback (+7/-0)
plainbox-provider-checkbox/provider_bin/ansi_parser (+160/-0)
plainbox-provider-checkbox/provider_bin/audio_driver_info (+109/-0)
plainbox-provider-checkbox/provider_bin/audio_settings (+9/-0)
plainbox-provider-checkbox/provider_bin/audio_test (+633/-0)
plainbox-provider-checkbox/provider_bin/battery_test (+175/-0)
plainbox-provider-checkbox/provider_bin/bluetooth_scan (+7/-0)
plainbox-provider-checkbox/provider_bin/bluetooth_test (+149/-0)
plainbox-provider-checkbox/provider_bin/brightness_test (+181/-0)
plainbox-provider-checkbox/provider_bin/camera_test (+558/-0)
plainbox-provider-checkbox/provider_bin/check_is_laptop (+29/-0)
plainbox-provider-checkbox/provider_bin/cking_suite (+105/-0)
plainbox-provider-checkbox/provider_bin/clocktest.c (+124/-0)
plainbox-provider-checkbox/provider_bin/color_depth_info (+76/-0)
plainbox-provider-checkbox/provider_bin/connect_wireless (+45/-0)
plainbox-provider-checkbox/provider_bin/cpu_offlining (+46/-0)
plainbox-provider-checkbox/provider_bin/cpu_topology (+103/-0)
plainbox-provider-checkbox/provider_bin/create_connection (+280/-0)
plainbox-provider-checkbox/provider_bin/cycle_vts (+32/-0)
plainbox-provider-checkbox/provider_bin/disk_read_performance_test (+74/-0)
plainbox-provider-checkbox/provider_bin/disk_smart (+247/-0)
plainbox-provider-checkbox/provider_bin/disk_stats_test (+68/-0)
plainbox-provider-checkbox/provider_bin/dns_server_test (+49/-0)
plainbox-provider-checkbox/provider_bin/filter_templates (+134/-0)
plainbox-provider-checkbox/provider_bin/floppy_test (+105/-0)
plainbox-provider-checkbox/provider_bin/frequency_governors_test (+648/-0)
plainbox-provider-checkbox/provider_bin/fresh_rate_info (+76/-0)
plainbox-provider-checkbox/provider_bin/fwts_test (+363/-0)
plainbox-provider-checkbox/provider_bin/gateway_ping_test (+273/-0)
plainbox-provider-checkbox/provider_bin/gcov_tarball (+11/-0)
plainbox-provider-checkbox/provider_bin/glob_test (+121/-0)
plainbox-provider-checkbox/provider_bin/gpu_test (+233/-0)
plainbox-provider-checkbox/provider_bin/gputest_benchmark (+27/-0)
plainbox-provider-checkbox/provider_bin/graphic_memory_info (+81/-0)
plainbox-provider-checkbox/provider_bin/graphics_driver (+368/-0)
plainbox-provider-checkbox/provider_bin/graphics_modes_info (+74/-0)
plainbox-provider-checkbox/provider_bin/graphics_stress_test (+467/-0)
plainbox-provider-checkbox/provider_bin/gst_pipeline_test (+78/-0)
plainbox-provider-checkbox/provider_bin/ipmi_test (+39/-0)
plainbox-provider-checkbox/provider_bin/key_test (+409/-0)
plainbox-provider-checkbox/provider_bin/keyboard_test (+86/-0)
plainbox-provider-checkbox/provider_bin/lamp_test (+31/-0)
plainbox-provider-checkbox/provider_bin/led_hdd_test (+20/-0)
plainbox-provider-checkbox/provider_bin/lock_screen_watcher (+101/-0)
plainbox-provider-checkbox/provider_bin/lsmod_info (+40/-0)
plainbox-provider-checkbox/provider_bin/max_diskspace_used (+34/-0)
plainbox-provider-checkbox/provider_bin/memory_compare (+91/-0)
plainbox-provider-checkbox/provider_bin/memory_info (+35/-0)
plainbox-provider-checkbox/provider_bin/memory_test (+239/-0)
plainbox-provider-checkbox/provider_bin/mm-test (+527/-0)
plainbox-provider-checkbox/provider_bin/network (+648/-0)
plainbox-provider-checkbox/provider_bin/network_bandwidth_test (+671/-0)
plainbox-provider-checkbox/provider_bin/network_check (+72/-0)
plainbox-provider-checkbox/provider_bin/network_device_info (+262/-0)
plainbox-provider-checkbox/provider_bin/network_info (+67/-0)
plainbox-provider-checkbox/provider_bin/network_ntp_test (+212/-0)
plainbox-provider-checkbox/provider_bin/network_printer_test (+57/-0)
plainbox-provider-checkbox/provider_bin/network_reconnect_resume_test (+102/-0)
plainbox-provider-checkbox/provider_bin/network_restart (+346/-0)
plainbox-provider-checkbox/provider_bin/network_wait (+20/-0)
plainbox-provider-checkbox/provider_bin/obex_send (+84/-0)
plainbox-provider-checkbox/provider_bin/optical_detect (+29/-0)
plainbox-provider-checkbox/provider_bin/optical_read_test (+134/-0)
plainbox-provider-checkbox/provider_bin/optical_write_test (+158/-0)
plainbox-provider-checkbox/provider_bin/piglit_test (+98/-0)
plainbox-provider-checkbox/provider_bin/pm_log_check (+267/-0)
plainbox-provider-checkbox/provider_bin/pm_test (+819/-0)
plainbox-provider-checkbox/provider_bin/process_wait (+73/-0)
plainbox-provider-checkbox/provider_bin/pts_run (+34/-0)
plainbox-provider-checkbox/provider_bin/pulse-active-port-change (+136/-0)
plainbox-provider-checkbox/provider_bin/removable_storage_test (+594/-0)
plainbox-provider-checkbox/provider_bin/removable_storage_watcher (+890/-0)
plainbox-provider-checkbox/provider_bin/rendercheck_test (+263/-0)
plainbox-provider-checkbox/provider_bin/resolution_test (+49/-0)
plainbox-provider-checkbox/provider_bin/resolution_test.qml (+37/-0)
plainbox-provider-checkbox/provider_bin/rotation_test (+73/-0)
plainbox-provider-checkbox/provider_bin/run_templates (+144/-0)
plainbox-provider-checkbox/provider_bin/samba_test (+38/-0)
plainbox-provider-checkbox/provider_bin/screenshot_validation (+161/-0)
plainbox-provider-checkbox/provider_bin/sleep_test (+393/-0)
plainbox-provider-checkbox/provider_bin/sleep_test_log_check (+201/-0)
plainbox-provider-checkbox/provider_bin/sleep_time_check (+62/-0)
plainbox-provider-checkbox/provider_bin/sources_test (+28/-0)
plainbox-provider-checkbox/provider_bin/spindown (+128/-0)
plainbox-provider-checkbox/provider_bin/storage_test (+80/-0)
plainbox-provider-checkbox/provider_bin/threaded_memtest.c (+428/-0)
plainbox-provider-checkbox/provider_bin/tomcat_test (+24/-0)
plainbox-provider-checkbox/provider_bin/touchpad_driver_info (+82/-0)
plainbox-provider-checkbox/provider_bin/touchpad_test (+199/-0)
plainbox-provider-checkbox/provider_bin/udisks2_monitor (+154/-0)
plainbox-provider-checkbox/provider_bin/virtualization (+340/-0)
plainbox-provider-checkbox/provider_bin/volume_test (+138/-0)
plainbox-provider-checkbox/provider_bin/wifi_time2reconnect (+55/-0)
plainbox-provider-checkbox/provider_bin/window_test (+342/-0)
plainbox-provider-checkbox/provider_bin/wireless_ext (+15/-0)
plainbox-provider-checkbox/provider_bin/xen_test (+74/-0)
plainbox-provider-checkbox/provider_bin/xml_sanitize (+46/-0)
plainbox-provider-checkbox/provider_bin/xrandr_cycle (+168/-0)
plainbox-provider-checkbox/provider_data/settings/shutter.xml (+25/-0)
plainbox-provider-checkbox/provider_data/websites/SWF_Test.as (+14/-0)
plainbox-provider-checkbox/provider_data/websites/flashtest.html (+6/-0)
plainbox-provider-checkbox/provider_data/websites/flashvideo.html (+6/-0)
plainbox-provider-checkbox/provider_data/websites/html5_video.html (+14/-0)
plainbox-provider-checkbox/provider_data/websites/testindex.html (+6/-0)
plainbox-provider-checkbox/provider_jobs/audio.txt.in (+394/-0)
plainbox-provider-checkbox/provider_jobs/benchmarks.txt.in (+297/-0)
plainbox-provider-checkbox/provider_jobs/bluetooth.txt.in (+116/-0)
plainbox-provider-checkbox/provider_jobs/camera.txt.in (+52/-0)
plainbox-provider-checkbox/provider_jobs/codecs.txt.in (+31/-0)
plainbox-provider-checkbox/provider_jobs/cpu.txt.in (+50/-0)
plainbox-provider-checkbox/provider_jobs/daemons.txt.in (+66/-0)
plainbox-provider-checkbox/provider_jobs/disk.txt.in (+100/-0)
plainbox-provider-checkbox/provider_jobs/esata.txt.in (+37/-0)
plainbox-provider-checkbox/provider_jobs/ethernet.txt.in (+114/-0)
plainbox-provider-checkbox/provider_jobs/expresscard.txt.in (+10/-0)
plainbox-provider-checkbox/provider_jobs/fingerprint.txt.in (+29/-0)
plainbox-provider-checkbox/provider_jobs/firewire.txt.in (+38/-0)
plainbox-provider-checkbox/provider_jobs/firmware.txt.in (+29/-0)
plainbox-provider-checkbox/provider_jobs/floppy.txt.in (+13/-0)
plainbox-provider-checkbox/provider_jobs/graphics.txt.in (+291/-0)
plainbox-provider-checkbox/provider_jobs/hibernate.txt.in (+38/-0)
plainbox-provider-checkbox/provider_jobs/info.txt.in (+225/-0)
plainbox-provider-checkbox/provider_jobs/input.txt.in (+67/-0)
plainbox-provider-checkbox/provider_jobs/install.txt.in (+9/-0)
plainbox-provider-checkbox/provider_jobs/keys.txt.in (+222/-0)
plainbox-provider-checkbox/provider_jobs/led.txt.in (+197/-0)
plainbox-provider-checkbox/provider_jobs/local.txt.in (+328/-0)
plainbox-provider-checkbox/provider_jobs/mediacard.txt.in (+476/-0)
plainbox-provider-checkbox/provider_jobs/memory.txt.in (+16/-0)
plainbox-provider-checkbox/provider_jobs/mir.txt.in (+27/-0)
plainbox-provider-checkbox/provider_jobs/miscellanea.txt.in (+139/-0)
plainbox-provider-checkbox/provider_jobs/mobilebroadband.txt.in (+23/-0)
plainbox-provider-checkbox/provider_jobs/monitor.txt.in (+113/-0)
plainbox-provider-checkbox/provider_jobs/networking.txt.in (+73/-0)
plainbox-provider-checkbox/provider_jobs/optical.txt.in (+230/-0)
plainbox-provider-checkbox/provider_jobs/panel_clock_test.txt.in (+29/-0)
plainbox-provider-checkbox/provider_jobs/panel_reboot.txt.in (+11/-0)
plainbox-provider-checkbox/provider_jobs/peripheral.txt.in (+38/-0)
plainbox-provider-checkbox/provider_jobs/piglit.txt.in (+80/-0)
plainbox-provider-checkbox/provider_jobs/power-management.txt.in (+236/-0)
plainbox-provider-checkbox/provider_jobs/rendercheck.txt.in (+13/-0)
plainbox-provider-checkbox/provider_jobs/server-services.txt.in (+47/-0)
plainbox-provider-checkbox/provider_jobs/smoke.txt.in (+50/-0)
plainbox-provider-checkbox/provider_jobs/sniff.txt.in (+74/-0)
plainbox-provider-checkbox/provider_jobs/stress.txt.in (+244/-0)
plainbox-provider-checkbox/provider_jobs/suspend.txt.in (+2024/-0)
plainbox-provider-checkbox/provider_jobs/touchpad.txt.in (+154/-0)
plainbox-provider-checkbox/provider_jobs/touchscreen.txt.in (+92/-0)
plainbox-provider-checkbox/provider_jobs/usb.txt.in (+224/-0)
plainbox-provider-checkbox/provider_jobs/user_apps.txt.in (+491/-0)
plainbox-provider-checkbox/provider_jobs/virtualization.txt.in (+27/-0)
plainbox-provider-checkbox/provider_jobs/wireless.txt.in (+415/-0)
plainbox-provider-checkbox/provider_whitelists/autotesting.whitelist (+112/-0)
plainbox-provider-checkbox/provider_whitelists/default.whitelist (+149/-0)
plainbox-provider-checkbox/provider_whitelists/hwsubmit.whitelist (+24/-0)
plainbox-provider-checkbox/provider_whitelists/smoke.whitelist (+27/-0)
plainbox-provider-checkbox/provider_whitelists/sniff.whitelist (+36/-0)
plainbox-provider-checkbox/provider_whitelists/sru.whitelist (+120/-0)
plainbox-provider-checkbox/setup.cfg (+7/-0)
plainbox-provider-checkbox/setup.py (+89/-0)
plainbox-provider-resource-generic/README.rst (+2/-0)
plainbox-provider-resource-generic/plainbox-resources.provider (+5/-0)
plainbox-provider-resource-generic/provider_bin/80211_resource.c (+234/-0)
plainbox-provider-resource-generic/provider_bin/block_device_resource (+71/-0)
plainbox-provider-resource-generic/provider_bin/cdimage_resource (+100/-0)
plainbox-provider-resource-generic/provider_bin/cpuinfo_resource (+56/-0)
plainbox-provider-resource-generic/provider_bin/display_resource (+84/-0)
plainbox-provider-resource-generic/provider_bin/dmi_resource (+55/-0)
plainbox-provider-resource-generic/provider_bin/dpkg_resource (+56/-0)
plainbox-provider-resource-generic/provider_bin/efi_resource (+54/-0)
plainbox-provider-resource-generic/provider_bin/gconf_resource (+95/-0)
plainbox-provider-resource-generic/provider_bin/hal_resource (+475/-0)
plainbox-provider-resource-generic/provider_bin/lsb_resource (+56/-0)
plainbox-provider-resource-generic/provider_bin/meminfo_resource (+46/-0)
plainbox-provider-resource-generic/provider_bin/module_resource (+73/-0)
plainbox-provider-resource-generic/provider_bin/nl80211.h (+3959/-0)
plainbox-provider-resource-generic/provider_bin/udev_resource (+63/-0)
plainbox-provider-resource-generic/provider_bin/uname_resource (+39/-0)
plainbox-provider-resource-generic/provider_bin/xinput_resource (+74/-0)
plainbox-provider-resource-generic/provider_jobs/resource.txt.in (+183/-0)
plainbox-provider-resource-generic/setup.cfg (+7/-0)
plainbox-provider-resource-generic/setup.py (+90/-0)
plainbox/.gitignore (+8/-0)
plainbox/COPYING (+674/-0)
plainbox/MANIFEST.in (+16/-0)
plainbox/README.rst (+33/-0)
plainbox/contrib/policykit_auth_admin_keep/org.freedesktop.policykit.pkexec.run-plainbox-job.policy (+30/-0)
plainbox/contrib/policykit_yes/org.freedesktop.policykit.pkexec.run-plainbox-job.policy (+29/-0)
plainbox/daily-package-testing/README (+18/-0)
plainbox/daily-package-testing/Vagrantfile (+48/-0)
plainbox/daily-package-testing/test-in-vagrant.sh (+59/-0)
plainbox/docs/_theme/plainbox/page.html (+16/-0)
plainbox/docs/_theme/plainbox/theme.conf (+5/-0)
plainbox/docs/appdev/index.rst (+53/-0)
plainbox/docs/author/index.rst (+59/-0)
plainbox/docs/author/jobs.rst (+176/-0)
plainbox/docs/author/provider-files.rst (+99/-0)
plainbox/docs/author/provider-i18n.rst (+138/-0)
plainbox/docs/author/provider-namespaces.rst (+189/-0)
plainbox/docs/author/provider-template.rst (+369/-0)
plainbox/docs/author/providers.rst (+16/-0)
plainbox/docs/author/rfc822.rst (+64/-0)
plainbox/docs/author/tutorial.rst (+178/-0)
plainbox/docs/author/whitelists.rst (+120/-0)
plainbox/docs/changelog.rst (+385/-0)
plainbox/docs/conf.py (+268/-0)
plainbox/docs/dev/architecture.rst (+40/-0)
plainbox/docs/dev/config.rst (+277/-0)
plainbox/docs/dev/index.rst (+18/-0)
plainbox/docs/dev/intro.rst (+244/-0)
plainbox/docs/dev/old.rst (+343/-0)
plainbox/docs/dev/resources.rst (+261/-0)
plainbox/docs/dev/trusted-launcher.rst (+199/-0)
plainbox/docs/glossary.rst (+120/-0)
plainbox/docs/index.rst (+56/-0)
plainbox/docs/install.rst (+35/-0)
plainbox/docs/manpages/index.rst (+8/-0)
plainbox/docs/manpages/plainbox-trusted-launcher-1.rst (+106/-0)
plainbox/docs/manpages/plainbox.rst (+222/-0)
plainbox/docs/ref/index.rst (+14/-0)
plainbox/docs/ref/plainbox.abc.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.applogic.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.box.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.clitools.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.color.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.commands.analyze.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.commands.check_config.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.commands.checkbox.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.commands.crash.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.commands.dev.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.commands.list.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.commands.logtest.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.commands.parse.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.commands.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.commands.run.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.commands.script.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.commands.selftest.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.commands.special.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.ctrl.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.depmgr.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.exporter.html.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.exporter.json.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.exporter.rfc822.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.exporter.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.exporter.text.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.exporter.xml.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.highlevel.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.integration_tests.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.job.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.logging.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.parsers.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.providers.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.providers.special.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.providers.v1.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.resource.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.result.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.runner.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.secure.config.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.secure.job.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.secure.launcher1.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.secure.plugins.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.secure.providers.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.secure.providers.v1.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.secure.qualifiers.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.secure.rfc822.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.secure.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.session.jobs.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.session.legacy.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.session.manager.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.session.resume.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.session.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.session.state.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.session.storage.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.session.suspend.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.signal.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.symbol.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.testing_utils.rst (+5/-0)
plainbox/docs/ref/plainbox.impl.transport.rst (+5/-0)
plainbox/docs/ref/plainbox.provider_manager.rst (+5/-0)
plainbox/docs/ref/plainbox.public.rst (+5/-0)
plainbox/docs/ref/plainbox.rst (+5/-0)
plainbox/docs/ref/plainbox.testing_utils.cwd.rst (+5/-0)
plainbox/docs/ref/plainbox.testing_utils.io.rst (+5/-0)
plainbox/docs/ref/plainbox.testing_utils.resource.rst (+5/-0)
plainbox/docs/ref/plainbox.testing_utils.rst (+5/-0)
plainbox/docs/ref/plainbox.testing_utils.testcases.rst (+5/-0)
plainbox/docs/ref/plainbox.vendor.rst (+5/-0)
plainbox/docs/ref/plainbox.vendor.textland.rst (+15/-0)
plainbox/docs/usage.rst (+113/-0)
plainbox/impl/providers/stubbox/po/pl.po (+293/-0)
plainbox/mk-interesting-graphs.sh (+33/-0)
plainbox/plainbox/__init__.py (+38/-0)
plainbox/plainbox/__main__.py (+32/-0)
plainbox/plainbox/abc.py (+645/-0)
plainbox/plainbox/data/report/checkbox.js (+16/-0)
plainbox/plainbox/data/report/checkbox.xsl (+188/-0)
plainbox/plainbox/data/report/hardware-1_0.rng (+533/-0)
plainbox/plainbox/data/report/styles.css (+258/-0)
plainbox/plainbox/i18n.py (+310/-0)
plainbox/plainbox/impl/__init__.py (+123/-0)
plainbox/plainbox/impl/_argparse.py (+227/-0)
plainbox/plainbox/impl/applogic.py (+121/-0)
plainbox/plainbox/impl/box.py (+106/-0)
plainbox/plainbox/impl/clitools.py (+633/-0)
plainbox/plainbox/impl/color.py (+90/-0)
plainbox/plainbox/impl/commands/__init__.py (+170/-0)
plainbox/plainbox/impl/commands/analyze.py (+281/-0)
plainbox/plainbox/impl/commands/check_config.py (+93/-0)
plainbox/plainbox/impl/commands/checkbox.py (+163/-0)
plainbox/plainbox/impl/commands/crash.py (+75/-0)
plainbox/plainbox/impl/commands/dev.py (+67/-0)
plainbox/plainbox/impl/commands/list.py (+87/-0)
plainbox/plainbox/impl/commands/logtest.py (+59/-0)
plainbox/plainbox/impl/commands/parse.py (+124/-0)
plainbox/plainbox/impl/commands/run.py (+431/-0)
plainbox/plainbox/impl/commands/script.py (+127/-0)
plainbox/plainbox/impl/commands/selftest.py (+103/-0)
plainbox/plainbox/impl/commands/special.py (+161/-0)
plainbox/plainbox/impl/commands/startprovider.py (+531/-0)
plainbox/plainbox/impl/commands/test_dev.py (+78/-0)
plainbox/plainbox/impl/commands/test_parse.py (+132/-0)
plainbox/plainbox/impl/commands/test_run.py (+167/-0)
plainbox/plainbox/impl/commands/test_script.py (+163/-0)
plainbox/plainbox/impl/ctrl.py (+899/-0)
plainbox/plainbox/impl/depmgr.py (+316/-0)
plainbox/plainbox/impl/exporter/__init__.py (+300/-0)
plainbox/plainbox/impl/exporter/html.py (+172/-0)
plainbox/plainbox/impl/exporter/json.py (+55/-0)
plainbox/plainbox/impl/exporter/rfc822.py (+48/-0)
plainbox/plainbox/impl/exporter/test_html.py (+142/-0)
plainbox/plainbox/impl/exporter/test_init.py (+222/-0)
plainbox/plainbox/impl/exporter/test_json.py (+63/-0)
plainbox/plainbox/impl/exporter/test_rfc822.py (+47/-0)
plainbox/plainbox/impl/exporter/test_text.py (+43/-0)
plainbox/plainbox/impl/exporter/test_xml.py (+115/-0)
plainbox/plainbox/impl/exporter/text.py (+41/-0)
plainbox/plainbox/impl/exporter/xlsx.py (+591/-0)
plainbox/plainbox/impl/exporter/xml.py (+392/-0)
plainbox/plainbox/impl/highlevel.py (+396/-0)
plainbox/plainbox/impl/integration_tests.py (+190/-0)
plainbox/plainbox/impl/job.py (+666/-0)
plainbox/plainbox/impl/logging.py (+421/-0)
plainbox/plainbox/impl/parsers.py (+160/-0)
plainbox/plainbox/impl/providers/__init__.py (+58/-0)
plainbox/plainbox/impl/providers/special.py (+52/-0)
plainbox/plainbox/impl/providers/stubbox/bin/stub_package_list (+3/-0)
plainbox/plainbox/impl/providers/stubbox/jobs/local.txt.in (+7/-0)
plainbox/plainbox/impl/providers/stubbox/jobs/multilevel.txt.in (+22/-0)
plainbox/plainbox/impl/providers/stubbox/jobs/stub.txt.in (+152/-0)
plainbox/plainbox/impl/providers/stubbox/manage.py (+38/-0)
plainbox/plainbox/impl/providers/stubbox/po/POTFILES.in (+5/-0)
plainbox/plainbox/impl/providers/stubbox/po/pl.po (+303/-0)
plainbox/plainbox/impl/providers/stubbox/po/stubbox.pot (+245/-0)
plainbox/plainbox/impl/providers/stubbox/po/zh_TW.po (+246/-0)
plainbox/plainbox/impl/providers/stubbox/whitelists/stub.whitelist (+22/-0)
plainbox/plainbox/impl/providers/stubbox/whitelists/stub1.whitelist (+7/-0)
plainbox/plainbox/impl/providers/stubbox/whitelists/stub2.whitelist (+7/-0)
plainbox/plainbox/impl/providers/test_special.py (+25/-0)
plainbox/plainbox/impl/providers/test_v1.py (+122/-0)
plainbox/plainbox/impl/providers/v1.py (+182/-0)
plainbox/plainbox/impl/resource.py (+540/-0)
plainbox/plainbox/impl/result.py (+286/-0)
plainbox/plainbox/impl/runner.py (+676/-0)
plainbox/plainbox/impl/secure/__init__.py (+31/-0)
plainbox/plainbox/impl/secure/config.py (+784/-0)
plainbox/plainbox/impl/secure/job.py (+112/-0)
plainbox/plainbox/impl/secure/launcher1.py (+270/-0)
plainbox/plainbox/impl/secure/plugins.py (+479/-0)
plainbox/plainbox/impl/secure/providers/__init__.py (+58/-0)
plainbox/plainbox/impl/secure/providers/test_v1.py (+949/-0)
plainbox/plainbox/impl/secure/providers/v1.py (+908/-0)
plainbox/plainbox/impl/secure/qualifiers.py (+608/-0)
plainbox/plainbox/impl/secure/rfc822.py (+524/-0)
plainbox/plainbox/impl/secure/test_config.py (+481/-0)
plainbox/plainbox/impl/secure/test_job.py (+112/-0)
plainbox/plainbox/impl/secure/test_launcher1.py (+333/-0)
plainbox/plainbox/impl/secure/test_plugins.py (+510/-0)
plainbox/plainbox/impl/secure/test_qualifiers.py (+704/-0)
plainbox/plainbox/impl/secure/test_rfc822.py (+650/-0)
plainbox/plainbox/impl/session/__init__.py (+97/-0)
plainbox/plainbox/impl/session/jobs.py (+310/-0)
plainbox/plainbox/impl/session/legacy.py (+283/-0)
plainbox/plainbox/impl/session/manager.py (+286/-0)
plainbox/plainbox/impl/session/resume.py (+675/-0)
plainbox/plainbox/impl/session/state.py (+642/-0)
plainbox/plainbox/impl/session/storage.py (+649/-0)
plainbox/plainbox/impl/session/suspend.py (+439/-0)
plainbox/plainbox/impl/session/test_jobs.py (+218/-0)
plainbox/plainbox/impl/session/test_legacy.py (+65/-0)
plainbox/plainbox/impl/session/test_manger.py (+161/-0)
plainbox/plainbox/impl/session/test_resume.py (+1691/-0)
plainbox/plainbox/impl/session/test_state.py (+681/-0)
plainbox/plainbox/impl/session/test_storage.py (+189/-0)
plainbox/plainbox/impl/session/test_suspend.py (+676/-0)
plainbox/plainbox/impl/signal.py (+165/-0)
plainbox/plainbox/impl/symbol.py (+197/-0)
plainbox/plainbox/impl/test_applogic.py (+40/-0)
plainbox/plainbox/impl/test_box.py (+344/-0)
plainbox/plainbox/impl/test_clitools.py (+176/-0)
plainbox/plainbox/impl/test_color.py (+40/-0)
plainbox/plainbox/impl/test_ctrl.py (+998/-0)
plainbox/plainbox/impl/test_depmgr.py (+294/-0)
plainbox/plainbox/impl/test_job.py (+672/-0)
plainbox/plainbox/impl/test_resource.py (+359/-0)
plainbox/plainbox/impl/test_result.py (+136/-0)
plainbox/plainbox/impl/test_runner.py (+120/-0)
plainbox/plainbox/impl/test_signal.py (+79/-0)
plainbox/plainbox/impl/test_symbol.py (+176/-0)
plainbox/plainbox/impl/test_testing_utils.py (+88/-0)
plainbox/plainbox/impl/test_transport.py (+68/-0)
plainbox/plainbox/impl/testing_utils.py (+102/-0)
plainbox/plainbox/impl/transport.py (+98/-0)
plainbox/plainbox/provider_manager.py (+923/-0)
plainbox/plainbox/public.py (+50/-0)
plainbox/plainbox/test-data/html-exporter/example-data.html (+10931/-0)
plainbox/plainbox/test-data/html-exporter/html-inliner.html (+19/-0)
plainbox/plainbox/test-data/integration-tests/smoke/true.json (+11/-0)
plainbox/plainbox/test-data/xml-exporter/example-data.json (+19037/-0)
plainbox/plainbox/test-data/xml-exporter/example-data.xml (+15749/-0)
plainbox/plainbox/test-data/xml-exporter/test_dump_with_binary_attachment.json (+7/-0)
plainbox/plainbox/test-data/xml-exporter/test_dump_with_binary_attachment.xml (+21/-0)
plainbox/plainbox/test-data/xml-exporter/test_dump_with_comments.json (+13/-0)
plainbox/plainbox/test-data/xml-exporter/test_dump_with_comments.xml (+30/-0)
plainbox/plainbox/test-data/xml-exporter/test_dump_with_hardware_info.json (+10/-0)
plainbox/plainbox/test-data/xml-exporter/test_dump_with_hardware_info.xml (+22/-0)
plainbox/plainbox/test-data/xml-exporter/test_dump_with_io_log.json (+14/-0)
plainbox/plainbox/test-data/xml-exporter/test_dump_with_io_log.xml (+30/-0)
plainbox/plainbox/test-data/xml-exporter/test_dump_with_text_attachment.json (+7/-0)
plainbox/plainbox/test-data/xml-exporter/test_dump_with_text_attachment.xml (+21/-0)
plainbox/plainbox/test_abc.py (+36/-0)
plainbox/plainbox/test_i18n.py (+47/-0)
plainbox/plainbox/test_provider_manager.py (+435/-0)
plainbox/plainbox/test_public.py (+36/-0)
plainbox/plainbox/testing_utils/__init__.py (+72/-0)
plainbox/plainbox/testing_utils/cwd.py (+46/-0)
plainbox/plainbox/testing_utils/io.py (+108/-0)
plainbox/plainbox/testing_utils/resource.py (+104/-0)
plainbox/plainbox/testing_utils/test_cwd.py (+43/-0)
plainbox/plainbox/testing_utils/test_io.py (+78/-0)
plainbox/plainbox/testing_utils/test_testcases.py (+165/-0)
plainbox/plainbox/testing_utils/testcases.py (+302/-0)
plainbox/plainbox/tests.py (+56/-0)
plainbox/plainbox/vendor/__init__.py (+28/-0)
plainbox/plainbox/vendor/argparse/py32-argparse.py (+2372/-0)
plainbox/plainbox/vendor/argparse/py33-argparse.py (+2377/-0)
plainbox/plainbox/vendor/argparse/py34-argparse.py (+2384/-0)
plainbox/plainbox/vendor/extcmd/__init__.py (+759/-0)
plainbox/plainbox/vendor/extcmd/test.py (+100/-0)
plainbox/plainbox/vendor/funcsigs/LICENSE (+13/-0)
plainbox/plainbox/vendor/funcsigs/__init__.py (+810/-0)
plainbox/plainbox/vendor/funcsigs/version.py (+1/-0)
plainbox/plainbox/vendor/mock.py (+2367/-0)
plainbox/plainbox/vendor/textland-project/.gitignore (+5/-0)
plainbox/plainbox/vendor/textland-project/COPYING (+674/-0)
plainbox/plainbox/vendor/textland-project/README.md (+40/-0)
plainbox/plainbox/vendor/textland-project/demo1.py (+94/-0)
plainbox/plainbox/vendor/textland-project/demo2.py (+58/-0)
plainbox/plainbox/vendor/textland-project/demo3.py (+69/-0)
plainbox/plainbox/vendor/textland-project/demo4.py (+75/-0)
plainbox/plainbox/vendor/textland-project/demo5.py (+53/-0)
plainbox/plainbox/vendor/textland-project/demo6.py (+77/-0)
plainbox/plainbox/vendor/textland-project/setup.py (+40/-0)
plainbox/plainbox/vendor/textland-project/textland/__init__.py (+99/-0)
plainbox/plainbox/vendor/textland-project/textland/abc.py (+71/-0)
plainbox/plainbox/vendor/textland-project/textland/bits.py (+25/-0)
plainbox/plainbox/vendor/textland-project/textland/display.py (+315/-0)
plainbox/plainbox/vendor/textland-project/textland/drawing.py (+112/-0)
plainbox/plainbox/vendor/textland-project/textland/events.py (+31/-0)
plainbox/plainbox/vendor/textland-project/textland/image.py (+122/-0)
plainbox/plainbox/vendor/textland-project/textland/keys.py (+24/-0)
plainbox/po/POTFILES.in (+121/-0)
plainbox/po/es.po (+2639/-0)
plainbox/po/ja.po (+2593/-0)
plainbox/po/pl.po (+2789/-0)
plainbox/po/plainbox.pot (+2592/-0)
plainbox/po/zh_TW.po (+2593/-0)
plainbox/requirements/deb-core.txt (+2/-0)
plainbox/requirements/deb-docs.txt (+1/-0)
plainbox/requirements/deb-i18n.txt (+1/-0)
plainbox/requirements/pip-core.txt (+2/-0)
plainbox/requirements/pip-docs.txt (+1/-0)
plainbox/requirements/pip-optional.txt (+1/-0)
plainbox/requirements/remove-deb-core.txt (+2/-0)
plainbox/setup.cfg (+5/-0)
plainbox/setup.py (+82/-0)
providers/2014.com.canonical.certification.meta-test/jobs/coverage.txt (+23/-0)
providers/2014.com.canonical.certification.meta-test/jobs/support.txt (+10/-0)
providers/2014.com.canonical.certification.meta-test/jobs/tests.txt (+40/-0)
providers/2014.com.canonical.certification.meta-test/manage.py (+23/-0)
providers/2014.com.canonical.certification.meta-test/readme.md (+5/-0)
providers/2014.com.canonical.certification.meta-test/whitelists/unit-tests.whitelist (+2/-0)
setup.py (+45/-0)
support/cpplint.py (+4024/-0)
support/develop-projects (+42/-0)
support/enable-tab-completion (+39/-0)
support/expected-pip-freeze.txt (+13/-0)
support/external-tarballs-revision.txt (+1/-0)
support/get-checkbox-packaging (+58/-0)
support/get-external-tarballs (+55/-0)
support/install-deb-dependencies (+51/-0)
support/install-pip-dependencies (+57/-0)
support/install-pip-from-source (+56/-0)
support/install-ppa-dependencies (+67/-0)
support/manage_release (+97/-0)
support/mk-venv (+135/-0)
support/packaging-revision.txt (+1/-0)
support/provision-vagrant (+78/-0)
support/releasectl (+633/-0)
support/remove-deb-anty-dependencies (+55/-0)
support/requirements/deb-base.txt (+13/-0)
support/requirements/pip-devtools.txt (+5/-0)
support/requirements/remove-deb-base.txt (+6/-0)
support/test-install-dependencies (+64/-0)
support/test-with-coverage (+70/-0)
tarmac-verify (+17/-0)
test-in-vagrant.sh (+151/-0)
To merge this branch: bzr merge lp:~zyga/checkbox/drop-legacy
Reviewer Review Type Date Requested Status
Checkbox Developers Pending
Review via email: mp+211957@code.launchpad.net

Description of the change

This branch drops all checkbox-old related packages from trunk packaging.

To post a comment you must log in.
lp:~zyga/checkbox/drop-legacy updated
2826. By Zygmunt Krynicki

plainbox:test-data: update integration tests to use stubbox

Now that checkbox-old is gone and we don't assume to use any particular
provider. All integration tests should use stubbox.

Signed-off-by: Zygmunt Krynicki <email address hidden>

2827. By Zygmunt Krynicki

plainbox: drop PLAINBOX_USE_TRUSTED_LAUNCHER

This patch drops the special PLAINBOX_USE_TRUSTED_LAUNCHER environment variable
that allowed to force-use plainbox-trusted-launcher-1 with a special insecure,
hidden argument --development, to use checkbox-from-source provider. With the
removal of checkbox-old, that option makes no sense anymore.

Signed-off-by: Zygmunt Krynicki <email address hidden>

Unmerged revisions

2827. By Zygmunt Krynicki

plainbox: drop PLAINBOX_USE_TRUSTED_LAUNCHER

This patch drops the special PLAINBOX_USE_TRUSTED_LAUNCHER environment variable
that allowed to force-use plainbox-trusted-launcher-1 with a special insecure,
hidden argument --development, to use checkbox-from-source provider. With the
removal of checkbox-old, that option makes no sense anymore.

Signed-off-by: Zygmunt Krynicki <email address hidden>

2826. By Zygmunt Krynicki

plainbox:test-data: update integration tests to use stubbox

Now that checkbox-old is gone and we don't assume to use any particular
provider. All integration tests should use stubbox.

Signed-off-by: Zygmunt Krynicki <email address hidden>

2825. By Zygmunt Krynicki

Replace whitelist symlinks with copies from checkbox-old

2824. By Zygmunt Krynicki

support:releasectl: drop support for checkbox-old

2823. By Zygmunt Krynicki

plainbox,checkbox-ng: drop all references to checkbox-src provider

2822. By Zygmunt Krynicki

support: don't multiplex to checkbox-old

2821. By Zygmunt Krynicki

support: don't develop checkbox-old

2820. By Zygmunt Krynicki

Remove checkbox-old references from ignore files

2819. By Zygmunt Krynicki

Replace whitelist symlinks with copies from checkbox-old

2818. By Zygmunt Krynicki

Replace data symlinks with copies from checkbox-old (actual data)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file '.bzrignore'
2--- .bzrignore 1970-01-01 00:00:00 +0000
3+++ .bzrignore 2014-03-20 14:51:45 +0000
4@@ -0,0 +1,24 @@
5+# Ignore all python3 bytecode data
6+__pycache__
7+# Ignore setuptools artifacts
8+build
9+dist
10+*.egg-info
11+# Ignore coverage artifacts
12+.coverage
13+htmlcov
14+# Ignore logs created by test-in-vagrant.sh
15+vagrant-logs
16+# Ignore vagrant state file
17+.vagrant
18+# The list below is riddled with junk created by running the test suite of checkbox
19+# It should be really cleaned up as tests should _not_ do that but right now it's more
20+# annoying than dangerous so I'll get rid of the noise first
21+*.o
22+# Attic where zygmunt puts random stuff
23+_attic
24+# Orig files from diffs and patches
25+*.orig
26+# Ignore stuff we get from somewhere else
27+support/external-tarballs
28+support/checkbox-packaging
29
30=== added file '.coveragerc'
31--- .coveragerc 1970-01-01 00:00:00 +0000
32+++ .coveragerc 2014-03-20 14:51:45 +0000
33@@ -0,0 +1,25 @@
34+[run]
35+branch = True
36+source = plainbox
37+omit =
38+ plainbox/impl/commands/test_*
39+ plainbox/impl/exporter/test_*
40+ plainbox/impl/integration_tests.py
41+ plainbox/impl/secure/test_*
42+ plainbox/impl/test_*
43+ plainbox/impl/transport/test_*
44+ plainbox/setup.py
45+ plainbox/test_*
46+ plainbox/testing_utils/test_*
47+ plainbox/tests.py
48+ plainbox/vendor/*
49+
50+[report]
51+exclude_lines =
52+ @abc.abstractmethod
53+ @abc.abstractproperty
54+ @abstractmethod
55+ @abstractproperty
56+ @public
57+ pragma: no cover
58+ raise NotImplementedError
59
60=== added file '.gitignore'
61--- .gitignore 1970-01-01 00:00:00 +0000
62+++ .gitignore 2014-03-20 14:51:45 +0000
63@@ -0,0 +1,24 @@
64+# Ignore all python3 bytecode data
65+__pycache__
66+# Ignore setuptools artifacts
67+build
68+dist
69+*.egg-info
70+# Ignore coverage artifacts
71+.coverage
72+htmlcov
73+# Ignore logs created by test-in-vagrant.sh
74+vagrant-logs
75+# Ignore vagrant state file
76+.vagrant
77+# The list below is riddled with junk created by running the test suite of checkbox
78+# It should be really cleaned up as tests should _not_ do that but right now it's more
79+# annoying than dangerous so I'll get rid of the noise first
80+*.o
81+# Attic where zygmunt puts random stuff
82+_attic
83+# Orig files from diffs and patches
84+*.orig
85+# Ignore stuff we get from somewhere else
86+support/external-tarballs
87+support/checkbox-packaging
88
89=== added file '.travis.yml'
90--- .travis.yml 1970-01-01 00:00:00 +0000
91+++ .travis.yml 2014-03-20 14:51:45 +0000
92@@ -0,0 +1,5 @@
93+language: python
94+python:
95+ - "3.2"
96+ - "3.3"
97+script: cd plainbox && python3 setup.py test
98
99=== added file 'Vagrantfile'
100--- Vagrantfile 1970-01-01 00:00:00 +0000
101+++ Vagrantfile 2014-03-20 14:51:45 +0000
102@@ -0,0 +1,57 @@
103+# -*- mode: ruby -*-
104+# vi: set ft=ruby sw=2 ts=2 :
105+
106+Vagrant::Config.run do |config|
107+
108+ config.ssh.timeout = 60
109+
110+ # Define a Ubuntu Server image (cloud) for the 12.04 release (precise)
111+ config.vm.define :precise do |precise_config|
112+ precise_config.vm.box = "precise-cloud-i386"
113+ precise_config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-i386-vagrant-disk1.box"
114+ end
115+
116+ # Define a Ubuntu Server image (cloud) for the 12.10 release (quantal)
117+ config.vm.define :quantal do |quantal_config|
118+ quantal_config.vm.box = "quantal-cloud-i386"
119+ quantal_config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/quantal/current/quantal-server-cloudimg-i386-vagrant-disk1.box"
120+ end
121+
122+ # Define a Ubuntu Server image (cloud) for the 13.04 release (raring)
123+ config.vm.define :raring do |raring_config|
124+ raring_config.vm.box = "raring-cloud-i386"
125+ raring_config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/raring/current/raring-server-cloudimg-i386-vagrant-disk1.box"
126+ end
127+
128+ # Define a Ubuntu Server image (cloud) for the 13.10 release (saucy)
129+ config.vm.define :saucy do |saucy_config|
130+ saucy_config.vm.box = "saucy-cloud-i386"
131+ saucy_config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/saucy/current/saucy-server-cloudimg-i386-vagrant-disk1.box"
132+ end
133+
134+ # Define a Ubuntu Server image (cloud) for the 14.04 release (trusty)
135+ config.vm.define :trusty do |trusty_config|
136+ trusty_config.vm.box = "trusty-cloud-i386"
137+ trusty_config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-i386-vagrant-disk1.box"
138+ end
139+
140+ # For debugging and later future GUI testing
141+ if ENV.key? "VAGRANT_GUI"
142+ config.vm.boot_mode = :gui
143+ end
144+
145+ if ENV.key? "VAGRANT_APT_CACHE"
146+ # Setup an apt cache if one is available and explicitly configured
147+ config.vm.provision :shell, :inline => "echo 'Acquire::http { Proxy \"#{ENV['VAGRANT_APT_CACHE']}\"; };' > /etc/apt/apt.conf"
148+ elsif File.exists? "/etc/apt-cacher-ng"
149+ # If apt-cacher-ng is installed on this machine then just use it.
150+ require 'socket'
151+ guessed_address = Socket.ip_address_list.detect{|intf| !intf.ipv4_loopback?}
152+ if guessed_address
153+ config.vm.provision :shell, :inline => "echo 'Acquire::http { Proxy \"http://#{guessed_address.ip_address}:3142\"; };' > /etc/apt/apt.conf"
154+ end
155+ end
156+
157+ # Provision everything using a standalone shell script
158+ config.vm.provision :shell, :path => "support/provision-vagrant"
159+end
160
161=== added directory 'checkbox-gui'
162=== added file 'checkbox-gui/README.rst'
163--- checkbox-gui/README.rst 1970-01-01 00:00:00 +0000
164+++ checkbox-gui/README.rst 2014-03-20 14:51:45 +0000
165@@ -0,0 +1,61 @@
166+Checkbox GUI
167+============
168+
169+Checkbox GUI is a Qt/QML GUI running over D-Bus to control Plainbox.
170+
171+Folder layout/structure
172+
173+gui-engine/ Contains the D-Bus framework and C++ plugin which represents
174+ plainbox classes/API
175+
176+checkbox-gui/ Contains the QML/Qt "skin" which is used to drive testing.
177+ There may be other "skins" created later...
178+
179+External Documentation Links
180+============================
181+
182+How to test and work with checkbox-gui code
183+======================================
184+To test checkbox-gui:
185+ Software Needed:
186+ QT Creator (2.7.0 or greater)
187+ Ubuntu.Components 0.1 - This is part of the Ubunutu distribution
188+ and gets updated
189+ How to install:
190+ Run the mk-venv script on the top level directory, this will add the
191+ required PPAs and install the needed packages.
192+ Optionally, to install manually:
193+ - sudo apt-add-repository ppa:ubuntu-sdk-team/ppa
194+ - sudo apt-add-repository ppa:canonical-qt5-edgers/qt5-proper
195+ - sudo apt-get update
196+ - sudo apt-get install qtcreator
197+ - sudo apt-get install ubuntu-sdk
198+ - sudo apt-get dist-upgrade
199+
200+*NEW*. Since the UI is now getting live data through dbus, a plainbox service is required:
201+
202+- Open a new terminal
203+- Change to the branch's top directory and run:
204+ $ mk-venv /tmp/plainbox-venv
205+- Activate the venv:
206+ $ . /tmp/plainbox-venv/bin/activate #Note the dot is significant
207+- Run plainbox in service mode:
208+ $ plainbox service
209+
210+
211+Once the required tools and dependencies are installed:
212+
213+1. Open QT Creator
214+2. File->Open Project->checkbox-gui.pro
215+3. Build->Run
216+4. Interact with the UI
217+
218+There seems to be a visual glitch when starting the UI (step 3). You may notice
219+that a "ghost" window opens, this looks like qt creator but it's a "mirror" or
220+bitmap of that window. This is the actual application window. To make it react,
221+simply try to move it around, or close it and restart it (the ghost window,
222+not qt creator itself). This bug has been reported and is being looked at.
223+
224+TBD
225+
226+
227
228=== added file 'checkbox-gui/TRANSLATIONS.rst'
229--- checkbox-gui/TRANSLATIONS.rst 1970-01-01 00:00:00 +0000
230+++ checkbox-gui/TRANSLATIONS.rst 2014-03-20 14:51:45 +0000
231@@ -0,0 +1,36 @@
232+Updating translations
233+=====================
234+
235+Translations for Checkbox GUI happen in `Launchpad Translations
236+<https://translations.launchpad.net/checkbox>`_ and
237+are automatically committed daily on the trunk branch in the po/ folder.
238+
239+They are then built and installed as part of the package build, so that
240+developers don't really need to worry about them.
241+
242+However, there is one task that needs to be taken care of: exposing new
243+translatable messages to translators. So whenever you add new translatable
244+messages in the code, make sure to follow these steps::
245+
246+ cd po
247+ make pot
248+
249+Then commit the updated .pot file with the rest of your merge request. Once
250+the branch lands Launchpad should take care of all the rest!
251+
252+Behind the scenes
253+=================
254+
255+Behind the scenes, whenever the .pot file (also known as translations template)
256+is committed to trunk Launchpad reads it and updates the translatable strings
257+exposed in the web UI. This will enable translators to work on the new strings.
258+The translations template contains all translatable strings that have been
259+extracted from the source code files.
260+
261+Launchpad will then store translations in its database and will commit them daily
262+in the form of textual .po files to trunk. The PO files are also usually
263+referred to as the translations files. You'll find a translation file for each
264+language the app has got at least a translated message available for.
265+
266+Translations follow the standard `gettext format
267+<https://www.gnu.org/software/gettext>`_.
268
269=== added directory 'checkbox-gui/checkbox-gui'
270=== added file 'checkbox-gui/checkbox-gui.pro'
271--- checkbox-gui/checkbox-gui.pro 1970-01-01 00:00:00 +0000
272+++ checkbox-gui/checkbox-gui.pro 2014-03-20 14:51:45 +0000
273@@ -0,0 +1,23 @@
274+# This file is part of checkbox-gui
275+#
276+# Copyright 2013 Canonical Ltd.
277+#
278+# Authors:
279+# - Andrew Haigh <andrew.haigh@cellsoftware.co.uk>
280+# Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
281+#
282+# This program is free software; you can redistribute it and/or modify
283+# it under the terms of the GNU General Public License as published by
284+# the Free Software Foundation; version 3.
285+#
286+# This program is distributed in the hope that it will be useful,
287+# but WITHOUT ANY WARRANTY; without even the implied warranty of
288+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
289+# GNU General Public License for more details.
290+#
291+# You should have received a copy of the GNU General Public License
292+# along with this program. If not, see <http://www.gnu.org/licenses/>.
293+
294+TEMPLATE = subdirs
295+SUBDIRS = gui-engine checkbox-gui test-gui-engine po
296+CONFIG = ordered
297
298=== added file 'checkbox-gui/checkbox-gui/README.rst'
299--- checkbox-gui/checkbox-gui/README.rst 1970-01-01 00:00:00 +0000
300+++ checkbox-gui/checkbox-gui/README.rst 2014-03-20 14:51:45 +0000
301@@ -0,0 +1,5 @@
302+checkbox-gui
303+===============
304+
305+This folder contains the Qml/Qt "skin" which represents the Checkbox workflow, and makes use of ../gui-engine to call Plainbox API's via D-Bus
306+
307
308=== added file 'checkbox-gui/checkbox-gui/WhiteListModelFactory.cpp'
309--- checkbox-gui/checkbox-gui/WhiteListModelFactory.cpp 1970-01-01 00:00:00 +0000
310+++ checkbox-gui/checkbox-gui/WhiteListModelFactory.cpp 2014-03-20 14:51:45 +0000
311@@ -0,0 +1,72 @@
312+/*
313+ * This file is part of Checkbox
314+ *
315+ * Copyright 2013 Canonical Ltd.
316+ *
317+ * Authors:
318+ * - Andrew Haigh <andrew.haigh@cellsoftware.co.uk>
319+ *
320+ * This program is free software; you can redistribute it and/or modify
321+ * it under the terms of the GNU General Public License as published by
322+ * the Free Software Foundation; version 3.
323+ *
324+ * This program is distributed in the hope that it will be useful,
325+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
326+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
327+ * GNU General Public License for more details.
328+ *
329+ * You should have received a copy of the GNU General Public License
330+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
331+ */
332+
333+#include "WhiteListModelFactory.h"
334+
335+ListModel* WhiteListModelFactory::CreateWhiteListModel(ListModel *model, const QString &filter)
336+{
337+ qDebug("WhiteListModelFactory::CreateWhiteListModel()");
338+
339+ // We can create OR update the model
340+ if (model==NULL) {
341+ qDebug("Creating fresh WhiteListItem");
342+ model = new ListModel(new WhiteListItem, qApp);
343+ if (model == NULL) {
344+ qDebug("Cannot allocate memory to our testitemmodel");
345+ }
346+
347+ } else {
348+ qDebug("Recreating TestItemModel");
349+ model->clear();
350+ }
351+
352+ const QString engname("");
353+
354+ GuiEngine* myengine = qApp->findChild<GuiEngine*>(engname);
355+ if(myengine == NULL) {
356+ qDebug("Cant find guiengine object");
357+
358+ // NB: Model will be empty at this point
359+ return model;
360+ }
361+
362+ QMap<QDBusObjectPath,QString> paths_and_names = \
363+ myengine->GetWhiteListPathsAndNames();
364+
365+ QMap<QDBusObjectPath,QString>::const_iterator iter = paths_and_names.begin();
366+
367+ QRegExp rx(filter);
368+
369+ while(iter != paths_and_names.end() ) {
370+ if (rx.exactMatch(iter.value())) {
371+ qDebug() << iter.key().path();
372+ qDebug() << " Name: " << iter.value();
373+ model->appendRow(new WhiteListItem(iter.value(), \
374+ iter.key().path(), \
375+ model));
376+ }
377+ iter++;
378+ }
379+
380+ qDebug("WhiteListModelFactory::CreateWhiteListModel() - Done");
381+
382+ return model;
383+}
384
385=== added file 'checkbox-gui/checkbox-gui/WhiteListModelFactory.h'
386--- checkbox-gui/checkbox-gui/WhiteListModelFactory.h 1970-01-01 00:00:00 +0000
387+++ checkbox-gui/checkbox-gui/WhiteListModelFactory.h 2014-03-20 14:51:45 +0000
388@@ -0,0 +1,42 @@
389+/*
390+ * This file is part of Checkbox
391+ *
392+ * Copyright 2013 Canonical Ltd.
393+ *
394+ * Authors:
395+ * - Andrew Haigh <andrew.haigh@cellsoftware.co.uk>
396+ *
397+ * This program is free software; you can redistribute it and/or modify
398+ * it under the terms of the GNU General Public License as published by
399+ * the Free Software Foundation; version 3.
400+ *
401+ * This program is distributed in the hope that it will be useful,
402+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
403+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
404+ * GNU General Public License for more details.
405+ *
406+ * You should have received a copy of the GNU General Public License
407+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
408+ */
409+
410+#ifndef WHITELISTMODELFACTORY_H
411+#define WHITELISTMODELFACTORY_H
412+
413+#include <QObject>
414+#include "whitelistitem.h"
415+#include "../gui-engine/gui-engine.h"
416+
417+// Factory class to create or update a TestItem Model
418+class WhiteListModelFactory : public QObject
419+{
420+ Q_OBJECT
421+
422+public:
423+ WhiteListModelFactory() {};
424+ ~WhiteListModelFactory() {};
425+
426+public slots:
427+ ListModel* CreateWhiteListModel(ListModel* model=NULL, const QString &filter=QString());
428+};
429+
430+#endif // WHITELISTMODELFACTORY_H
431
432=== added file 'checkbox-gui/checkbox-gui/checkbox-gui.desktop'
433--- checkbox-gui/checkbox-gui/checkbox-gui.desktop 1970-01-01 00:00:00 +0000
434+++ checkbox-gui/checkbox-gui/checkbox-gui.desktop 2014-03-20 14:51:45 +0000
435@@ -0,0 +1,12 @@
436+[Desktop Entry]
437+Name=System Testing
438+Comment=Test your systems compatibility with Ubuntu
439+Type=Application
440+Exec=checkbox-gui
441+Icon=checkbox
442+Categories=System;Qt;Application
443+Keywords=testing;drivers;hardware;
444+X-GNOME-Gettext-Domain=checkbox-gui
445+X-Ayatana-Appmenu-Show-Stubs=False
446+X-Ubuntu-Touch=true
447+X-Ubuntu-StageHint=SideStage
448
449=== added file 'checkbox-gui/checkbox-gui/checkbox-gui.pro'
450--- checkbox-gui/checkbox-gui/checkbox-gui.pro 1970-01-01 00:00:00 +0000
451+++ checkbox-gui/checkbox-gui/checkbox-gui.pro 2014-03-20 14:51:45 +0000
452@@ -0,0 +1,88 @@
453+# This file is part of Checkbox
454+#
455+# Copyright 2013 Canonical Ltd.
456+#
457+# Authors:
458+# - Andrew Haigh <andrew.haigh@cellsoftware.co.uk>
459+#
460+# This program is free software; you can redistribute it and/or modify
461+# it under the terms of the GNU General Public License as published by
462+# the Free Software Foundation; version 3.
463+#
464+# This program is distributed in the hope that it will be useful,
465+# but WITHOUT ANY WARRANTY; without even the implied warranty of
466+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
467+# GNU General Public License for more details.
468+#
469+# You should have received a copy of the GNU General Public License
470+# along with this program. If not, see <http://www.gnu.org/licenses/>.
471+#
472+
473+# Add more folders to ship with the application, here
474+folder_01.source = qml
475+folder_01.target = ../share/checkbox-gui
476+DEPLOYMENTFOLDERS = folder_01
477+
478+QT += dbus widgets
479+TARGET = checkbox-gui
480+TEMPLATE = app
481+
482+isEmpty(PREFIX) {
483+ PREFIX = /usr/local
484+}
485+
486+LIBS += -L../lib/$$TARGET/plugins/ -lgui-engine
487+
488+# Additional import path used to resolve QML modules
489+QMAKE_LFLAGS += '-Wl,-rpath,\'\$$ORIGIN/../lib/checkbox-gui/plugins\''
490+
491+SOURCES += main.cpp \
492+ whitelistitem.cpp \
493+ testitem.cpp \
494+ listmodel.cpp \
495+ testitemmodel.cpp \
496+ settings.cpp \
497+ WhiteListModelFactory.cpp
498+
499+# Please do not modify the following two lines. Required for deployment.
500+include(qtquick2applicationviewer/qtquick2applicationviewer.pri)
501+qtcAddDeployment()
502+
503+desktop.path = $$PREFIX/share/applications
504+desktop.files += checkbox-gui.desktop
505+
506+INSTALLS += desktop
507+
508+icons.path = $$PREFIX/share/icons/hicolor
509+icons.files += icons/*
510+
511+INSTALLS += icons
512+
513+HEADERS += whitelistitem.h \
514+ testitem.h \
515+ listmodel.h \
516+ testitemmodel.h \
517+ settings.h \
518+ WhiteListModelFactory.h
519+
520+target.path = $$PREFIX/bin
521+INSTALLS += target
522+
523+qml_files.path = $$PREFIX/share/checkbox-gui
524+qml_files.files = qml
525+
526+INSTALLS += qml_files
527+
528+OTHER_FILES += \
529+ qml/DummyListModel.qml \
530+ qml/TestSelectionButtons.qml \
531+ qml/TestSelectionView.qml \
532+ qml/TestSelectionListView.qml \
533+ qml/TestSelectionSuiteDelegate.qml \
534+ qml/TestSelectionTestDelegate.qml \
535+ qml/SuiteSelectionDelegate.qml \
536+ qml/SuiteSelectionView.qml \
537+ qml/RunManagerView.qml \
538+ qml/RunManagerSuiteDelegate.qml \
539+ qml/SubmissionDialog.qml \
540+ qml/checkbox-gui.qml
541
542=== added file 'checkbox-gui/checkbox-gui/listmodel.cpp'
543--- checkbox-gui/checkbox-gui/listmodel.cpp 1970-01-01 00:00:00 +0000
544+++ checkbox-gui/checkbox-gui/listmodel.cpp 2014-03-20 14:51:45 +0000
545@@ -0,0 +1,162 @@
546+/*
547+ * Author: Christophe Dumez <dchris@gmail.com>
548+ * License: Public domain (No attribution required)
549+ * Website: http://cdumez.blogspot.com/
550+ * Version: 1.0
551+ */
552+
553+#include <qdebug.h>
554+#include "listmodel.h"
555+
556+ListModel::ListModel(ListItem* prototype, QObject *parent) :
557+ QAbstractListModel(parent), m_prototype(prototype)
558+{
559+}
560+
561+int ListModel::rowCount(const QModelIndex &parent) const
562+{
563+ Q_UNUSED(parent);
564+ return m_list.size();
565+}
566+
567+QVariant ListModel::data(const QModelIndex &index, int role) const
568+{
569+ if(index.row() < 0 || index.row() >= m_list.size())
570+ return QVariant();
571+ return m_list.at(index.row())->data(role);
572+}
573+
574+bool ListModel::setData(const QModelIndex & index, const QVariant & value, int role){
575+ if(index.row() < 0 || index.row() >= m_list.size())
576+ return false;
577+ m_list.at(index.row())->setData(value, role);
578+ return true;
579+}
580+
581+Qt::ItemFlags ListModel::flags(const QModelIndex &index) const
582+{
583+ if (index.isValid())
584+ return (QAbstractListModel::flags(index)|Qt::ItemIsSelectable);
585+
586+ return QAbstractItemModel::flags(index) | Qt::ItemIsEditable;
587+}
588+
589+ListModel::~ListModel() {
590+ delete m_prototype;
591+ clear();
592+}
593+
594+void ListModel::appendRow(ListItem *item)
595+{
596+ appendRows(QList<ListItem*>() << item);
597+}
598+
599+void ListModel::appendRows(const QList<ListItem *> &items)
600+{
601+ beginInsertRows(QModelIndex(), rowCount(), rowCount()+items.size()-1);
602+ foreach(ListItem *item, items) {
603+ connect(item, SIGNAL(dataChanged()), SLOT(handleItemChange()));
604+ m_list.append(item);
605+ }
606+ endInsertRows();
607+}
608+
609+void ListModel::insertRow(int row, ListItem *item)
610+{
611+ beginInsertRows(QModelIndex(), row, row);
612+ connect(item, SIGNAL(dataChanged()), SLOT(handleItemChange()));
613+ m_list.insert(row, item);
614+ endInsertRows();
615+}
616+
617+void ListModel::handleItemChange()
618+{
619+ ListItem* item = static_cast<ListItem*>(sender());
620+ QModelIndex index = indexFromItem(item);
621+ if(index.isValid())
622+ emit dataChanged(index, index);
623+
624+}
625+
626+ListItem * ListModel::find(const QString &id) const
627+{
628+ foreach(ListItem* item, m_list) {
629+ if(item->id() == id) return item;
630+ }
631+ return 0;
632+}
633+
634+QModelIndex ListModel::indexFromItem(const ListItem *item) const
635+{
636+ Q_ASSERT(item);
637+ for(int row=0; row<m_list.size(); ++row) {
638+ if(m_list.at(row) == item) return index(row);
639+ }
640+ return QModelIndex();
641+}
642+
643+void ListModel::clear()
644+{
645+ qDeleteAll(m_list);
646+ m_list.clear();
647+}
648+
649+bool ListModel::removeRow(int row, const QModelIndex &parent)
650+{
651+ Q_UNUSED(parent);
652+ if(row < 0 || row >= m_list.size()) return false;
653+ beginRemoveRows(QModelIndex(), row, row);
654+ delete m_list.takeAt(row);
655+ endRemoveRows();
656+ return true;
657+}
658+
659+bool ListModel::removeRows(int row, int count, const QModelIndex &parent)
660+{
661+ Q_UNUSED(parent);
662+ if(row < 0 || (row+count) >= m_list.size()) return false;
663+ beginRemoveRows(QModelIndex(), row, row+count-1);
664+ for(int i=0; i<count; ++i) {
665+ delete m_list.takeAt(row);
666+ }
667+ endRemoveRows();
668+ return true;
669+}
670+
671+ListItem * ListModel::takeRow(int row)
672+{
673+ beginRemoveRows(QModelIndex(), row, row);
674+ ListItem* item = m_list.takeAt(row);
675+ endRemoveRows();
676+ return item;
677+}
678+
679+QHash<int, QByteArray> ListModel::roleNames() const{
680+ return m_prototype->roleNames();
681+}
682+
683+QVariant ListModel::get(int row)
684+{
685+ ListItem * item = m_list.at(row);
686+ QMap<QString, QVariant> itemData;
687+ QHashIterator<int, QByteArray> hashItr(item->roleNames());
688+ while(hashItr.hasNext()){
689+ hashItr.next();
690+ itemData.insert(hashItr.value(),item->data(hashItr.key()).toString());
691+ }
692+
693+ return QVariant(itemData);
694+}
695+
696+void ListModel::setProperty(int idx, const QString& property, const QVariant& value)
697+{
698+ if (rowCount() == 0 || idx >= rowCount() || idx < 0) {
699+ return;
700+ }
701+
702+ QHashIterator<int, QByteArray> hashItr(roleNames());
703+
704+ if ( hashItr.findNext(property.toUtf8()) ){
705+ m_list[idx]->setData(value, hashItr.key());
706+ }
707+}
708
709=== added file 'checkbox-gui/checkbox-gui/listmodel.h'
710--- checkbox-gui/checkbox-gui/listmodel.h 1970-01-01 00:00:00 +0000
711+++ checkbox-gui/checkbox-gui/listmodel.h 2014-03-20 14:51:45 +0000
712@@ -0,0 +1,78 @@
713+/*
714+ * Author: Christophe Dumez <dchris@gmail.com>
715+ * License: Public domain (No attribution required)
716+ * Website: http://cdumez.blogspot.com/
717+ * Version: 1.0
718+ */
719+
720+#ifndef LISTMODEL_H
721+#define LISTMODEL_H
722+
723+#include <QAbstractListModel>
724+#include <QList>
725+#include <QVariant>
726+
727+class ListItem: public QObject {
728+ Q_OBJECT
729+
730+public:
731+ ListItem(QObject* parent = 0) : QObject(parent) {}
732+ virtual ~ListItem() {}
733+ virtual QString id() const = 0;
734+ virtual QVariant data(int role) const = 0;
735+ virtual void setData(const QVariant & value, int role) = 0;
736+ virtual QHash<int, QByteArray> roleNames() const = 0;
737+
738+
739+signals:
740+ void dataChanged();
741+};
742+
743+class ListModel : public QAbstractListModel
744+{
745+ Q_OBJECT
746+ Q_PROPERTY( int count READ getCount() NOTIFY countChanged())
747+
748+signals:
749+ void countChanged();
750+
751+
752+public:
753+ explicit ListModel(ListItem* prototype, QObject* parent = 0);
754+ ~ListModel();
755+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
756+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
757+
758+ bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole);
759+ Qt::ItemFlags flags(const QModelIndex &index) const;
760+
761+ int getCount() { this->count = this->rowCount(); return count; }
762+
763+ Q_INVOKABLE QVariant get(int row);
764+ Q_INVOKABLE void setProperty(int index, const QString& property, const QVariant& value);
765+
766+
767+ void appendRow(ListItem* item);
768+ void appendRows(const QList<ListItem*> &items);
769+ void insertRow(int row, ListItem* item);
770+ bool removeRow(int row, const QModelIndex &parent = QModelIndex());
771+ bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex());
772+ ListItem* takeRow(int row);
773+ ListItem* find(const QString &id) const;
774+ QModelIndex indexFromItem( const ListItem* item) const;
775+ void clear();
776+
777+protected:
778+ QHash<int, QByteArray> roleNames() const;
779+
780+
781+private slots:
782+ void handleItemChange();
783+
784+protected:
785+ ListItem* m_prototype;
786+ QList<ListItem*> m_list;
787+ int count;
788+};
789+
790+#endif // LISTMODEL_H
791
792=== added file 'checkbox-gui/checkbox-gui/main.cpp'
793--- checkbox-gui/checkbox-gui/main.cpp 1970-01-01 00:00:00 +0000
794+++ checkbox-gui/checkbox-gui/main.cpp 2014-03-20 14:51:45 +0000
795@@ -0,0 +1,136 @@
796+/*
797+ * This file is part of Checkbox
798+ *
799+ * Copyright 2013 Canonical Ltd.
800+ *
801+ * Authors:
802+ * - Andrew Haigh <andrew.haigh@cellsoftware.co.uk>
803+ *
804+ * This program is free software; you can redistribute it and/or modify
805+ * it under the terms of the GNU General Public License as published by
806+ * the Free Software Foundation; version 3.
807+ *
808+ * This program is distributed in the hope that it will be useful,
809+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
810+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
811+ * GNU General Public License for more details.
812+ *
813+ * You should have received a copy of the GNU General Public License
814+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
815+ */
816+
817+#include <QtWidgets/QApplication>
818+#include <QtGui/QGuiApplication>
819+#include <QCoreApplication>
820+#include <QPluginLoader>
821+#include <QQmlExtensionPlugin>
822+#include <QDir>
823+#include <QtQml>
824+
825+#include "qtquick2applicationviewer.h"
826+#include "listmodel.h"
827+#include "whitelistitem.h"
828+#include "settings.h"
829+#include "testitem.h"
830+#include "testitemmodel.h"
831+#include "WhiteListModelFactory.h"
832+
833+#include "../gui-engine/gui-engine.h"
834+
835+int main(int argc, char *argv[])
836+{
837+ QApplication app(argc, argv);
838+ QByteArray applicationName;
839+ applicationName = QFileInfo(QCoreApplication::applicationFilePath()).fileName().toUtf8();
840+ qputenv("APP_ID", applicationName);
841+
842+ qmlRegisterType<WhiteListItem>("Ubuntu.Checkbox", 0, 1, "WhiteListItem");
843+ qmlRegisterType<TestItem>("Ubuntu.Checkbox", 0, 1, "TestItem");
844+
845+ QtQuick2ApplicationViewer viewer;
846+
847+ // Create our GuiEngine and hang it on QGuiApplication
848+ GuiEngine guiengine((QObject*)&app);
849+
850+ // Register the applicationName with the QML runtime
851+ viewer.rootContext()->setContextProperty("applicationName", applicationName);
852+
853+ // Register the GuiEngine with the QML runtime
854+ viewer.rootContext()->setContextProperty("guiEngine", &guiengine);
855+
856+ // Initialise - connect to Plainbox
857+ guiengine.Initialise();
858+
859+ Settings* settings;
860+ settings = new Settings();
861+ if (app.arguments().size() > 1) {
862+ settings = new Settings(app.arguments().at(1));
863+ }
864+ viewer.rootContext()->setContextProperty("settings", settings);
865+
866+ WhiteListModelFactory whitelistfactory;
867+
868+ /* We need a placeholder object here or the QML integration is unhappy
869+ * that this isnt a recognisable Qt object.
870+ */
871+ ListModel* whitelistmodel = new ListModel(new WhiteListItem, qApp);
872+ if (!whitelistmodel) {
873+ // Essentially we are likely out of memory here
874+ qDebug("Cannot create whitelist model");
875+ exit(1);
876+ }
877+
878+ whitelistfactory.CreateWhiteListModel(whitelistmodel, settings->value("suite/whitelist_filter", ".*"));
879+
880+ viewer.rootContext()->setContextProperty("whiteListModel", whitelistmodel);
881+
882+ // Test Item Model Factory and placeholder model registered with QML engine
883+ TestItemModel testitemFactory;
884+ viewer.rootContext()->setContextProperty("testitemFactory",&testitemFactory);
885+
886+ /* We need a placeholder object here or the QML integration is unhappy
887+ * that this isnt a recognisable Qt object.
888+ */
889+ ListModel* testlistmodel = new ListModel(new TestItem, qApp); //CreateTestListModel();
890+ if (!testlistmodel) {
891+ // Essentially we are likely out of memory here
892+ qDebug("Cannot create testlist model");
893+ exit(1);
894+ }
895+
896+ viewer.rootContext()->setContextProperty("testListModel", testlistmodel);
897+
898+ // In the beginning, lets see if we need to resume
899+ bool resumeSession = false;
900+
901+ QString previous = guiengine.GuiPreviousSessionFile();
902+ if ( previous.isEmpty() ) {
903+ // Show the Welcome screen
904+ } else {
905+ // show the resume screen
906+ qDebug() << "Resume session file : " << previous;
907+
908+ resumeSession = true;
909+ }
910+
911+ viewer.rootContext()->setContextProperty("resumePreviousSession",resumeSession);
912+
913+
914+
915+ // Now, load the main page
916+ viewer.setMainQmlFile(QStringLiteral("../share/checkbox-gui/qml/checkbox-gui.qml"));
917+
918+ viewer.setTitle(settings->value("welcome/title", app.tr("System Testing")));
919+
920+ // Ensure a reasonable minimum size for this window
921+ viewer.setMinimumSize(QSize(800,600));
922+
923+ viewer.showExpanded();
924+
925+ int errcode = app.exec();
926+
927+ // Shutdown the guiengine
928+ guiengine.Shutdown();
929+
930+ return errcode;
931+}
932
933=== added directory 'checkbox-gui/checkbox-gui/qml'
934=== added file 'checkbox-gui/checkbox-gui/qml/DemoWarnings.qml'
935--- checkbox-gui/checkbox-gui/qml/DemoWarnings.qml 1970-01-01 00:00:00 +0000
936+++ checkbox-gui/checkbox-gui/qml/DemoWarnings.qml 2014-03-20 14:51:45 +0000
937@@ -0,0 +1,112 @@
938+/*
939+ * This file is part of Checkbox
940+ *
941+ * Copyright 2013 Canonical Ltd.
942+ *
943+ * Authors:
944+ * - Julia Segal <julia.segal@cellsoftware.co.uk>
945+ *
946+ * This program is free software; you can redistribute it and/or modify
947+ * it under the terms of the GNU General Public License as published by
948+ * the Free Software Foundation; version 3.
949+ *
950+ * This program is distributed in the hope that it will be useful,
951+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
952+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
953+ * GNU General Public License for more details.
954+ *
955+ * You should have received a copy of the GNU General Public License
956+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
957+ */
958+
959+
960+import QtQuick 2.0
961+import Ubuntu.Components 0.1
962+import Ubuntu.Components.Popups 0.1
963+
964+Page {
965+ title: "Warning Demo (not a production screen)"
966+
967+
968+ Component {
969+ id: warning_dialog
970+ WarningDialog{
971+ text: i18n.tr("What you are about to do will take a long time. Are you sure you want to continue?")
972+ showOK: true
973+ showContinue: false
974+ showCheckbox: true
975+
976+ onCont: {
977+ checkIfChecked();
978+ console.log("continue clicked");
979+ }
980+
981+ onCancel: {
982+ checkIfChecked();
983+ console.log("cancel clicked");
984+ }
985+
986+ function checkIfChecked(){
987+ if (isChecked)
988+ console.log("do not warn again!");
989+ else
990+ console.log("warn again");
991+ }
992+
993+ }
994+ }
995+
996+
997+
998+ Row {
999+ visible: true
1000+ spacing: units.gu(6)
1001+ anchors.horizontalCenter: parent.horizontalCenter
1002+ anchors.top: parent.top
1003+ anchors.topMargin: units.gu(2)
1004+ Button {
1005+ id: warning_button
1006+ color: "yellow"
1007+ text: "warning..."
1008+ width: units.gu(25)
1009+ onClicked:{
1010+ PopupUtils.open(warning_dialog, warning_button);
1011+ }
1012+ }
1013+
1014+
1015+ Button {
1016+ color: "pink"
1017+ text: "failed..."
1018+ width: units.gu(25)
1019+ onClicked:{
1020+ var warningDlg = Qt.createComponent("WarningDialog.qml");
1021+ if (warningDlg.status == Component.Ready) {
1022+ var warningObj = warningDlg.createObject(parent, {"title": "Failed!",
1023+ "text": "Oh man!",
1024+ "showOK": true,
1025+ "showContinue": false,
1026+ "showCancel": false,
1027+ "showCheckbox" :true
1028+ });
1029+ warningObj.show();
1030+
1031+ // need call this when object is closed (not sure how yet)
1032+ if (warningObj.isChecked)
1033+ console.log("do not warn again!");
1034+ else
1035+ console.log("warn AGAIN!")
1036+ }
1037+ }
1038+ }
1039+ }
1040+
1041+ Button {
1042+ anchors.centerIn: parent
1043+ text: i18n.tr("Move on to the Welcome Screen")
1044+ color: UbuntuColors.lightAubergine
1045+ width: units.gu(30)
1046+ onClicked: {mainView.state = "WELCOME"}
1047+ }
1048+}
1049+
1050
1051=== added file 'checkbox-gui/checkbox-gui/qml/DummyListModel.qml'
1052--- checkbox-gui/checkbox-gui/qml/DummyListModel.qml 1970-01-01 00:00:00 +0000
1053+++ checkbox-gui/checkbox-gui/qml/DummyListModel.qml 2014-03-20 14:51:45 +0000
1054@@ -0,0 +1,45 @@
1055+/*
1056+ * This file is part of Checkbox
1057+ *
1058+ * Copyright 2013 Canonical Ltd.
1059+ *
1060+ * Authors:
1061+ * - Julia Segal <julia.segal@cellsoftware.co.uk>
1062+ *
1063+ * This program is free software; you can redistribute it and/or modify
1064+ * it under the terms of the GNU General Public License as published by
1065+ * the Free Software Foundation; version 3.
1066+ *
1067+ * This program is distributed in the hope that it will be useful,
1068+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1069+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1070+ * GNU General Public License for more details.
1071+ *
1072+ * You should have received a copy of the GNU General Public License
1073+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1074+ */
1075+
1076+import QtQuick 2.0
1077+import Ubuntu.Components 0.1
1078+import Ubuntu.Checkbox 0.1
1079+
1080+
1081+ListModel {
1082+ id: testSuiteModel
1083+
1084+ ListElement { name: "Orange"; type: "Fruit"}
1085+ ListElement { name: "Apple"; type: "Fruit" }
1086+ ListElement { name: "Tomato"; type: "Fruit" }
1087+ ListElement { name: "Banana"; type: "Fruit"}
1088+ ListElement { name: "Cherry"; type: "Fruit" }
1089+ ListElement { name: "Apricot"; type: "Fruit" }
1090+ ListElement { name: "Potato"; type: "Vegetable" }
1091+ ListElement { name: "Carrot"; type: "Vegetable" }
1092+ ListElement { name: "Celery"; type: "Vegetable" }
1093+ ListElement { name: "Cucumber"; type: "Vegetable" }
1094+ ListElement { name: "Pepper"; type: "Vegetable" }
1095+ ListElement { name: "Onion"; type: "Vegetable" }
1096+
1097+
1098+
1099+}
1100
1101=== added file 'checkbox-gui/checkbox-gui/qml/LogViewer.qml'
1102--- checkbox-gui/checkbox-gui/qml/LogViewer.qml 1970-01-01 00:00:00 +0000
1103+++ checkbox-gui/checkbox-gui/qml/LogViewer.qml 2014-03-20 14:51:45 +0000
1104@@ -0,0 +1,87 @@
1105+/*
1106+ * This file is part of Checkbox
1107+ *
1108+ * Copyright 2013 Canonical Ltd.
1109+ *
1110+ * Authors:
1111+ * - Julia Segal <julia.segal@cellsoftware.co.uk>
1112+ * - Sylvain Pineau <sylvain.pineau@canonical.com>
1113+ *
1114+ * This program is free software; you can redistribute it and/or modify
1115+ * it under the terms of the GNU General Public License as published by
1116+ * the Free Software Foundation; version 3.
1117+ *
1118+ * This program is distributed in the hope that it will be useful,
1119+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1120+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1121+ * GNU General Public License for more details.
1122+ *
1123+ * You should have received a copy of the GNU General Public License
1124+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1125+ */
1126+
1127+
1128+import QtQuick 2.0
1129+import Ubuntu.Components 0.1
1130+import Ubuntu.Components.Popups 0.1
1131+
1132+WideDialog {
1133+ id: logview
1134+ title: "Not Set"
1135+ property string jobPath: "Not Set"
1136+ Rectangle {
1137+ color: "black"
1138+ radius: units.gu(1)
1139+ anchors {
1140+ left: parent.left
1141+ right: parent.right
1142+ top: parent.top
1143+ bottom: backButton.top
1144+ topMargin: units.gu(5)
1145+ bottomMargin: units.gu(2)
1146+ }
1147+
1148+ Item {
1149+ id: logitem
1150+ anchors.margins: units.gu(1)
1151+ anchors.fill: parent
1152+
1153+ Flickable {
1154+ id: flickable
1155+ width: parent.width
1156+ height: parent.height
1157+ contentWidth: logtext.width
1158+ contentHeight: logtext.height
1159+ flickableDirection: Flickable.VerticalFlick
1160+ clip: true
1161+
1162+ TextEdit {
1163+ id: logtext
1164+ width:logitem.width
1165+ selectionColor: Theme.palette.selected.background
1166+ color: Qt.rgba(1, 1, 1, 0.9)
1167+ wrapMode: Text.Wrap
1168+ text: "<code>Unable to load IO log</code>"
1169+ readOnly: true
1170+ selectByMouse: true
1171+ textFormat: TextEdit.RichText
1172+
1173+ Component.onCompleted: {
1174+ // get the log info from guiengine
1175+ text = "<code>" + guiEngine.GetIOLog(jobPath) + "</code>";
1176+ }
1177+ }
1178+ }
1179+ Scrollbar {
1180+ flickableItem: flickable
1181+ align: Qt.AlignTrailing
1182+ }
1183+ }
1184+ }
1185+ Button {
1186+ id: backButton
1187+ text: "Back"
1188+ onClicked: PopupUtils.close(logview)
1189+ anchors.bottom: parent.bottom
1190+ }
1191+}
1192
1193=== added file 'checkbox-gui/checkbox-gui/qml/ManualInteractionDialog.qml'
1194--- checkbox-gui/checkbox-gui/qml/ManualInteractionDialog.qml 1970-01-01 00:00:00 +0000
1195+++ checkbox-gui/checkbox-gui/qml/ManualInteractionDialog.qml 2014-03-20 14:51:45 +0000
1196@@ -0,0 +1,245 @@
1197+/*
1198+ * This file is part of Checkbox
1199+ *
1200+ * Copyright 2013 Canonical Ltd.
1201+ *
1202+ * Authors:
1203+ * - Julia Segal <julia.segal@cellsoftware.co.uk>
1204+ *
1205+ * This program is free software; you can redistribute it and/or modify
1206+ * it under the terms of the GNU General Public License as published by
1207+ * the Free Software Foundation; version 3.
1208+ *
1209+ * This program is distributed in the hope that it will be useful,
1210+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1211+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1212+ * GNU General Public License for more details.
1213+ *
1214+ * You should have received a copy of the GNU General Public License
1215+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1216+ */
1217+
1218+
1219+import QtQuick 2.0
1220+import Ubuntu.Components 0.1
1221+import Ubuntu.Components.Popups 0.1
1222+
1223+/* TODO - Default Yes/No/Skip based on plainbox interpretation of result
1224+ * which the user can then change if they wish.
1225+ */
1226+Dialog {
1227+ id: dialog
1228+
1229+ property var testItem;
1230+ /* Manual jobs may define a shell command as part of the test procedure.
1231+ * When such command exists, the following property is set, enabling
1232+ * the corresponding "Test" button. Otherwise it's greyed out.
1233+ */
1234+ property var showTestButton;
1235+ property var testStatus;
1236+
1237+ title: i18n.tr("Manual Test")
1238+ text: testItem.testname//i18n.tr("Name of the Test.")
1239+
1240+ ActivityIndicator {
1241+ id: manual_interaction_activity
1242+
1243+ anchors.horizontalCenter: instructions.horizontalCenter
1244+
1245+ running: false
1246+ }
1247+
1248+ TextArea{
1249+ id: instructions
1250+ text: testItem.description//"This is where we put our instructions\n2- This is 1\n3 -This is where we put our instructions\n4- This is where we put our instructions\n5 -where we put our instructions\n"
1251+ Text { font.family: "Helvetica"; font.pointSize: 13; font.bold: true }
1252+ color: "black"
1253+ readOnly: true
1254+ activeFocusOnPress: false
1255+ highlighted: true
1256+ selectionColor: "black"
1257+ selectedTextColor: "white"
1258+ height: units.gu(24)
1259+ cursorVisible: false
1260+ cursorDelegate: Item { id: emptycursor }
1261+ }
1262+
1263+ Button {
1264+ id: manualtestbutton
1265+ text: i18n.tr("Test")
1266+ color: UbuntuColors.orange
1267+ enabled: showTestButton ? true : false
1268+ onClicked: {
1269+ /* So the user knows this is happening, grey the buttons until
1270+ * we get a reply.
1271+ */
1272+ manualtestbutton.enabled = false;
1273+ continuebutton.enabled = false;
1274+ yescheck.enabled = false;
1275+ nocheck.enabled = false;
1276+ skipcheck.enabled = false;
1277+
1278+ manual_interaction_activity.running = true;
1279+
1280+ // Ok, run this test. Result and comments dont matter here
1281+ guiEngine.ResumeFromManualInteractionDialog(true,"fail","no comment")
1282+ }
1283+ }
1284+
1285+ Row {
1286+ spacing: units.gu(8)
1287+ CheckBox {
1288+ id: yescheck
1289+ text: i18n.tr("Yes")
1290+ checked: testStatus === 2 /* PBJobResult_Pass */ ? true : false
1291+ onClicked: {
1292+ if (checked){
1293+ nocheck.checked = !checked
1294+ skipcheck.checked = !checked
1295+ }
1296+ else
1297+ checked = true;
1298+ }
1299+ Label{
1300+ anchors.left: yescheck.right
1301+ anchors.verticalCenter: parent.verticalCenter
1302+ anchors.leftMargin: units.gu(1)
1303+ text: i18n.tr("Yes")
1304+ }
1305+ }
1306+
1307+ CheckBox {
1308+ id: nocheck
1309+ text: i18n.tr("No")
1310+ checked: testStatus === 3 /* PBJobResult_Fail */ ? true : false
1311+ onClicked: {
1312+ if (checked){
1313+ yescheck.checked = !checked
1314+ skipcheck.checked = !checked
1315+ }
1316+ else
1317+ checked = true;
1318+ }
1319+ Label{
1320+ anchors.left: nocheck.right
1321+ anchors.verticalCenter: parent.verticalCenter
1322+ anchors.leftMargin: units.gu(1)
1323+ text: i18n.tr("No")
1324+ }
1325+ }
1326+
1327+ CheckBox {
1328+ id: skipcheck
1329+ text: i18n.tr("Skip")
1330+ checked: testStatus === 1 /* PBJobResult_Skip */ ? true : false
1331+ onClicked: {
1332+ if (checked){
1333+ nocheck.checked = !checked
1334+ yescheck.checked = !checked
1335+ }
1336+ else
1337+ checked = true;
1338+ }
1339+ Label{
1340+ anchors.left: skipcheck.right
1341+ anchors.verticalCenter: parent.verticalCenter
1342+ anchors.leftMargin: units.gu(1)
1343+ text: i18n.tr("Skip")
1344+ }
1345+ }
1346+ }
1347+
1348+
1349+ Column {
1350+ Label{
1351+ text: i18n.tr("Comments")
1352+ }
1353+
1354+ TextArea {
1355+ id: comments
1356+ text: ""
1357+ }
1358+ }
1359+
1360+
1361+
1362+
1363+ Button {
1364+ id: continuebutton
1365+ text: i18n.tr("Continue")
1366+ color: UbuntuColors.warmGrey
1367+ onClicked: {
1368+ if (skipcheck.checked && comments.text === "")
1369+ {
1370+ PopupUtils.open(skip_warning_dialog, continuebutton);
1371+ }
1372+ else {
1373+ // Ok, we can continue
1374+
1375+ // Get the right outcome...
1376+ if (yescheck.checked) {
1377+ // Pass
1378+ guiEngine.ResumeFromManualInteractionDialog(false,"pass",comments.text)
1379+ } else if (nocheck.checked) {
1380+ // Fail
1381+ guiEngine.ResumeFromManualInteractionDialog(false,"fail",comments.text)
1382+ } else if (skipcheck.checked) {
1383+ // Fail
1384+ guiEngine.ResumeFromManualInteractionDialog(false,"skip",comments.text)
1385+ }
1386+
1387+ PopupUtils.close(dialog)
1388+ }
1389+ }
1390+ }
1391+
1392+
1393+
1394+ Component {
1395+ id: skip_warning_dialog
1396+ WarningDialog{
1397+ text: i18n.tr("Skipping a test requires a reason to be entered in the Comments field. Please update that field and click 'Continue' again.");
1398+
1399+ showCancel: false
1400+ showContinue: false
1401+ showCheckbox: false
1402+
1403+ onOk: {
1404+ }
1405+ }
1406+ }
1407+
1408+ Connections {
1409+ id: manual_interaction_connections
1410+ target: guiEngine
1411+ onUpdateManualInteractionDialog: {
1412+ // Remove the activity indicator
1413+ manual_interaction_activity.running = false;
1414+
1415+ // Re-enable these buttons as the test has completed
1416+ if (show_test) {
1417+ manualtestbutton.enabled = true;
1418+ } else {
1419+ manualtestbutton.enabled = false;
1420+ }
1421+ continuebutton.enabled = true;
1422+ yescheck.enabled = true;
1423+ nocheck.enabled = true;
1424+ skipcheck.enabled = true;
1425+
1426+ // Outcome values refer to PBJobResult enums
1427+ if (suggested_outcome === 2 /* PBJobResult_Pass */) {
1428+ yescheck.checked = true;
1429+ nocheck.checked = false;
1430+ skipcheck.checked = false; // we didnt skip it
1431+ } else {
1432+ yescheck.checked = false;
1433+ nocheck.checked = true;
1434+ skipcheck.checked = false; // we didnt skip it
1435+ }
1436+ }
1437+ onCloseManualInteractionDialog: {
1438+ PopupUtils.close(dialog)
1439+ }
1440+ }
1441+}
1442
1443=== added file 'checkbox-gui/checkbox-gui/qml/Progress.qml'
1444--- checkbox-gui/checkbox-gui/qml/Progress.qml 1970-01-01 00:00:00 +0000
1445+++ checkbox-gui/checkbox-gui/qml/Progress.qml 2014-03-20 14:51:45 +0000
1446@@ -0,0 +1,48 @@
1447+/*
1448+ * This file is part of Checkbox
1449+ *
1450+ * Copyright 2013 Canonical Ltd.
1451+ *
1452+ * Authors:
1453+ * - Julia Segal <julia.segal@cellsoftware.co.uk>
1454+ *
1455+ * This program is free software; you can redistribute it and/or modify
1456+ * it under the terms of the GNU General Public License as published by
1457+ * the Free Software Foundation; version 3.
1458+ *
1459+ * This program is distributed in the hope that it will be useful,
1460+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1461+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1462+ * GNU General Public License for more details.
1463+ *
1464+ * You should have received a copy of the GNU General Public License
1465+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1466+ */
1467+
1468+
1469+import QtQuick 2.0
1470+import Ubuntu.Components 0.1
1471+
1472+Item {
1473+ property alias title: progresslabel.text
1474+ property alias value: progressbar.value
1475+ property alias maxValue: progressbar.maximumValue
1476+
1477+ Label {
1478+ id: progresslabel
1479+ text: ""
1480+ anchors.left: parent.left
1481+ }
1482+
1483+ ProgressBar {
1484+ id: progressbar
1485+ width: parent.width
1486+ anchors.top: progresslabel.bottom
1487+ anchors.topMargin: units.gu(1)
1488+ indeterminate: false
1489+ minimumValue: 0
1490+ maximumValue: 100
1491+ value: 0
1492+ anchors.left: parent.left
1493+ }
1494+}
1495
1496=== added file 'checkbox-gui/checkbox-gui/qml/ResumeView.qml'
1497--- checkbox-gui/checkbox-gui/qml/ResumeView.qml 1970-01-01 00:00:00 +0000
1498+++ checkbox-gui/checkbox-gui/qml/ResumeView.qml 2014-03-20 14:51:45 +0000
1499@@ -0,0 +1,115 @@
1500+/*
1501+ * This file is part of Checkbox
1502+ *
1503+ * Copyright 2013 Canonical Ltd.
1504+ *
1505+ * Authors:
1506+ * - Julia Segal <julia.segal@cellsoftware.co.uk>
1507+ *
1508+ * This program is free software; you can redistribute it and/or modify
1509+ * it under the terms of the GNU General Public License as published by
1510+ * the Free Software Foundation; version 3.
1511+ *
1512+ * This program is distributed in the hope that it will be useful,
1513+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1514+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1515+ * GNU General Public License for more details.
1516+ *
1517+ * You should have received a copy of the GNU General Public License
1518+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1519+ */
1520+
1521+
1522+import QtQuick 2.0
1523+import Ubuntu.Components 0.1
1524+
1525+
1526+Page {
1527+ title: i18n.tr("Resume")
1528+
1529+ tools: ToolbarItems {
1530+ locked: true
1531+ opened: false
1532+ }
1533+
1534+ Text {
1535+ id: querylabel
1536+ width: parent.width - units.gu(40)
1537+ wrapMode: Text.Wrap
1538+ anchors {
1539+ horizontalCenter: parent.horizontalCenter
1540+ top: parent.top
1541+ topMargin: units.gu(10)
1542+ }
1543+
1544+ text: "Checkbox did not finish completely. \nDo you want to rerun the last test, \ncontinue to the next test, \nor restart from the begining?"
1545+ color: "black"
1546+ horizontalAlignment: Text.AlignHCenter
1547+ font.pointSize: 20
1548+ }
1549+
1550+ Column {
1551+ id: buttoncol
1552+ spacing: units.gu(6)
1553+ anchors {
1554+ top: querylabel.bottom
1555+ topMargin: units.gu(12)
1556+ horizontalCenter: parent.horizontalCenter
1557+ }
1558+ property int buttonWidth: parent.width - units.gu(40)
1559+
1560+
1561+ Button {
1562+ id: rerunButton
1563+ text: i18n.tr("Rerun last test")
1564+ width: buttoncol.buttonWidth
1565+ color: UbuntuColors.orange
1566+ onClicked: {
1567+
1568+ // Prepare for the run
1569+ guiEngine.GuiResumeSession(true /* re-run last test */);
1570+
1571+ // We need this to show the list of stuff
1572+ testitemFactory.CreateTestListModel(testListModel);
1573+
1574+ mainView.state = "RUNMANAGER"
1575+ }
1576+ }
1577+
1578+ Button {
1579+ id: continueButton
1580+ text: i18n.tr("Continue")
1581+ width: buttoncol.buttonWidth
1582+ color: UbuntuColors.lightAubergine
1583+ onClicked: {
1584+
1585+
1586+ // Prepare for the run
1587+ guiEngine.GuiResumeSession(false /* re-run last test */);
1588+
1589+ // We need this to show the list of stuff
1590+ testitemFactory.CreateTestListModel(testListModel);
1591+
1592+ mainView.state = "RUNMANAGER"
1593+ }
1594+ }
1595+
1596+ Button {
1597+ id: restartButton
1598+ text: i18n.tr("Restart")
1599+ width: buttoncol.buttonWidth
1600+ color: UbuntuColors.warmGrey
1601+ onClicked: {
1602+
1603+ // Lets clean up the old session
1604+ guiEngine.GuiSessionRemove();
1605+
1606+ // And create a fresh one
1607+ guiEngine.GuiCreateSession();
1608+
1609+ mainView.state = "WELCOME"
1610+ }
1611+ }
1612+ }
1613+
1614+}
1615
1616=== added file 'checkbox-gui/checkbox-gui/qml/RunManagerButtons.qml'
1617--- checkbox-gui/checkbox-gui/qml/RunManagerButtons.qml 1970-01-01 00:00:00 +0000
1618+++ checkbox-gui/checkbox-gui/qml/RunManagerButtons.qml 2014-03-20 14:51:45 +0000
1619@@ -0,0 +1,99 @@
1620+/*
1621+ * This file is part of Checkbox
1622+ *
1623+ * Copyright 2013 Canonical Ltd.
1624+ *
1625+ * Authors:
1626+ * - Julia Segal <julia.segal@cellsoftware.co.uk>
1627+ * - Sylvain Pineau <sylvain.pineau@canonical.com>
1628+ *
1629+ * This program is free software; you can redistribute it and/or modify
1630+ * it under the terms of the GNU General Public License as published by
1631+ * the Free Software Foundation; version 3.
1632+ *
1633+ * This program is distributed in the hope that it will be useful,
1634+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1635+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1636+ * GNU General Public License for more details.
1637+ *
1638+ * You should have received a copy of the GNU General Public License
1639+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1640+ */
1641+
1642+import QtQuick 2.0
1643+import Ubuntu.Components 0.1
1644+
1645+
1646+
1647+Row {
1648+ id: bottombuttons
1649+ spacing: units.gu(12)
1650+
1651+ property alias pauseButtonEnabled: pauseButton.enabled
1652+ property alias resultsButtonEnabled: resultsButton.enabled
1653+ property alias rerunButtonShown: pauseButton.showRerun
1654+ property alias rerunButtonEnabled: pauseButton.enabled
1655+
1656+ signal exit
1657+ signal pauseTest
1658+ signal resumeTest
1659+ signal reRunTest
1660+ signal results
1661+
1662+
1663+ Button {
1664+ id:cancelButton // todo rename as the exit button
1665+ text: i18n.tr("Exit")
1666+ color: UbuntuColors.coolGrey
1667+ width: units.gu(18)
1668+ onClicked: {
1669+ bottombuttons.exit();
1670+ }
1671+ }
1672+
1673+ // This can be Resume, Pause, or Re-run
1674+ Button {
1675+ id: pauseButton
1676+ property bool showPause: true // either Pause or Resume
1677+ property bool showRerun: false // We may re-run
1678+ enabled: true
1679+ text: showRerun ? i18n.tr("Re-run") :( showPause ? i18n.tr("Pause") : i18n.tr("Resume"))
1680+ color: UbuntuColors.lightAubergine
1681+ width: units.gu(18)
1682+
1683+ onClicked:{
1684+
1685+ // Behaviour depends on state
1686+ if (showRerun) {
1687+ // Update the list of things the user _really_ wants to rerun
1688+ testitemFactory.GetSelectedRerunJobs(testListModel);
1689+
1690+ // return the button to pause/re-run
1691+ showRerun = false;
1692+
1693+ // Get on with it
1694+ reRunTest()
1695+ guiEngine.RunJobs();
1696+
1697+ } else {
1698+ showPause?pauseTest():resumeTest()
1699+ showPause = !showPause
1700+ }
1701+ }
1702+
1703+ }
1704+
1705+ Button {
1706+ id: resultsButton
1707+ enabled: false
1708+ text: i18n.tr("Results")
1709+ color: UbuntuColors.orange
1710+ width: units.gu(18)
1711+ onClicked: {
1712+ bottombuttons.results()
1713+ }
1714+
1715+ }
1716+
1717+
1718+}
1719
1720=== added file 'checkbox-gui/checkbox-gui/qml/RunManagerListView.qml'
1721--- checkbox-gui/checkbox-gui/qml/RunManagerListView.qml 1970-01-01 00:00:00 +0000
1722+++ checkbox-gui/checkbox-gui/qml/RunManagerListView.qml 2014-03-20 14:51:45 +0000
1723@@ -0,0 +1,215 @@
1724+/*
1725+ * This file is part of Checkbox
1726+ *
1727+ * Copyright 2013 Canonical Ltd.
1728+ *
1729+ * Authors:
1730+ * - Julia Segal <julia.segal@cellsoftware.co.uk>
1731+ * - Andrew Haigh <andrew.haigh@cellsoftware.co.uk>
1732+ *
1733+ * This program is free software; you can redistribute it and/or modify
1734+ * it under the terms of the GNU General Public License as published by
1735+ * the Free Software Foundation; version 3.
1736+ *
1737+ * This program is distributed in the hope that it will be useful,
1738+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1739+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1740+ * GNU General Public License for more details.
1741+ *
1742+ * You should have received a copy of the GNU General Public License
1743+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1744+ */
1745+
1746+
1747+import QtQuick 2.0
1748+import Ubuntu.Components 0.1
1749+import Ubuntu.Components.ListItems 0.1 as ListItem
1750+import "."
1751+
1752+
1753+
1754+Rectangle {
1755+ id: runmanagerrect
1756+
1757+ property alias itemindex: groupedList.currentIndex // use this to change the current selection
1758+ property alias curSectionTested: groupedList.curSectionTested // used by suite delegate to display 1 of 4 when tests are executed
1759+ property alias curTest: groupedList.curTest // used by suite delegate to display first number of 1 of 4
1760+
1761+ color: "white"
1762+ height: parent.height
1763+ width: parent.width
1764+
1765+ Flickable {
1766+ id: listflick
1767+ anchors.fill: parent
1768+ height: parent.height
1769+ contentHeight: groupedList.height
1770+ boundsBehavior : Flickable.StopAtBounds
1771+ clip: true
1772+ interactive: true
1773+
1774+ // The List of Tests
1775+ ListView {
1776+ id: groupedList
1777+ width: parent.width
1778+ height:units.gu(7) * (groupedList.count - groupedList.closedCount)
1779+ interactive: false
1780+ model: testListModel
1781+
1782+ // Tree view expansion/collapse support properties
1783+ property int sectionCount: 0 // contain the number of sections for calculating height
1784+ property int closedCount: 0 // contains number of closed items for calculating height
1785+ property bool userChangingIndex: false // indicates if user is changing index so 1 of 4 heading doesn't get messed up
1786+ property string curSectionTested: currentSection // which section is currently under test
1787+ property int curTest: 0 // test index of test in relation to section
1788+ property int hiddenCount: 0 // the number of unchecked boxes from Test Selection. We dont show these ever
1789+
1790+ delegate: RunManagerTestDelegate {}
1791+
1792+ onCurrentIndexChanged: {
1793+ // This code is used for counting up tests in the section for 1 of 5 header
1794+ // when incrementing through test. If index is being changed
1795+ // by the user, don't mess up the group summary
1796+ if (!userChangingIndex){
1797+ if (currentIndex != -1){
1798+ var item = testListModel.get(currentIndex);
1799+ if (item.group === groupedList.curSectionTested){
1800+ groupedList.curTest++;
1801+ }
1802+ else {
1803+ groupedList.curSectionTested = item.group
1804+ groupedList.curTest = 1
1805+ }
1806+ }
1807+ }
1808+ }
1809+
1810+ // Counts all the hidden items so we get the listview height correct
1811+ function countHiddenItems() {
1812+ var count = 0;
1813+
1814+ // We need to find the index for the item passed in as item_id
1815+ for (var i = 0; i < testListModel.count; i++)
1816+ {
1817+ var item = testListModel.get(i);
1818+
1819+ if (item.check === "true") {
1820+ // do nothing, this is shown
1821+ } else {
1822+ count++;
1823+ }
1824+ }
1825+ return count;
1826+ }
1827+
1828+ // Open/Close groups
1829+ function openShutSubgroup(item_id, sel){
1830+ var oldCurrent = currentIndex;
1831+ currentIndex = -1
1832+
1833+ // We need to find the index for the item passed in as item_id
1834+ for (var i = 0; i < groupedList.contentItem.children.length; i++)
1835+ {
1836+ var cI = groupedList.contentItem.children[i];
1837+
1838+ var top_depth = cI.my_depth;
1839+
1840+ if (cI === item_id) {
1841+ // ok, so now we hide/make visible the remaining items
1842+ // which have a depth greater than our current depth
1843+
1844+ for (var j = i+1; j < groupedList.contentItem.children.length; j++) {
1845+ // check this item has a greater depth than the top item
1846+ var cur_depth = groupedList.contentItem.children[j].my_depth;
1847+
1848+ // Should we hide this item?
1849+ if (top_depth < cur_depth) {
1850+ // Yes, because its clearly deeper
1851+ var hideItem = groupedList.contentItem.children[j];
1852+ hideItem.visible = sel;
1853+ hideItem.height = sel? units.gu(7):units.gu(0);
1854+ if (sel) {
1855+ closedCount--;
1856+ listflick.contentHeight += units.gu(7);
1857+ }
1858+ else {
1859+ closedCount++;
1860+ listflick.contentHeight -= units.gu(7);
1861+ }
1862+
1863+ } else {
1864+ // we must have reached the end, so return
1865+ return;
1866+ }
1867+ }
1868+
1869+ }
1870+ }
1871+ currentIndex = oldCurrent;
1872+ }
1873+
1874+
1875+ // counts the total test in the group
1876+ function getTotalTests(groupName){
1877+ var testcnt = 0
1878+ for (var i = testListModel.count - 1; i >= 0; i--){
1879+ var item = testListModel.get(i);
1880+ if (item.group === groupName)
1881+ testcnt++;
1882+ }
1883+ return testcnt;
1884+ }
1885+
1886+ function groupStatus(section){
1887+ var grpstatus = 0
1888+ for (var i = testListModel.count - 1; i >= 0; i--){
1889+ var item = testListModel.get(i);
1890+ if (item.group === section){
1891+ grpstatus = item.groupstatus;
1892+ i = -1;
1893+ }
1894+ }
1895+ return grpstatus
1896+ }
1897+
1898+
1899+ function getSectionCount(){
1900+ // if this is the first time called, count the number of sections
1901+ var secCnt = sectionCount
1902+ if (secCnt === 0){
1903+ var curItem = testListModel.get(0);
1904+ var curSec = curItem.group;
1905+ secCnt = 1;
1906+ for (var i = 1; i < testListModel.count; i++){
1907+ curItem = testListModel.get(i);
1908+ if (curItem.group !== curSec){
1909+ curSec = curItem.group
1910+ secCnt++;
1911+ }
1912+ }
1913+ }
1914+ return secCnt;
1915+ }
1916+
1917+ }
1918+ }
1919+
1920+ Scrollbar {
1921+ flickableItem: listflick
1922+ align: Qt.AlignTrailing
1923+ }
1924+
1925+ // Runs when this ListView is fully initialised
1926+ Component.onCompleted:{
1927+ groupedList.sectionCount = groupedList.getSectionCount()
1928+
1929+ // Update the number counted to get the right height
1930+ groupedList.hiddenCount = groupedList.countHiddenItems();
1931+
1932+ groupedList.height = units.gu(7) * (groupedList.count - groupedList.closedCount - groupedList.hiddenCount)
1933+ listflick.contentHeight = groupedList.height
1934+
1935+ /* kick off the real tests now */
1936+ guiEngine.RunJobs();
1937+ }
1938+}
1939
1940=== added file 'checkbox-gui/checkbox-gui/qml/RunManagerSuiteDelegate.qml'
1941--- checkbox-gui/checkbox-gui/qml/RunManagerSuiteDelegate.qml 1970-01-01 00:00:00 +0000
1942+++ checkbox-gui/checkbox-gui/qml/RunManagerSuiteDelegate.qml 2014-03-20 14:51:45 +0000
1943@@ -0,0 +1,168 @@
1944+/*
1945+ * This file is part of Checkbox
1946+ *
1947+ * Copyright 2013 Canonical Ltd.
1948+ *
1949+ * Authors:
1950+ * - Julia Segal <julia.segal@cellsoftware.co.uk>
1951+ *
1952+ * This program is free software; you can redistribute it and/or modify
1953+ * it under the terms of the GNU General Public License as published by
1954+ * the Free Software Foundation; version 3.
1955+ *
1956+ * This program is distributed in the hope that it will be useful,
1957+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1958+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1959+ * GNU General Public License for more details.
1960+ *
1961+ * You should have received a copy of the GNU General Public License
1962+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1963+ */
1964+
1965+
1966+import QtQuick 2.0
1967+import Ubuntu.Components 0.1
1968+import Ubuntu.Components.ListItems 0.1 as ListItem
1969+import "."
1970+
1971+Component {
1972+ id: groupDelegate
1973+
1974+ Item {
1975+ id: itemdelegate
1976+ width: parent.width
1977+ height: units.gu(7)
1978+
1979+ // properties for opening/closing sections
1980+ property string groupname: section
1981+ property string labelname: section
1982+ property bool open: true
1983+
1984+ onOpenChanged: {
1985+ open?progressIcon.source = "artwork/DownArrow.png":progressIcon.source = "artwork/RightArrow.png"
1986+ }
1987+
1988+ MouseArea {
1989+ width: parent.width
1990+ height: parent.height
1991+ anchors.fill: parent
1992+
1993+ onClicked: {
1994+ groupedList.userChangingIndex = true;
1995+ itemdelegate.open = !itemdelegate.open
1996+ groupedList.openShutSubgroup(section, itemdelegate.open)
1997+ groupedList.userChangingIndex = false;
1998+ }
1999+ }
2000+
2001+ Item {
2002+ id: groupfiller
2003+ width: units.gu(2)
2004+ }
2005+
2006+ Image {
2007+ id: progressIcon
2008+ source: "artwork/DownArrow.png"
2009+ width: units.gu(2)
2010+ height: units.gu(2)
2011+ anchors {
2012+ verticalCenter: parent.verticalCenter
2013+ left: groupfiller.left
2014+
2015+ }
2016+ opacity: enabled ? 1.0 : 0.5
2017+ }
2018+
2019+
2020+ Text {
2021+ id: grouptext
2022+ text: section
2023+ width: units.gu(20)
2024+ anchors{
2025+ verticalCenter: parent.verticalCenter
2026+ left: progressIcon.right
2027+ leftMargin: units.gu(1)
2028+ }
2029+ font.bold: true
2030+ color: UbuntuColors.coolGrey
2031+ }
2032+
2033+ Item {
2034+ id: progressfiller
2035+ width: units.gu(22)
2036+ anchors.left: grouptext.right
2037+ }
2038+
2039+ Text {
2040+ id: progresstext
2041+
2042+ property int totalTests: groupedList.getTotalTests(section)
2043+ property int testCnt: groupedList.curTest
2044+ property bool inTest: (section === groupedList.curSectionTested)
2045+
2046+
2047+ text: {inTest && !groupedList.testsComplete ? testCnt + " of " + totalTests: ""}
2048+ width: units.gu(10)
2049+ anchors.left: progressfiller.right
2050+ anchors.verticalCenter: parent.verticalCenter
2051+ horizontalAlignment: Text.AlignHCenter
2052+ color: "green"
2053+ font.bold : true
2054+ }
2055+
2056+ Image {
2057+ id: statusicon
2058+ property int testStatus: {
2059+ if (!progresstext.inTest)
2060+ return groupedList.groupStatus(section);
2061+ return 0;
2062+ }
2063+
2064+
2065+ width: units.gu(3)
2066+ height: units.gu(3)
2067+
2068+ sourceSize.width: parent.width
2069+ sourceSize.height: parent.height
2070+
2071+ anchors{
2072+ left: progressfiller.right
2073+ verticalCenter: parent.verticalCenter
2074+ leftMargin: units.gu(3)
2075+ }
2076+ source: ""
2077+
2078+ onTestStatusChanged: {
2079+ // TODO these number are made up, change to what comes out of plainbox
2080+ switch (testStatus){
2081+ case 0:
2082+ // not executed
2083+ source = ""
2084+ break;
2085+ case 1:
2086+ source = "./artwork/skipped.svg"
2087+ break;
2088+ case 2: // pass
2089+ source = "./artwork/passed.svg"
2090+ break;
2091+ case 3: // fail
2092+ source = "./artwork/failed.svg"
2093+ break;
2094+ case 4: // error
2095+ source = "./artwork/error.svg"
2096+ break;
2097+ case 5: // user info required
2098+ source = "./artwork/userreq.svg"
2099+ break;
2100+ default:
2101+ source = ""
2102+ break;
2103+ }
2104+
2105+ }
2106+
2107+ }
2108+ ListItem.ThinDivider {}
2109+ }
2110+}
2111+
2112
2113=== added file 'checkbox-gui/checkbox-gui/qml/RunManagerTestDelegate.qml'
2114--- checkbox-gui/checkbox-gui/qml/RunManagerTestDelegate.qml 1970-01-01 00:00:00 +0000
2115+++ checkbox-gui/checkbox-gui/qml/RunManagerTestDelegate.qml 2014-03-20 14:51:45 +0000
2116@@ -0,0 +1,294 @@
2117+/*
2118+ * This file is part of Checkbox
2119+ *
2120+ * Copyright 2013 Canonical Ltd.
2121+ *
2122+ * Authors:
2123+ * - Julia Segal <julia.segal@cellsoftware.co.uk>
2124+ * - Sylvain Pineau <sylvain.pineau@canonical.com>
2125+ *
2126+ * This program is free software; you can redistribute it and/or modify
2127+ * it under the terms of the GNU General Public License as published by
2128+ * the Free Software Foundation; version 3.
2129+ *
2130+ * This program is distributed in the hope that it will be useful,
2131+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2132+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2133+ * GNU General Public License for more details.
2134+ *
2135+ * You should have received a copy of the GNU General Public License
2136+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2137+ */
2138+
2139+
2140+import QtQuick 2.0
2141+import Ubuntu.Components 0.1
2142+import Ubuntu.Components.ListItems 0.1 as ListItem
2143+import Ubuntu.Components.Popups 0.1
2144+import "./artwork"
2145+
2146+/* In order to simulate a tree with ListView, we end up having to embed some knowledge
2147+ in the display component and the underlying model. Qt 5.1 was meant to have a QML TreeView
2148+ but it doesnt seem to have transpired :(
2149+
2150+ */
2151+
2152+Component {
2153+ id: testDelegate
2154+
2155+ Item{
2156+ id: testitem
2157+ width: parent.width
2158+
2159+ property string groupname: group
2160+ property string labelname: testname
2161+
2162+ // visibility - now follows what the user selected in test selection
2163+ visible: check
2164+ height: check ? units.gu(7) : units.gu(0);
2165+
2166+ // These properties help to simulate the treeview
2167+ property bool open: true
2168+ property bool is_branch: branch
2169+ property int my_depth: depth
2170+
2171+ property int icon_size_gu: 4 // Adjustable icon size based on this
2172+
2173+ onOpenChanged: {
2174+ open?openshutIcon.source = "artwork/DownArrow.png":openshutIcon.source = "artwork/RightArrow.png"
2175+ }
2176+
2177+ MouseArea {
2178+ id: openshutbutton
2179+ width: parent.width;
2180+ height: parent.height
2181+ anchors.fill: parent
2182+
2183+ onClicked: {
2184+ groupedList.userChangingIndex = true;
2185+ groupedList.currentIndex = index;
2186+ groupedList.userChangingIndex = false;
2187+
2188+ testitem.open = !testitem.open
2189+ groupedList.openShutSubgroup(testitem, testitem.open)
2190+
2191+ }
2192+ }
2193+
2194+ Item {
2195+ id: testitemview
2196+ anchors.fill: parent
2197+
2198+ Item {
2199+ id: filler
2200+ // this is our indentation level. we get this out of the model
2201+ width: (depth * openshutIcon.width) + units.gu(2)
2202+ }
2203+
2204+ Image {
2205+ id: openshutIcon
2206+ source: "artwork/DownArrow.png"
2207+ width: units.gu(2)
2208+ height: units.gu(2)
2209+ anchors {
2210+ verticalCenter: parent.verticalCenter
2211+ left: filler.right
2212+
2213+ }
2214+ opacity: enabled ? 1.0 : 0.5
2215+
2216+ visible: is_branch
2217+ enabled: is_branch
2218+ }
2219+
2220+ Text {
2221+ id: namelabel
2222+ text: testname
2223+ elide: Text.ElideRight
2224+
2225+ anchors.verticalCenter: parent.verticalCenter
2226+
2227+ anchors.left: openshutIcon.right
2228+ anchors.leftMargin: units.gu(2)
2229+
2230+ anchors.right: statusicon.left
2231+ anchors.rightMargin: units.gu(9-(icon_size_gu/2))
2232+ }
2233+
2234+
2235+ Image {
2236+ id: statusicon
2237+ property int testStatus: runstatus// TODO this should be coming from the testitem status
2238+
2239+ width: units.gu(icon_size_gu)
2240+ height: units.gu(icon_size_gu)
2241+
2242+ sourceSize.width: parent.width
2243+ sourceSize.height: parent.height
2244+
2245+ anchors.right: timelabel.left
2246+ anchors.rightMargin: units.gu(6)
2247+
2248+ anchors.verticalCenter: parent.verticalCenter
2249+
2250+ source: ""
2251+
2252+ onTestStatusChanged: {
2253+ // Update the other icons once the status is run
2254+ if (testStatus !== 0 && testStatus !== 99 /* PBJobResult_NotRun or selected for Rerun */) {
2255+ rerunicon.visible = true;
2256+ rerunicon.enabled = true;
2257+
2258+ // Update the timelabel
2259+ timelabel.text = utils.formatElapsedTime(elapsedtime);
2260+ }
2261+
2262+ // These numbers match PBTreeNode.h:PBJobResult enums
2263+ switch (testStatus){
2264+ case 0: // PBJobResult_NotRun
2265+ // not executed
2266+ source = ""
2267+ break;
2268+ case 1: // PBJobResult_Skip
2269+ source = "./artwork/skip-manual.svg"
2270+ break;
2271+ case 2: // PBJobResult_Pass
2272+ source = "./artwork/passed.svg"
2273+ break;
2274+ case 3: // PBJobResult_Fail
2275+ source = "./artwork/failed.svg"
2276+ break;
2277+ case 6: // PBJobResult_DepsNotMet
2278+ source = "./artwork/skip-deps-not-met.svg"
2279+ rerunicon.enabled = false
2280+ detailsicon.gradient = UbuntuColors.greyGradient
2281+ detailsicon.enabled = false
2282+ break;
2283+ case 7: // PBJobResult_Running
2284+ source = ""
2285+ break;
2286+ case 99: // ReRun selected
2287+ break;
2288+ default:
2289+ source = ""
2290+ break;
2291+ }
2292+
2293+ }
2294+
2295+ }
2296+
2297+ Text {
2298+ id: timelabel
2299+ text: {!elapsedtime ? "" : utils.formatElapsedTime(elapsedtime)}
2300+ width: units.gu(6)
2301+ anchors.right: rerunicon.left
2302+ anchors.rightMargin: units.gu(10-icon_size_gu)
2303+ anchors.verticalCenter: parent.verticalCenter
2304+ horizontalAlignment: Text.AlignRight
2305+
2306+ }
2307+
2308+ Switch {
2309+ id: rerunicon
2310+ width: units.gu(icon_size_gu*2)
2311+ height: units.gu(icon_size_gu)
2312+ anchors.right: detailsicon.left
2313+ anchors.rightMargin: units.gu(10-icon_size_gu)
2314+ anchors.verticalCenter: parent.verticalCenter
2315+ enabled: false
2316+ checked: false
2317+ visible: false
2318+
2319+ onCheckedChanged:{
2320+ groupedList.userChangingIndex = true;
2321+ groupedList.currentIndex = index
2322+
2323+ if (rerunicon.checked) {
2324+ testListModel.setProperty(index,"runstatus",99); // As if its not run
2325+ testListModel.setProperty(index,"rerun",true); // mark this for rerun
2326+ runbuttons.rerunButtonEnabled = true;
2327+ rerunCount += 1;
2328+ }
2329+ else {
2330+ testListModel.setProperty(index,"rerun", false)
2331+ if (rerunCount > 0) rerunCount -= 1;
2332+ if (rerunCount == 0) runbuttons.rerunButtonEnabled = false;
2333+ }
2334+
2335+ groupedList.userChangingIndex = false;
2336+ }
2337+
2338+ Connections { target: runmanagerview; onReRunRequested: rerunicon.checked = false }
2339+ }
2340+
2341+ Button {
2342+ text: "≡"
2343+ id: detailsicon
2344+ property bool detailsStatus: {!runstatus?false:true} // TODO this should be coming if the test has run or not
2345+ // currently assumes 0 = not run yet, 1 == completed
2346+
2347+ width: units.gu(icon_size_gu)
2348+ height: units.gu(icon_size_gu)
2349+ visible: false
2350+ anchors.right: parent.right
2351+ anchors.rightMargin: units.gu(9-(icon_size_gu/2))
2352+ anchors.verticalCenter: parent.verticalCenter
2353+ enabled: false
2354+
2355+ onClicked:{
2356+ groupedList.userChangingIndex = true;
2357+ groupedList.currentIndex = index;
2358+
2359+ //detailsicon.source = "./artwork/pictogram-articles-grey-hex.svg"
2360+ detailsicon.enabled = false
2361+ detailsicon.gradient = UbuntuColors.greyGradient
2362+ // start timer with 1 ms delay,
2363+ // this has to be enough for the GUI to redraw
2364+ myTimer.start()
2365+
2366+ groupedList.userChangingIndex = false;
2367+ }
2368+
2369+ onDetailsStatusChanged:{
2370+ if (detailsStatus) // completed
2371+ detailsicon.visible = true
2372+ else // not run yet
2373+ detailsicon.visible = false
2374+ }
2375+ Connections { target: runmanagerview; onPauseOrEndRun: detailsicon.enabled = true }
2376+ Connections { target: runmanagerview; onResumeRun: detailsicon.enabled = false }
2377+ }
2378+
2379+ Timer {
2380+ id: myTimer
2381+ interval: 1; running: false; repeat: false
2382+ onTriggered: {
2383+ // Open the log viewer
2384+ PopupUtils.open(log_viewer)
2385+ detailsicon.enabled = true
2386+ detailsicon.gradient = UbuntuColors.orangeGradient
2387+ }
2388+ }
2389+
2390+ }
2391+
2392+ // Item dividing line
2393+ ListItem.ThinDivider {}
2394+
2395+ Component {
2396+ id: log_viewer
2397+ LogViewer{
2398+ jobPath: objectpath
2399+ title: testname
2400+ }
2401+ }
2402+
2403+ Component {
2404+ id: manual_dialog
2405+ ManualInteractionDialog{
2406+ testItem: testListModel.get(index);
2407+ }
2408+ }
2409+ }
2410+}
2411
2412=== added file 'checkbox-gui/checkbox-gui/qml/RunManagerView.qml'
2413--- checkbox-gui/checkbox-gui/qml/RunManagerView.qml 1970-01-01 00:00:00 +0000
2414+++ checkbox-gui/checkbox-gui/qml/RunManagerView.qml 2014-03-20 14:51:45 +0000
2415@@ -0,0 +1,450 @@
2416+/*
2417+ * This file is part of plainbox-gui
2418+ *
2419+ * Copyright 2013 Canonical Ltd.
2420+ *
2421+ * Authors:
2422+ * - Julia Segal <julia.segal@cellsoftware.co.uk>
2423+ * - Sylvain Pineau <sylvain.pineau@canonical.com>
2424+ *
2425+ * This program is free software; you can redistribute it and/or modify
2426+ * it under the terms of the GNU General Public License as published by
2427+ * the Free Software Foundation; version 3.
2428+ *
2429+ * This program is distributed in the hope that it will be useful,
2430+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2431+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2432+ * GNU General Public License for more details.
2433+ *
2434+ * You should have received a copy of the GNU General Public License
2435+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2436+ */
2437+
2438+
2439+import QtQuick 2.0
2440+import Ubuntu.Components 0.1
2441+import Ubuntu.Components.Popups 0.1
2442+import "."
2443+
2444+
2445+Page {
2446+ id: runmanagerview
2447+ title: i18n.tr("Run Manager")
2448+
2449+ tools: ToolbarItems {
2450+ locked: true
2451+ opened: false
2452+ }
2453+
2454+ property bool reportIsSaved: false;
2455+ property bool testingComplete: false;
2456+ property bool showTest: true;
2457+ property int suggestedOutcome: 1;
2458+ property int rerunCount: 0;
2459+ signal reRunRequested
2460+ signal pauseOrEndRun
2461+ signal resumeRun
2462+
2463+ // Updates the test status based on GuiEngine signals
2464+ Item {
2465+ id: updater
2466+ property int completed: 0 // How many tests have we run so far?
2467+ property int testIndex: 0 // which test we are running from the list
2468+
2469+ // totalTests: Denotes lines in the testListModel (display) model, NOT real number of tests
2470+ property int totalTests: testListModel.count
2471+
2472+ // Times the total run of tests
2473+ property var startTime: new Date()
2474+
2475+ // start time for each test in turn
2476+ property var testStartTime: new Date()
2477+
2478+ property bool running;
2479+
2480+ Connections {
2481+ target: guiEngine
2482+
2483+ onJobsBegin: {
2484+ // update things like the progress bar
2485+ progress.enabled = true;
2486+ updater.running = true;
2487+
2488+ progress.value = 0;
2489+
2490+ runmanagerview.testingComplete = false;
2491+ }
2492+
2493+ onJobsCompleted: {
2494+ // All tests are done
2495+ pauseOrEndRun()
2496+ runmanagerview.testingComplete = true;
2497+
2498+ // update ui
2499+ //runbuttons.pauseButtonEnabled = false;
2500+ runbuttons.resultsButtonEnabled = true;
2501+ progress.title = "Completed (" + utils.formatElapsedTime((new Date() - updater.startTime)) + ")";
2502+ progress.enabled = false;
2503+ updater.running = false;
2504+
2505+ // Progress is 100% even if we only re-ran a few jobs
2506+ progress.value = guiEngine.ValidRunListCount();
2507+
2508+ // now we should start with the re-run options
2509+ runbuttons.rerunButtonShown = true;
2510+ runbuttons.rerunButtonEnabled = false; // needs the user to pick something
2511+
2512+ // set flags in list (for group details)
2513+ testsuitelist.curSectionTested = ""; // set this as there is no more tested
2514+ }
2515+
2516+ // from gui-engine.h for reference:
2517+// void updateGuiBeginJob(const QString& job_id, \
2518+// const int current_job_index);
2519+ onUpdateGuiBeginJob: {
2520+ /* we must translate from job_id ("/plainbox/job/<id_string>
2521+ * Into the index for one of the displayed items
2522+ */
2523+ var i = 0;
2524+ for (i = 0; i < testListModel.count; i++) {
2525+
2526+ // Compare the m_path to the job_id
2527+ var item = testListModel.get(i);
2528+
2529+ if (item.objectpath === job_id ) {
2530+ updater.testIndex = i ;
2531+ }
2532+ }
2533+
2534+ // Record the start time of this test
2535+ var timenow = new Date();
2536+ updater.testStartTime = timenow;
2537+
2538+ // Update the progress bar
2539+ progress.maxValue = guiEngine.ValidRunListCount();
2540+
2541+ /* +1 because the index is from zero, but we want to show the
2542+ * zero'th test as test 1
2543+ */
2544+ progress.value = current_job_index+1; // from onUpdateGuiObjects
2545+
2546+ progress.title = "Running " + (progress.value)
2547+ + " of "+ progress.maxValue
2548+ + " (" + utils.formatElapsedTime(timenow - updater.startTime) + ")"
2549+ + " " + test_name;
2550+ }
2551+
2552+ // from gui-engine.h for reference:
2553+// void updateGuiEndJob(const QString& job_id, \
2554+// const int current_job_index,
2555+// const int outcome);
2556+ onUpdateGuiEndJob: {
2557+ /* we must translate from job_id ("/plainbox/job/<id_string>
2558+ * Into the index for one of the displayed items
2559+ */
2560+ var i = 0;
2561+ for (i = 0; i < testListModel.count; i++) {
2562+
2563+ // Compare the m_path to the job_id
2564+ var item = testListModel.get(i);
2565+
2566+ if (item.objectpath === job_id ) {
2567+ updater.testIndex =i ;
2568+ }
2569+ }
2570+
2571+ // set elapsed time
2572+ var stopTime = new Date();
2573+
2574+ var jobduration = stopTime - updater.testStartTime;
2575+
2576+ testListModel.setProperty(updater.testIndex, "elapsedtime", jobduration);
2577+
2578+ // outcome comes from guiengine in this signal
2579+ testListModel.setProperty(updater.testIndex, "runstatus", outcome);
2580+
2581+ /* Note that this has now been run, so doesnt need to be re-run
2582+ * unless the user subsequently selects it
2583+ */
2584+ testListModel.setProperty(updater.testIndex, "rerun",false);
2585+
2586+ // We may consider setting the IO Log details too here, but not yet
2587+
2588+ // set the group status to the worst runstatus outcome ... failure? userreq?, check runstatus
2589+ testListModel.setProperty(updater.testIndex, "groupstatus", 2);
2590+
2591+ // Update the progress bar
2592+ progress.maxValue = guiEngine.ValidRunListCount();
2593+
2594+ /* +1 because the index is from zero, but we want to show the
2595+ * zero'th test as test 1
2596+ */
2597+ progress.value = current_job_index+1; // from onUpdateGuiObjects
2598+
2599+ progress.title = "Completed " + (progress.value)
2600+ + " of "+ progress.maxValue
2601+ + " (" + utils.formatElapsedTime(stopTime - updater.startTime) + ")"
2602+ + " " + test_name;
2603+ }
2604+ }
2605+ }
2606+
2607+ Item {
2608+ id: filler
2609+ height: units.gu(0)
2610+ anchors.top: parent.top
2611+ }
2612+
2613+ // Test List Header Bar
2614+ Item {
2615+ id: runmanagerlistheaders
2616+ width: parent.width - units.gu(4)
2617+ height: units.gu(3)
2618+
2619+ anchors {
2620+ horizontalCenter: parent.horizontalCenter
2621+ top: filler.bottom
2622+ margins: units.gu(2)
2623+ }
2624+
2625+ Text {
2626+ id: testcasenamelabel
2627+ text: i18n.tr("Test Case Name")
2628+ anchors.left: parent.left
2629+ anchors.leftMargin: units.gu(6)
2630+
2631+ anchors.right: statuslabel.left
2632+ anchors.rightMargin: units.gu(6)
2633+ }
2634+
2635+ Text {
2636+ id: statuslabel
2637+ text: i18n.tr("Status")
2638+
2639+ width: units.gu(6)
2640+
2641+ anchors.right: elapsedtimelabel.left
2642+ anchors.rightMargin: units.gu(6)
2643+
2644+ horizontalAlignment: Text.AlignHCenter
2645+ }
2646+
2647+ Text {
2648+ id: elapsedtimelabel
2649+ text: i18n.tr("Elapsed Time")
2650+
2651+ width: units.gu(6)
2652+
2653+ anchors.right: actionslabel.left
2654+ anchors.rightMargin: units.gu(6)
2655+
2656+ horizontalAlignment: Text.AlignHCenter
2657+ }
2658+
2659+ Text {
2660+ id: actionslabel
2661+ text: i18n.tr("Re-run")
2662+
2663+ width: units.gu(6)
2664+
2665+ anchors.right: detailslabel.left
2666+ anchors.rightMargin: units.gu(6)
2667+
2668+ horizontalAlignment: Text.AlignHCenter
2669+ }
2670+
2671+ Text {
2672+ id: detailslabel
2673+ text: i18n.tr("Console Output")
2674+
2675+ width: units.gu(6)
2676+
2677+ anchors.right: parent.right
2678+ anchors.rightMargin: units.gu(6)
2679+
2680+ horizontalAlignment: Text.AlignHCenter
2681+ }
2682+ }
2683+
2684+
2685+ RunManagerListView {
2686+ id: testsuitelist
2687+ width: parent.width - units.gu(4)
2688+ anchors{
2689+ horizontalCenter: parent.horizontalCenter
2690+ top: runmanagerlistheaders.bottom
2691+ bottom: progress.top
2692+ bottomMargin: units.gu(2)
2693+ }
2694+ }
2695+
2696+ Progress {
2697+ id: progress
2698+ height: units.gu(4)
2699+ width: parent.width - units.gu(20)
2700+
2701+ anchors {
2702+ bottom: runbuttons.top
2703+ bottomMargin: units.gu(6) // SDK Bug? 0 places it Over the buttons!
2704+ horizontalCenter: parent.horizontalCenter
2705+ }
2706+ title: i18n.tr("Running")
2707+ maxValue: guiEngine.ValidRunListCount();
2708+ value: 0
2709+
2710+ }
2711+
2712+ RunManagerButtons {
2713+ id: runbuttons
2714+
2715+ anchors{
2716+ horizontalCenter: parent.horizontalCenter
2717+ bottom: parent.bottom
2718+ margins: units.gu(2)
2719+ }
2720+
2721+ onExit:{
2722+ if (!runmanagerview.testingComplete){
2723+ PopupUtils.open(incomplete_warning_dialog, runbuttons);
2724+ pause();
2725+ }
2726+ else if (!reportIsSaved)
2727+ PopupUtils.open(submission_warning_dialog, runbuttons);
2728+ else
2729+ {
2730+ // We should clean up the session before we go
2731+ guiEngine.GuiSessionRemove();
2732+
2733+ Qt.quit();
2734+ }
2735+ }
2736+
2737+ onPauseTest: {
2738+ pause();
2739+ }
2740+ onResumeTest: {
2741+ resume();
2742+ }
2743+ onResults: {
2744+ PopupUtils.open(submission_dialog, runbuttons);
2745+ }
2746+ onReRunTest: {
2747+ reRunRequested();
2748+ }
2749+
2750+ function resume(){
2751+ resumeRun();
2752+ updater.testStartTime = new Date()
2753+ updater.running = true;
2754+ console.log("Resume...");
2755+
2756+ guiEngine.Resume();
2757+ }
2758+
2759+ function pause(){
2760+ pauseOrEndRun();
2761+ updater.running = false;
2762+ progress.title = progress.title.replace("Running", "Paused ")
2763+ console.log("Pause...")
2764+
2765+ guiEngine.Pause();
2766+ }
2767+
2768+ Component {
2769+ id: submission_dialog
2770+ SubmissionDialog{
2771+ }
2772+ }
2773+
2774+ Component {
2775+ id: manual_dialog
2776+ ManualInteractionDialog{
2777+ testItem: testListModel.get(updater.testIndex);
2778+ showTestButton: showTest;
2779+ testStatus: suggestedOutcome;
2780+ }
2781+ }
2782+
2783+ Component {
2784+ id: submission_warning_dialog
2785+ WarningDialog{
2786+ // TRANSLATORS: Be careful not to translate the \n (newline) characters
2787+ text: i18n.tr("You are about to exit this test run without saving your results report. \n\nAre you sure? \n\n(Press Continue to Quit)");
2788+
2789+ showOK: false
2790+ showContinue: true
2791+ showCheckbox: false
2792+
2793+ onCont: {
2794+ // We should clean up the session before we go
2795+ guiEngine.GuiSessionRemove();
2796+ Qt.quit();
2797+ }
2798+ }
2799+ }
2800+
2801+ Component {
2802+ id: incomplete_warning_dialog
2803+ WarningDialog{
2804+ text: i18n.tr("You are about to cancel an active test run. Your system might be left in an unstable state. Are you sure you want to exit?");
2805+ showOK: true
2806+ showCancel: true
2807+ showContinue: false
2808+ showCheckbox: false
2809+
2810+ onOk: {
2811+ Qt.quit();
2812+ }
2813+
2814+ onCancel: {
2815+ // resume
2816+ runbuttons.resume()
2817+ }
2818+ }
2819+ }
2820+
2821+
2822+
2823+ Item {
2824+ id: utils
2825+ function formatElapsedTime(elap){
2826+ // strip the miliseconds
2827+ elap = parseInt(elap / 1000);
2828+
2829+ // get seconds (Original had 'round' which incorrectly counts 0:28, 0:29, 1:30 ... 1:59, 1:0)
2830+ var seconds = parseInt(Math.round(elap % 60));
2831+
2832+ // remove seconds from the date
2833+ elap = parseInt(Math.floor(elap / 60));
2834+
2835+ // get minutes
2836+ var minutes = parseInt(Math.round(elap % 60));
2837+
2838+ // remove minutes from the date
2839+ elap = parseInt(Math.floor(elap / 60));
2840+
2841+
2842+ // get hours
2843+ var hours = parseInt(Math.round(elap % 24));
2844+
2845+ var timeStr = ""
2846+
2847+ if (hours)
2848+ timeStr = hours + ":";
2849+ timeStr = timeStr + ("0" + minutes).slice(-2) + ":" + ("0" + seconds).slice(-2);
2850+
2851+ return timeStr;
2852+ }
2853+ }
2854+ }
2855+
2856+ Connections {
2857+ id: myconnections
2858+ target: guiEngine
2859+ onRaiseManualInteractionDialog: {
2860+ showTest = show_test;
2861+ suggestedOutcome = suggested_outcome;
2862+ PopupUtils.open(manual_dialog, runmanagerview);
2863+ }
2864+ }
2865+}
2866
2867=== added file 'checkbox-gui/checkbox-gui/qml/SubmissionDialog.qml'
2868--- checkbox-gui/checkbox-gui/qml/SubmissionDialog.qml 1970-01-01 00:00:00 +0000
2869+++ checkbox-gui/checkbox-gui/qml/SubmissionDialog.qml 2014-03-20 14:51:45 +0000
2870@@ -0,0 +1,148 @@
2871+/*
2872+ * This file is part of Checkbox
2873+ *
2874+ * Copyright 2013 Canonical Ltd.
2875+ *
2876+ * Authors:
2877+ * - Julia Segal <julia.segal@cellsoftware.co.uk>
2878+ *
2879+ * This program is free software; you can redistribute it and/or modify
2880+ * it under the terms of the GNU General Public License as published by
2881+ * the Free Software Foundation; version 3.
2882+ *
2883+ * This program is distributed in the hope that it will be useful,
2884+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2885+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2886+ * GNU General Public License for more details.
2887+ *
2888+ * You should have received a copy of the GNU General Public License
2889+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2890+ */
2891+
2892+
2893+import QtQuick 2.0
2894+import Ubuntu.Components 0.1
2895+import Ubuntu.Components.Popups 0.1
2896+import "."
2897+
2898+Dialog {
2899+ id: dialog
2900+
2901+ title: i18n.tr("Report")
2902+ text: settings.value("submission/message", i18n.tr("The following test report has been generated. You may view it now or save it for later."))
2903+
2904+ TextField {
2905+ RegExpValidator {
2906+ id: regex_validator
2907+ regExp: new RegExp(settings.value("submission/regex", ".*"));
2908+ }
2909+ function initialize() {
2910+ var input_type = settings.value("submission/input_type", "")
2911+ if (input_type == "regex") {
2912+ validator = regex_validator;
2913+ visible = true;
2914+ }
2915+ else if (input_type == "email") {
2916+ inputMethodHints = Qt.ImhEmailCharactersOnly;
2917+ visible = true;
2918+ }
2919+ else {
2920+ visible = false;
2921+ }
2922+ var secure_id = settings.value("submission/secure_id","");
2923+ if (secure_id) {
2924+ text = secure_id;
2925+ }
2926+ }
2927+
2928+ id: upload_input
2929+ placeholderText: settings.value("submission/input_placeholder", "")
2930+ Component.onCompleted: initialize()
2931+ }
2932+
2933+ Row {
2934+ function initialize() {
2935+ if (settings.value("submission/submit_to_hexr","false").toLowerCase() == "true") {
2936+ visible = true;
2937+ }
2938+ }
2939+
2940+ spacing: units.gu(8)
2941+ visible: false
2942+ Label {
2943+ id: submit_to_hexr_label
2944+ text: i18n.tr("Submit to HEXR:")
2945+ }
2946+
2947+ CheckBox {
2948+ id: submit_to_hexr
2949+ text: i18n.tr("Submit to HEXR:")
2950+ }
2951+ Component.onCompleted: initialize()
2952+
2953+ }
2954+
2955+ Button {
2956+ id: submitbutton
2957+ text: settings.value("submission/ok_btn_text", "Save Results")
2958+ enabled: upload_input.acceptableInput
2959+ color: UbuntuColors.orange
2960+ onClicked: {
2961+ var submit_to = settings.value("transport/submit_to", "")
2962+ var export_path = settings.value("exporter/xml_export_path", "")
2963+
2964+ if (!export_path) {
2965+ export_path = guiEngine.GetSaveFileName();
2966+ }
2967+ var success = guiEngine.GuiExportSessionToFileAsXML(export_path);
2968+ if (submit_to == "certification") {
2969+ if (success) {
2970+ dialog.text = guiEngine.SendSubmissionViaCertificationTransport(export_path,
2971+ upload_input.text,
2972+ submit_to_hexr.checked);
2973+ }
2974+ else {
2975+ dialog.text = i18n.tr("Could not export the tests results for uploading.");
2976+ }
2977+ }
2978+ else {
2979+ runmanagerview.reportIsSaved = success;
2980+ }
2981+ }
2982+ }
2983+ Button {
2984+ id: view_button
2985+ text: i18n.tr("View Results")
2986+ color: UbuntuColors.lightAubergine
2987+ onClicked: {
2988+ onClicked:{
2989+ var mysavepath = '/tmp/report.html';
2990+ runmanagerview.reportIsSaved = guiEngine.GuiExportSessionToFileAsHTML(mysavepath);
2991+ Qt.openUrlExternally(mysavepath)
2992+ }
2993+ }
2994+ }
2995+ Button {
2996+ id: donebutton
2997+ text: i18n.tr("Done")
2998+ color: UbuntuColors.warmGrey
2999+ onClicked: {
3000+ if (!runmanagerview.reportIsSaved)
3001+ PopupUtils.open(submission_warning_dialog, donebutton);
3002+ else
3003+ PopupUtils.close(dialog)
3004+ }
3005+ }
3006+
3007+ Component {
3008+ id: submission_warning_dialog
3009+ WarningDialog{
3010+ text: settings.value("submission/cancel_warning", i18n.tr("You are about to exit this test run without saving your results report. Do you want to save the report?"))
3011+
3012+ showContinue: false
3013+ showCheckbox: false
3014+
3015+ onCancel: PopupUtils.close(dialog)
3016+ }
3017+ }
3018+}
3019
3020=== added file 'checkbox-gui/checkbox-gui/qml/SuiteSelectionDelegate.qml'
3021--- checkbox-gui/checkbox-gui/qml/SuiteSelectionDelegate.qml 1970-01-01 00:00:00 +0000
3022+++ checkbox-gui/checkbox-gui/qml/SuiteSelectionDelegate.qml 2014-03-20 14:51:45 +0000
3023@@ -0,0 +1,90 @@
3024+/*
3025+ * This file is part of Checkbox
3026+ *
3027+ * Copyright 2013 Canonical Ltd.
3028+ *
3029+ * Authors:
3030+ * - Julia Segal <julia.segal@cellsoftware.co.uk>
3031+ *
3032+ * This program is free software; you can redistribute it and/or modify
3033+ * it under the terms of the GNU General Public License as published by
3034+ * the Free Software Foundation; version 3.
3035+ *
3036+ * This program is distributed in the hope that it will be useful,
3037+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3038+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3039+ * GNU General Public License for more details.
3040+ *
3041+ * You should have received a copy of the GNU General Public License
3042+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
3043+ */
3044+
3045+
3046+import QtQuick 2.0
3047+import Ubuntu.Components 0.1
3048+import Ubuntu.Components.ListItems 0.1 as ListItem
3049+import "./artwork"
3050+
3051+
3052+ Item {
3053+ id: itemdelegate
3054+ width: parent.width
3055+ height: units.gu(7)
3056+
3057+ Item {
3058+ id: suitefiller
3059+ width: units.gu(1)
3060+ }
3061+
3062+ CheckBox {
3063+ id: suitecheckbox
3064+ anchors.verticalCenter: parent.verticalCenter
3065+ anchors.left: suitefiller.right
3066+ checked: false
3067+ onCheckedChanged: {
3068+ // Update the list of selected whitelists
3069+ update_selection(testname, checked)
3070+ /* Update the ListView, primarily to ensure we dont
3071+ * uncheck ALL the whitelists.
3072+ */
3073+ suitelist.ensure_one_selection();
3074+ }
3075+ function suiteSelectHandler() {
3076+ checked = check
3077+ }
3078+ Component.onCompleted: {
3079+ testselection.suiteSelect.connect(suiteSelectHandler)
3080+ }
3081+ }
3082+
3083+ function update_selection(testname, checked){
3084+ for (var i = whiteListModel.count - 1; i >= 0; i--){
3085+ var item = whiteListModel.get(i);
3086+ if (item.testname === testname){
3087+ whiteListModel.setProperty(i, "check", checked);
3088+ }
3089+ }
3090+ }
3091+
3092+ function remove_prefix_and_capitalize_first(prefix, suite) {
3093+ var suitename = suite.replace(prefix, '')
3094+ return suitename.substr(0, 1).toUpperCase() + suitename.substr(1)
3095+ }
3096+
3097+ Text {
3098+ id: suitetext
3099+ text: remove_prefix_and_capitalize_first('ihv-', testname)
3100+ anchors.verticalCenter: parent.verticalCenter
3101+ anchors.left: suitecheckbox.right
3102+ anchors.leftMargin: units.gu(1)
3103+ }
3104+
3105+ ListItem.ThinDivider {}
3106+
3107+ MouseArea {
3108+ anchors.fill: parent
3109+ onClicked: {
3110+ suitecheckbox.checked = !suitecheckbox.checked
3111+ }
3112+ }
3113+ }
3114
3115=== added file 'checkbox-gui/checkbox-gui/qml/SuiteSelectionView.qml'
3116--- checkbox-gui/checkbox-gui/qml/SuiteSelectionView.qml 1970-01-01 00:00:00 +0000
3117+++ checkbox-gui/checkbox-gui/qml/SuiteSelectionView.qml 2014-03-20 14:51:45 +0000
3118@@ -0,0 +1,158 @@
3119+/*
3120+ * This file is part of Checkbox
3121+ *
3122+ * Copyright 2013 Canonical Ltd.
3123+ *
3124+ * Authors:
3125+ * - Julia Segal <julia.segal@cellsoftware.co.uk>
3126+ * - Andrew Haigh <andrew.haigh@cellsoftware.co.uk>
3127+ *
3128+ * This program is free software; you can redistribute it and/or modify
3129+ * it under the terms of the GNU General Public License as published by
3130+ * the Free Software Foundation; version 3.
3131+ *
3132+ * This program is distributed in the hope that it will be useful,
3133+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3134+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3135+ * GNU General Public License for more details.
3136+ *
3137+ * You should have received a copy of the GNU General Public License
3138+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
3139+ */
3140+
3141+
3142+import QtQuick 2.0
3143+import Ubuntu.Components 0.1
3144+import Ubuntu.Components.ListItems 0.1 as ListItem
3145+import "."
3146+
3147+
3148+
3149+
3150+Page {
3151+ id: suiteselection
3152+ title: i18n.tr("Suite Selection")
3153+
3154+ tools: ToolbarItems {
3155+ locked: true
3156+ opened: false
3157+ }
3158+
3159+ Item {
3160+ id: filler
3161+ height: units.gu(4)
3162+ }
3163+
3164+ Rectangle {
3165+ id: suitelist
3166+ width: parent.width - units.gu(4)
3167+ color: "white"
3168+ height: parent.height - filler.height - okbutton.height - units.gu(6)
3169+ anchors{
3170+ horizontalCenter: parent.horizontalCenter
3171+ top: filler.bottom
3172+ }
3173+
3174+ ListView {
3175+ id: testselection
3176+ height: parent.height
3177+ width: parent.width
3178+ anchors.fill: parent
3179+ contentHeight: units.gu(12) * whiteListModel.count
3180+ interactive: true
3181+ clip: true
3182+ boundsBehavior : Flickable.StopAtBounds
3183+ model: whiteListModel
3184+
3185+ delegate: SuiteSelectionDelegate{}
3186+
3187+ signal suiteSelect();
3188+
3189+ Component.onCompleted: {
3190+ // First uncheck all the suites
3191+ for (var i = whiteListModel.count - 1; i >= 0; i--){
3192+ var item = whiteListModel.get(i);
3193+ whiteListModel.setProperty(i, "check", false);
3194+ }
3195+ // Select only the one(s) mathing the 'default' pattern
3196+ for (var i = whiteListModel.count - 1; i >= 0; i--){
3197+ var item = whiteListModel.get(i);
3198+ if (item.testname.match(/default/i)) {
3199+ whiteListModel.setProperty(i, "check", true);
3200+ }
3201+ }
3202+ suiteSelect();
3203+ }
3204+ }
3205+
3206+ Scrollbar {
3207+ flickableItem: testselection
3208+ align: Qt.AlignTrailing
3209+ }
3210+
3211+ // At least one whitelist MUST be selected
3212+ function ensure_one_selection() {
3213+ var one_selection = false;
3214+
3215+ for (var i = whiteListModel.count - 1; i >= 0; i--){
3216+ var item = whiteListModel.get(i);
3217+
3218+ if (item.check === "true") {
3219+ one_selection = true;
3220+ }
3221+ }
3222+
3223+ // If nothing is selected, disable the ok button
3224+ okbutton.enabled = one_selection
3225+ }
3226+ }
3227+
3228+ ActivityIndicator {
3229+ id: suite_sel_activity
3230+
3231+ running: false
3232+
3233+ anchors.horizontalCenter: suitelist.horizontalCenter
3234+ anchors.verticalCenter: suitelist.verticalCenter
3235+ }
3236+
3237+ Button {
3238+ id: okbutton
3239+ width: parent.width - units.gu(4)
3240+ anchors {
3241+ horizontalCenter:parent.horizontalCenter
3242+ bottom: parent.bottom
3243+ margins: units.gu(2)
3244+ }
3245+ enabled: false
3246+ text: i18n.tr("OK")
3247+ color: UbuntuColors.lightAubergine
3248+ onClicked: {
3249+ // Ensure we only ask the service about this once (Bug 1209284)
3250+ okbutton.enabled = false;
3251+
3252+ suite_sel_activity.running = true;
3253+
3254+ suitelist.visible = false;
3255+
3256+ /* Now, we should go run the guiengine update to run the local jobs
3257+ which happen to match the whitelist. Then we can collect the
3258+ test jobs and show them to the user.
3259+ */
3260+ guiEngine.RunLocalJobs();
3261+ }
3262+ }
3263+
3264+ Connections {
3265+ target: guiEngine
3266+ onLocalJobsCompleted: {
3267+ suite_sel_activity.running = false;
3268+
3269+ // Now, we should repopulate the testlistmodel...
3270+ testitemFactory.CreateTestListModel(testListModel);
3271+ // NOTE: When the user is done, this is where to load up the TestSelection list
3272+ mainView.state = "TESTSELECTION"
3273+ }
3274+ }
3275+
3276+}
3277
3278=== added file 'checkbox-gui/checkbox-gui/qml/TestSelectionDetails.qml'
3279--- checkbox-gui/checkbox-gui/qml/TestSelectionDetails.qml 1970-01-01 00:00:00 +0000
3280+++ checkbox-gui/checkbox-gui/qml/TestSelectionDetails.qml 2014-03-20 14:51:45 +0000
3281@@ -0,0 +1,110 @@
3282+/*
3283+ * This file is part of Checkbox
3284+ *
3285+ * Copyright 2013 Canonical Ltd.
3286+ *
3287+ * Authors:
3288+ * - Julia Segal <julia.segal@cellsoftware.co.uk>
3289+ * - Sylvain Pineau <sylvain.pineau@canonical.com>
3290+ *
3291+ * This program is free software; you can redistribute it and/or modify
3292+ * it under the terms of the GNU General Public License as published by
3293+ * the Free Software Foundation; version 3.
3294+ *
3295+ * This program is distributed in the hope that it will be useful,
3296+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3297+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3298+ * GNU General Public License for more details.
3299+ *
3300+ * You should have received a copy of the GNU General Public License
3301+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
3302+ */
3303+
3304+import QtQuick 2.0
3305+import Ubuntu.Components 0.1
3306+import Ubuntu.Components.Popups 0.1
3307+
3308+WideDialog {
3309+ id: detailsview
3310+ title: currentTestItem.testname
3311+ dialogHeight: testdetails.height + (backButton.height * 3) + units.gu(1) > Math.round(mainView.height / 1.618) ? Math.round(mainView.height / 1.618) : testdetails.height + (backButton.height * 3) + units.gu(1)
3312+ dialogWidth: Math.round(parent.width / 2 * 1.618)
3313+ Flickable {
3314+ id: flickable
3315+ anchors {
3316+ left: parent.left
3317+ right: parent.right
3318+ top: parent.top
3319+ bottom: backButton.top
3320+ topMargin: units.gu(5)
3321+ bottomMargin: units.gu(2)
3322+ }
3323+ width: parent.width
3324+ height: parent.height
3325+ contentHeight: testdetails.height
3326+ flickableDirection: Flickable.VerticalFlick
3327+ clip: true
3328+
3329+ Rectangle {
3330+ id: testdetails
3331+ height: detailsblock.height
3332+ width: parent.width
3333+ color: "transparent"
3334+
3335+ Item{
3336+ id: detailsblock
3337+
3338+ height: nameText.height + descriptionText.height + dependsText.height + requiresText.height + commandText.height + units.gu(1)
3339+ width: parent.width
3340+
3341+ TestSelectionDetailsItems{
3342+ id: nameText
3343+ labelName: i18n.tr("name")
3344+ anchors.top: parent.top
3345+ text: currentTestItem.testname
3346+ }
3347+
3348+ TestSelectionDetailsItems{
3349+ id: descriptionText
3350+ labelName: i18n.tr("description")
3351+ anchors.top: nameText.bottom
3352+ text: currentTestItem.description
3353+ }
3354+
3355+ TestSelectionDetailsItems{
3356+ id: dependsText
3357+ labelName: i18n.tr("depends")
3358+ anchors.top: descriptionText.bottom
3359+ text: currentTestItem.depends
3360+ }
3361+
3362+ TestSelectionDetailsItems{
3363+ id: requiresText
3364+ labelName: i18n.tr("requires")
3365+ anchors.top: dependsText.bottom
3366+ text:currentTestItem.requires
3367+ }
3368+
3369+ TestSelectionDetailsItems{
3370+ id: commandText
3371+ labelName: i18n.tr("command")
3372+ anchors.top: requiresText.bottom
3373+ text: "<code>" + currentTestItem.command.replace(/\n/g, "<br />") + "</code>"
3374+ textFormat: TextEdit.RichText
3375+ }
3376+ }
3377+ }
3378+ }
3379+
3380+ Scrollbar {
3381+ flickableItem: flickable
3382+ align: Qt.AlignTrailing
3383+ }
3384+
3385+ Button {
3386+ id: backButton
3387+ text: "Back"
3388+ onClicked: PopupUtils.close(detailsview)
3389+ anchors.bottom: parent.bottom
3390+ }
3391+}
3392
3393=== added file 'checkbox-gui/checkbox-gui/qml/TestSelectionDetailsItems.qml'
3394--- checkbox-gui/checkbox-gui/qml/TestSelectionDetailsItems.qml 1970-01-01 00:00:00 +0000
3395+++ checkbox-gui/checkbox-gui/qml/TestSelectionDetailsItems.qml 2014-03-20 14:51:45 +0000
3396@@ -0,0 +1,63 @@
3397+import QtQuick 2.0
3398+import Ubuntu.Components 0.1
3399+
3400+Item {
3401+ id: details_items
3402+ height: nameRect.height + units.gu(1)
3403+
3404+ anchors {
3405+ right: parent.right
3406+ left: parent.left
3407+ }
3408+
3409+ property alias labelName: nameLabel.text
3410+ property alias text: nameText.text
3411+ property alias textFormat: nameText.textFormat
3412+
3413+ Label {
3414+ id: nameLabel
3415+ text: ""
3416+ color: Qt.rgba(1, 1, 1, 0.9)
3417+ width: units.gu(10)
3418+ anchors {
3419+ left: parent.left
3420+ leftMargin: units.gu(1)
3421+ verticalCenter: nameRect.verticalCenter
3422+ }
3423+ }
3424+
3425+ Rectangle {
3426+ id: nameRect
3427+ height: nameText.height + units.gu(1)
3428+ width: parent.width - nameLabel.width - units.gu(3)
3429+ color: Theme.palette.normal.background
3430+ antialiasing: true
3431+ radius: 6
3432+ border{
3433+ color: UbuntuColors.warmGrey
3434+ width: 1
3435+ }
3436+ anchors {
3437+ left: nameLabel.right
3438+ leftMargin: units.gu(1)
3439+ top: parent.top
3440+ topMargin: units.gu(1)
3441+ }
3442+ }
3443+
3444+ TextEdit {
3445+ id: nameText
3446+ width: parent.width - nameLabel.width - units.gu(4)
3447+ wrapMode: Text.Wrap
3448+ anchors {
3449+ left: nameLabel.right
3450+ leftMargin: units.gu(2)
3451+ verticalCenter: nameRect.verticalCenter
3452+ }
3453+ selectionColor: Theme.palette.selected.foreground
3454+ selectedTextColor: Theme.palette.selected.background
3455+ text:""
3456+ selectByMouse: true
3457+ readOnly: true
3458+ }
3459+}
3460
3461=== added file 'checkbox-gui/checkbox-gui/qml/TestSelectionListView.qml'
3462--- checkbox-gui/checkbox-gui/qml/TestSelectionListView.qml 1970-01-01 00:00:00 +0000
3463+++ checkbox-gui/checkbox-gui/qml/TestSelectionListView.qml 2014-03-20 14:51:45 +0000
3464@@ -0,0 +1,554 @@
3465+/*
3466+ * This file is part of Checkbox
3467+ *
3468+ * Copyright 2013 Canonical Ltd.
3469+ *
3470+ * Authors:
3471+ * - Julia Segal <julia.segal@cellsoftware.co.uk>
3472+ *
3473+ * This program is free software; you can redistribute it and/or modify
3474+ * it under the terms of the GNU General Public License as published by
3475+ * the Free Software Foundation; version 3.
3476+ *
3477+ * This program is distributed in the hope that it will be useful,
3478+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3479+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3480+ * GNU General Public License for more details.
3481+ *
3482+ * You should have received a copy of the GNU General Public License
3483+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
3484+ */
3485+
3486+
3487+import QtQuick 2.0
3488+import QtQuick.LocalStorage 2.0
3489+import Ubuntu.Components 0.1
3490+import Ubuntu.Components.ListItems 0.1 as ListItem
3491+import Ubuntu.Components.Popups 0.1
3492+import "."
3493+
3494+
3495+
3496+Rectangle {
3497+ id: suitetestlist
3498+ color: Theme.palette.normal.background
3499+ height: parent.height - units.gu(3)
3500+ width: parent.width
3501+
3502+ function selectAll(sel) {
3503+ groupedList.selectAll(sel);
3504+ }
3505+
3506+ Flickable {
3507+ id: listflick
3508+ anchors.fill: parent
3509+ height: parent.height
3510+
3511+ clip: true
3512+ contentHeight: groupedList.height
3513+ boundsBehavior : Flickable.StopAtBounds
3514+
3515+ // Blue Highlight Bar
3516+ Component {
3517+ id: highlight
3518+ Rectangle {
3519+ width: groupedList.width
3520+ height: units.gu(7)
3521+ color: "lightsteelblue";
3522+ radius: 5
3523+ }
3524+
3525+ }
3526+
3527+ // The List of Tests
3528+ ListView {
3529+ id: groupedList
3530+ width: parent.width
3531+ height: units.gu(7) * (groupedList.count - groupedList.closedCount)
3532+ interactive: false
3533+ model: testListModel
3534+
3535+ // Tree view expansion/collapse support properties
3536+ property int sectionCount: 0// this will contain the number of sections
3537+ property int closedCount: 0 // this contains nuber of closed items
3538+ property bool displayWarnings: true
3539+ property var db: null
3540+
3541+ delegate: TestSelectionTestDelegate {}
3542+
3543+ highlight: highlight
3544+ highlightFollowsCurrentItem: true
3545+
3546+ // Runs when this ListView is fully initialised
3547+ Component.onCompleted: {
3548+ displayWarnings = getSetting('deselection_warning')!=0?true:false;
3549+ selectAll(true)
3550+ currentTestItem = testListModel.get(currentItem);
3551+ sectionCount = getSectionCount()
3552+ setListSummary();
3553+ }
3554+
3555+ function openDB() {
3556+ if(db !== null) return;
3557+
3558+ // db = LocalStorage.openDatabaseSync(identifier, version, description, estimated_size, callback(db))
3559+ db = LocalStorage.openDatabaseSync("ui_settings", "0.1", "UI LocalStorage", 1000);
3560+
3561+ try {
3562+ db.transaction(function(tx){
3563+ tx.executeSql('CREATE TABLE IF NOT EXISTS settings(key TEXT UNIQUE, value INTEGER)');
3564+ var table = tx.executeSql("SELECT * FROM settings");
3565+ // Seed the table with default values
3566+ if (table.rows.length == 0) {
3567+ tx.executeSql('INSERT INTO settings VALUES(?, ?)', ["deselection_warning", 1]);
3568+ };
3569+ });
3570+ } catch (err) {
3571+ console.log("Error creating table in database: " + err);
3572+ };
3573+ }
3574+
3575+ function saveSetting(key, value) {
3576+ openDB();
3577+ db.transaction( function(tx){
3578+ tx.executeSql('INSERT OR REPLACE INTO settings VALUES(?, ?)', [key, value]);
3579+ });
3580+ }
3581+
3582+ function getSetting(key) {
3583+ openDB();
3584+ var res = "";
3585+ db.transaction(function(tx) {
3586+ var rs = tx.executeSql('SELECT value FROM settings WHERE key=?;', [key]);
3587+ res = rs.rows.item(0).value;
3588+ });
3589+ return res;
3590+ }
3591+
3592+ function showWarning(caller_button){
3593+ displayWarnings = getSetting('deselection_warning')!=0?true:false;
3594+ if (displayWarnings === true)
3595+ PopupUtils.open(warning_dialog, caller_button);
3596+ }
3597+
3598+ // Select/De-select all items - Called from TestSelectionView.qml
3599+ function selectAll(sel){
3600+
3601+ // show the warning if sel is false
3602+ if(!sel) {
3603+ showWarning(groupedList);
3604+ }
3605+
3606+ for (var i = testListModel.count - 1; i >=0; i--)
3607+ testListModel.setProperty(i, "check", sel);
3608+
3609+ // make sure the UI is updated
3610+ var oldCurrent = currentIndex
3611+ currentIndex = -1
3612+ for (var j = 0; j < groupedList.contentItem.children.length; j++){
3613+ var curItem = groupedList.contentItem.children[j];
3614+ curItem.checked = sel;
3615+ }
3616+ currentIndex = oldCurrent
3617+
3618+ // reset the summary
3619+ setListSummary()
3620+ }
3621+
3622+
3623+ // when a group item is checked/unchecked the subitems are checked/unchecked
3624+ function selectGroup(groupName, sel){
3625+ // select in the model
3626+ for (var i = testListModel.count - 1; i >=0; i--){
3627+ var item = testListModel.get(i);
3628+ if (item.group === groupName)
3629+ testListModel.setProperty(i, "check", sel);
3630+ }
3631+
3632+ // make sure data is updated on the UI
3633+ var oldCurrent = currentIndex
3634+ currentIndex = -1
3635+ for (var i = 0; i < groupedList.contentItem.children.length; i++)
3636+ {
3637+ var curItem = groupedList.contentItem.children[i];
3638+ if (curItem.groupname === groupName)
3639+ curItem.checked = sel;
3640+ }
3641+ currentIndex = oldCurrent
3642+ setListSummary()
3643+ }
3644+
3645+ // determines if one or more subitems are checked
3646+ // if at least one subitem is checked, the group is checked
3647+ function setGroupCheck(item_id){
3648+ var oldCurrent = currentIndex
3649+ currentIndex = -1
3650+
3651+ // We need to find the index for the item passed in as item_id
3652+ for (var i = 0; i < groupedList.contentItem.children.length; i++) {
3653+
3654+ // cI = The item which was clicked by the user
3655+ var cI = groupedList.contentItem.children[i];
3656+ var cI_depth = cI.my_depth;
3657+
3658+ if (cI === item_id) {
3659+ /* Branch rules:
3660+
3661+ Branch: Set
3662+ Set all the leaves below us
3663+
3664+ Branch: Un-set
3665+ Un-set all the leaves below us
3666+ */
3667+ for (var j = i+1; j < groupedList.contentItem.children.length; j++) {
3668+
3669+ // check this item has a greater depth than the top item
3670+ var cur_depth = groupedList.contentItem.children[j].my_depth;
3671+
3672+ // Should we check this item?
3673+ if (cI_depth < cur_depth) {
3674+ // Yes, because its deeper
3675+ var thisItem = groupedList.contentItem.children[j];
3676+ thisItem.checked = cI.checked;
3677+ } else {
3678+ // we've reached the end of this branch, so stop
3679+ break;
3680+ }
3681+ }
3682+
3683+ /* Leaf rules
3684+
3685+ Leaf: Set
3686+ If any branch above us is unchecked, we must set it.
3687+
3688+ Leaf: Un-set
3689+ If all the leaves at this level are unchecked, we uncheck
3690+ the containing branch above us.
3691+ */
3692+
3693+ // Leaf set case. i is the current item index
3694+ /* we go up each level and check the box */
3695+ var interim_depth = cI_depth; // Track progress to the top
3696+
3697+ if (cI.checked) {
3698+ for (var j=i-1; j >= 0 ; j--) {
3699+ // We are going UP the list/tree now
3700+ var thisItem = groupedList.contentItem.children[j];
3701+ var cur_depth = thisItem.my_depth;
3702+
3703+ if (cur_depth < interim_depth) {
3704+ // we have gone up another level
3705+ interim_depth--;
3706+
3707+ // lets check this item
3708+ thisItem.checked = true;
3709+ }
3710+
3711+ // Have we reached the top-most branch?
3712+ if (cur_depth === 0) {
3713+ // We dont need to go any further
3714+ break; // end of for(j)
3715+ }
3716+ }
3717+ } else {
3718+ // Un set rule
3719+ // recursive: Update parent
3720+ updateBranchSelection(i);
3721+ }
3722+ }
3723+ }
3724+ currentIndex = oldCurrent;
3725+ }
3726+
3727+ /* Updates the item and child items based on whether it has
3728+ selected children.
3729+
3730+ Arguments:
3731+ item_index - Index into groupedList.contentItem.children[]
3732+
3733+ */
3734+ function updateBranchSelection(item_index) {
3735+ // The starting point (generally the root branch)
3736+ var curItem = groupedList.contentItem.children[item_index]
3737+ var cI_depth = curItem.my_depth;
3738+
3739+ // Avoid bad arguments
3740+ if (item_index < 0) {
3741+ return false;
3742+ }
3743+
3744+ // We dont need to do anything if its a root node
3745+ if (cI_depth === 0) {
3746+ return;
3747+ }
3748+
3749+ // we assume its not checked
3750+ var result = false;
3751+
3752+ /* Find the bottommost item at this level.
3753+ then, go up until the depth goes down by one. Then update that
3754+ item.
3755+
3756+ Example Tree as follows:
3757+
3758+ ...
3759+ [*] <- top_Index computed below
3760+ [ ] <- Newly unchecked item suppiled as item_Index
3761+ [*]
3762+ [ ]
3763+ [ ] <- bottom_Index computed below
3764+ [ ]
3765+ ...
3766+ */
3767+
3768+ // Find bottom_Index
3769+ var bottom_Index = item_index;
3770+ for (var i = item_index+1; i < groupedList.contentItem.children.length; i++) {
3771+ var this_Item = groupedList.contentItem.children[i];
3772+ var tI_depth = this_Item.my_depth;
3773+
3774+ // Have we reached the bottom of the tree?
3775+ if (tI_depth < cI_depth) {
3776+ bottom_Index = i;
3777+ break;
3778+ }
3779+
3780+ // Is this a root node?
3781+ if (tI_depth === 0) {
3782+ bottom_Index = i;
3783+ break;
3784+ }
3785+ }
3786+
3787+ /* we should move up bottom_Index to be the bottom of our tree
3788+ * and not the start of the next tree
3789+ */
3790+ bottom_Index--;
3791+
3792+ /* top_Index is checked if _anything above bottom_Index
3793+ * is selected.
3794+ */
3795+ var result = false; // assume its unchecked
3796+ var top_Index = item_index;
3797+ for(var i = bottom_Index; i>=0; i--) {
3798+ // have we reached the branch holding these children?
3799+ if (groupedList.contentItem.children[i].my_depth < cI_depth) {
3800+ // yes
3801+ top_Index = i;
3802+ break;
3803+ }
3804+
3805+ if (groupedList.contentItem.children[i].checked ) {
3806+ result = true; // at least one item is true
3807+ }
3808+ }
3809+
3810+ // Now update the checked status of this box
3811+ groupedList.contentItem.children[top_Index].checked = result;
3812+
3813+ // Now, if we havent reached the root, do the next level
3814+ if (groupedList.contentItem.children[top_Index].my_depth >0 ) {
3815+ updateBranchSelection(top_Index);
3816+ }
3817+ }
3818+
3819+ // Update the underlying model based on the UI display of check/uncheck items
3820+ function updateListModel() {
3821+
3822+ // do it for each item
3823+ for (var i=0; i < groupedList.contentItem.children.length; i++) {
3824+ var thisItem = groupedList.contentItem.children[i];
3825+ var sel = thisItem.checked;
3826+
3827+ testListModel.setProperty(i, "check", sel);
3828+ }
3829+ }
3830+
3831+ // Add up all the selected tests in a group
3832+ // FIXME: function unused, See comment in qml/TestSelectionSuiteDelegate.qml
3833+ function getEstimatedTime(section){
3834+ var estTimeStr = "";
3835+ var estTimeInt=0;
3836+ var foundGroup = false; // list is ordered in groups, after whole group found return
3837+
3838+ for (var i = 0; i <testListModel.count; i++)
3839+ {
3840+ var curItem = testListModel.get(i);
3841+
3842+ if (curItem.group === section && curItem.check === "true"){
3843+ foundGroup = true;
3844+ estTimeInt = parseInt(curItem.duration) + parseInt(estTimeInt);
3845+ }
3846+ if (foundGroup && curItem.group != section)
3847+ i = testListModel.count;
3848+
3849+ }
3850+ if (estTimeInt == 0)
3851+ estTimeStr = "";
3852+ else if (estTimeInt/60 < 1)
3853+ // TRANSLATORS: min here stands for minute, not minimum.
3854+ estTimeStr = i18n.tr("< 1 min");
3855+ else {
3856+ var durMinutes = Math.round(estTimeInt/60);
3857+ // TRANSLATORS: min here stands for minute, not minimum.
3858+ estTimeStr = durMinutes.toString() + i18n.tr(" min");
3859+ }
3860+ return estTimeStr;
3861+ }
3862+
3863+ // Open/Close groups
3864+ function openShutSubgroup(item_id, sel){
3865+ var oldCurrent = currentIndex;
3866+ currentIndex = -1
3867+
3868+ // We need to find the index for the item passed in as item_id
3869+ for (var i = 0; i < groupedList.contentItem.children.length; i++)
3870+ {
3871+ var cI = groupedList.contentItem.children[i];
3872+
3873+ var cI_depth = cI.my_depth;
3874+
3875+ if (cI === item_id) {
3876+ // ok, so now we hide/make visible the remaining items
3877+ // which have a depth greater than our current depth
3878+
3879+ for (var j = i+1; j < groupedList.contentItem.children.length; j++) {
3880+ // check this item has a greater depth than the top item
3881+ var cur_depth = groupedList.contentItem.children[j].my_depth;
3882+
3883+ // Should we hide this item?
3884+ if (cI_depth < cur_depth) {
3885+ // Yes, because its clearly deeper
3886+ var hideItem = groupedList.contentItem.children[j];
3887+ hideItem.visible = sel;
3888+ hideItem.height = sel? units.gu(7):units.gu(0);
3889+ if (sel)
3890+ closedCount--;
3891+ else
3892+ closedCount++;
3893+
3894+ } else {
3895+ // we must have reached the end, so return
3896+ return;
3897+ }
3898+ }
3899+
3900+ }
3901+ }
3902+ currentIndex = oldCurrent;
3903+ }
3904+
3905+ // Update List Summary
3906+ function updateListSummary(testItem, sel){
3907+ if (sel){
3908+ totalTests += 1;
3909+ if (testItem.type === "Manual")
3910+ totalManualTests += 1;
3911+ }
3912+ else {
3913+ totalTests -= 1;
3914+ if (testItem.type === "Manual")
3915+ totalManualTests -= 1
3916+ }
3917+ }
3918+
3919+ // Set List Summary
3920+ function setListSummary(){
3921+ var start = new Date();
3922+
3923+ // TODO count how many manuals testListModel
3924+ var testCnt = 0;
3925+ var manualCnt = 0;
3926+
3927+ var estTimeInt=0;
3928+
3929+ // We count from the bottom up, and we dont count anything
3930+ // that is a "branch" as this is a local/group kind of thing
3931+ for (var i = testListModel.count - 1; i >=0; i--)
3932+ {
3933+ var curItem = testListModel.get(i);
3934+ // is it a branch? if so we dont count it
3935+ if (curItem.branch === "0") {
3936+ // not a branch
3937+ if ( curItem.check === "true"){
3938+ testCnt++;
3939+ if (curItem.type === "Manual")
3940+ manualCnt++;
3941+ estTimeInt = parseInt(curItem.duration) + parseInt(estTimeInt);
3942+ }
3943+ }
3944+ }
3945+ totalTests = testCnt;
3946+ totalManualTests = manualCnt;
3947+
3948+ /* We should call into guiengine to find out the number of
3949+ * implicit tests (really we will get a count of ALL of them...
3950+ */
3951+
3952+ // Ok, we shouldnt need to do this tooo often!
3953+
3954+ // Update the really selected testsuitelist
3955+ testitemFactory.GetSelectedRealJobs(testListModel);
3956+
3957+ // Mark all the jobs for one run-through
3958+ testitemFactory.GetSelectedRerunJobs(testListModel);
3959+
3960+ /* Ensure the gui-engine stores the list of visible tests as
3961+ * as they will be needed when the gui is resumed from a saved
3962+ * session.
3963+ */
3964+ testitemFactory.GetSelectedVisibleJobs(testListModel);
3965+
3966+ // Prep the jobs (we cant start them without this)
3967+ var total_generated_tests = guiEngine.PrepareJobs();
3968+
3969+ // All the above lets us count the number of real jobs
3970+ totalImplicitTests = total_generated_tests - totalTests;
3971+
3972+ // Not strictly needed here
3973+ var end = new Date();
3974+ }
3975+
3976+ function getSectionCount(){
3977+ var start = new Date();
3978+ // if this is the first time called, find all sections
3979+ var secCnt = sectionCount
3980+ if (secCnt === 0){
3981+ var curItem = testListModel.get(0);
3982+ var curSec = curItem.group;
3983+ secCnt = 1;
3984+ for (var i = 1; i < testListModel.count; i++){
3985+ curItem = testListModel.get(i);
3986+ if (curItem.group !== curSec){
3987+ curSec = curItem.group
3988+ secCnt++;
3989+ }
3990+ }
3991+ }
3992+ var end = new Date();
3993+ return secCnt;
3994+ }
3995+ }
3996+ }
3997+
3998+ Scrollbar {
3999+ flickableItem: listflick
4000+ align: Qt.AlignTrailing
4001+ }
4002+
4003+ Component {
4004+ id: warning_dialog
4005+ WarningDialog{
4006+ text: i18n.tr("Deselecting tests may reduce your ability to detect potential problems with the device driver.");
4007+ showOK: true
4008+ showCancel: false
4009+ showContinue: false
4010+ showCheckbox: true
4011+
4012+ onOk: {
4013+ if (isChecked)
4014+ groupedList.saveSetting("deselection_warning", 0);
4015+ }
4016+ }
4017+ }
4018+}
4019
4020=== added file 'checkbox-gui/checkbox-gui/qml/TestSelectionSuiteDelegate.qml'
4021--- checkbox-gui/checkbox-gui/qml/TestSelectionSuiteDelegate.qml 1970-01-01 00:00:00 +0000
4022+++ checkbox-gui/checkbox-gui/qml/TestSelectionSuiteDelegate.qml 2014-03-20 14:51:45 +0000
4023@@ -0,0 +1,119 @@
4024+/*
4025+ * This file is part of Checkbox
4026+ *
4027+ * Copyright 2013 Canonical Ltd.
4028+ *
4029+ * Authors:
4030+ * - Julia Segal <julia.segal@cellsoftware.co.uk>
4031+ *
4032+ * This program is free software; you can redistribute it and/or modify
4033+ * it under the terms of the GNU General Public License as published by
4034+ * the Free Software Foundation; version 3.
4035+ *
4036+ * This program is distributed in the hope that it will be useful,
4037+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4038+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4039+ * GNU General Public License for more details.
4040+ *
4041+ * You should have received a copy of the GNU General Public License
4042+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
4043+ */
4044+
4045+
4046+import QtQuick 2.0
4047+import Ubuntu.Components 0.1
4048+import Ubuntu.Components.ListItems 0.1 as ListItem
4049+import "."
4050+
4051+Component {
4052+ id: groupDelegate
4053+
4054+
4055+ Item {
4056+ id: itemdelegate
4057+ width: parent.width
4058+ height: units.gu(7)
4059+
4060+ property string groupname: section
4061+ property alias checked: groupcheckbox.checked
4062+ property string labelname: section
4063+ property bool open: true
4064+
4065+ onOpenChanged: {
4066+ open?openshutIcon.source = "artwork/DownArrow.png":openshutIcon.source = "artwork/RightArrow.png"
4067+ }
4068+
4069+ MouseArea {
4070+ width: parent.width// - groupcheckbox.width
4071+ height: parent.height
4072+ anchors.right: parent.right
4073+
4074+ onClicked: {
4075+ itemdelegate.open = !itemdelegate.open
4076+ groupedList.openShutSubgroup(section, itemdelegate.open)
4077+ }
4078+ }
4079+
4080+ Item {
4081+ id: groupfiller
4082+ width: units.gu(2)
4083+ }
4084+
4085+ Image {
4086+ id: openshutIcon
4087+ source: "artwork/DownArrow.png"
4088+ width: units.gu(2)
4089+ height: units.gu(2)
4090+ anchors {
4091+ verticalCenter: parent.verticalCenter
4092+ left: groupfiller.left
4093+ }
4094+
4095+ opacity: enabled ? 1.0 : 0.5
4096+ }
4097+
4098+ CheckBox {
4099+ id: groupcheckbox
4100+ anchors.verticalCenter: parent.verticalCenter
4101+ anchors.left: openshutIcon.right
4102+ anchors.leftMargin: units.gu(1)
4103+ checked: true
4104+ onClicked: {
4105+ groupedList.selectGroup(section, checked)
4106+ if (!checked)
4107+ groupedList.showWarning(groupcheckbox);
4108+ }
4109+ }
4110+
4111+
4112+ Text {
4113+ id: grouptext
4114+ text: section
4115+ width: units.gu(20)
4116+ anchors.verticalCenter: parent.verticalCenter
4117+ anchors.left: groupcheckbox.right
4118+ anchors.leftMargin: units.gu(1)
4119+ }
4120+
4121+ Item {
4122+ id: estfiller
4123+ width: units.gu(38)
4124+ anchors.left: grouptext.right
4125+ }
4126+
4127+ Text {
4128+ id: estimatedTimeText
4129+ text: "Unknown" // ajh - to do - this is very slow AND inconsistent groupedList.getEstimatedTime(section)
4130+ width: units.gu(10)
4131+ anchors.left: estfiller.right
4132+ anchors.verticalCenter: parent.verticalCenter
4133+ horizontalAlignment: Text.AlignHCenter
4134+ color: "green"
4135+ font.bold : true
4136+ }
4137+
4138+
4139+
4140+ ListItem.ThinDivider {}
4141+ }
4142+}
4143
4144=== added file 'checkbox-gui/checkbox-gui/qml/TestSelectionTestDelegate.qml'
4145--- checkbox-gui/checkbox-gui/qml/TestSelectionTestDelegate.qml 1970-01-01 00:00:00 +0000
4146+++ checkbox-gui/checkbox-gui/qml/TestSelectionTestDelegate.qml 2014-03-20 14:51:45 +0000
4147@@ -0,0 +1,173 @@
4148+/*
4149+ * This file is part of Checkbox
4150+ *
4151+ * Copyright 2013 Canonical Ltd.
4152+ *
4153+ * Authors:
4154+ * - Julia Segal <julia.segal@cellsoftware.co.uk>
4155+ * - Andrew Haigh <andrew.haigh@cellsoftware.co.uk>
4156+ *
4157+ * This program is free software; you can redistribute it and/or modify
4158+ * it under the terms of the GNU General Public License as published by
4159+ * the Free Software Foundation; version 3.
4160+ *
4161+ * This program is distributed in the hope that it will be useful,
4162+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4163+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4164+ * GNU General Public License for more details.
4165+ *
4166+ * You should have received a copy of the GNU General Public License
4167+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
4168+ */
4169+
4170+
4171+import QtQuick 2.0
4172+import Ubuntu.Components 0.1
4173+import Ubuntu.Components.ListItems 0.1 as ListItem
4174+import "./artwork"
4175+
4176+/* In order to simulate a tree with ListView, we end up having to embed some knowledge
4177+ in the display component and the underlying model. Qt 5.1 was meant to have a QML TreeView
4178+ but it doesnt seem to have transpired :(
4179+
4180+ */
4181+
4182+Component {
4183+ id: testDelegate
4184+
4185+ Item{
4186+ id: testitem
4187+ width: parent.width
4188+ height: units.gu(7)
4189+
4190+ property string groupname: group
4191+ property alias checked: itemcheckbox.checked
4192+ property string labelname: testname
4193+
4194+ // These properties help to simulate the treeview
4195+ property bool open: true
4196+ property bool is_branch: branch
4197+ property int my_depth: depth
4198+
4199+ // Select the highlight area
4200+ MouseArea {
4201+ id: selecthighlight
4202+ anchors.fill: parent
4203+
4204+ onClicked: {
4205+ currentTestItem = testListModel.get(index);
4206+ groupedList.currentIndex = index;
4207+ }
4208+ }
4209+
4210+ onOpenChanged: {
4211+ open?openshutIcon.source = "artwork/DownArrow.png":openshutIcon.source = "artwork/RightArrow.png"
4212+ }
4213+
4214+ Item {
4215+ anchors.fill: parent
4216+
4217+ Item {
4218+ id: filler
4219+
4220+ // this is our indentation level. we get this out of the model
4221+ width: (depth * itemcheckbox.width) + units.gu(2)
4222+ }
4223+
4224+ Image {
4225+ id: openshutIcon
4226+ source: "artwork/DownArrow.png"
4227+ width: units.gu(2)
4228+ height: units.gu(2)
4229+ anchors {
4230+ verticalCenter: parent.verticalCenter
4231+ left: filler.right
4232+ }
4233+
4234+ opacity: enabled ? 1.0 : 0.5
4235+
4236+ visible: is_branch
4237+ enabled: is_branch
4238+
4239+ MouseArea {
4240+ id: openshutbutton
4241+ anchors.fill: parent
4242+
4243+ onClicked: {
4244+ testitem.open = !testitem.open
4245+ groupedList.openShutSubgroup(testitem, testitem.open)
4246+ }
4247+ }
4248+ }
4249+
4250+ CheckBox {
4251+ id: itemcheckbox
4252+ anchors.verticalCenter: parent.verticalCenter
4253+ anchors.left: openshutIcon.right
4254+ anchors.leftMargin: units.gu(2)
4255+ checked: check
4256+ onClicked: {
4257+ // Update the ListView (display)
4258+ groupedList.setGroupCheck(testitem);
4259+
4260+ // Update the underlying model
4261+ groupedList.updateListModel();
4262+
4263+ // Update the summary bar at the bottom of TestSelectionView
4264+
4265+ groupedList.setListSummary();
4266+
4267+
4268+ // Warn the user if they are de-selecting tests
4269+ if (!checked)
4270+ groupedList.showWarning(itemcheckbox);
4271+ testsuitelist.ensure_one_selection()
4272+ }
4273+ }
4274+
4275+ Text {
4276+ id: nameLabel
4277+ text: testname
4278+ elide: Text.ElideRight
4279+
4280+ anchors.verticalCenter: parent.verticalCenter
4281+
4282+ anchors.left: itemcheckbox.right
4283+ anchors.leftMargin: units.gu(2)
4284+
4285+ anchors.right: typelabel.left
4286+ anchors.rightMargin: units.gu(2)
4287+ }
4288+
4289+ Text {
4290+ id: typelabel
4291+ text: type
4292+ width: units.gu(6)
4293+
4294+ anchors.right: esttimelabel.left
4295+ anchors.rightMargin: units.gu(6)
4296+
4297+ anchors.verticalCenter: parent.verticalCenter
4298+
4299+ horizontalAlignment: Text.AlignHCenter
4300+
4301+ }
4302+
4303+ Text {
4304+ id: esttimelabel
4305+ text: formatTotalTime(duration)
4306+ width: units.gu(6)
4307+
4308+ anchors.right: parent.right
4309+ anchors.rightMargin: units.gu(6)
4310+
4311+ anchors.verticalCenter: parent.verticalCenter
4312+
4313+ horizontalAlignment: Text.AlignHCenter
4314+ }
4315+ }
4316+
4317+ // Item dividing line
4318+ ListItem.ThinDivider {}
4319+ }
4320+}
4321
4322=== added file 'checkbox-gui/checkbox-gui/qml/TestSelectionView.qml'
4323--- checkbox-gui/checkbox-gui/qml/TestSelectionView.qml 1970-01-01 00:00:00 +0000
4324+++ checkbox-gui/checkbox-gui/qml/TestSelectionView.qml 2014-03-20 14:51:45 +0000
4325@@ -0,0 +1,277 @@
4326+/*
4327+ * This file is part of Checkbox
4328+ *
4329+ * Copyright 2013 Canonical Ltd.
4330+ *
4331+ * Authors:
4332+ * - Julia Segal <julia.segal@cellsoftware.co.uk>
4333+ * - Sylvain Pineau <sylvain.pineau@canonical.com>
4334+ *
4335+ * This program is free software; you can redistribute it and/or modify
4336+ * it under the terms of the GNU General Public License as published by
4337+ * the Free Software Foundation; version 3.
4338+ *
4339+ * This program is distributed in the hope that it will be useful,
4340+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4341+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4342+ * GNU General Public License for more details.
4343+ *
4344+ * You should have received a copy of the GNU General Public License
4345+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
4346+ */
4347+
4348+
4349+import QtQuick 2.0
4350+import Ubuntu.Components 0.1
4351+import Ubuntu.Components.Popups 0.1
4352+import Ubuntu.Layouts 0.1
4353+import Ubuntu.Components.ListItems 0.1 as ListItem
4354+import "."
4355+
4356+
4357+Page {
4358+ title: i18n.tr("Choose tests to run on your system:")
4359+
4360+ property var currentTestItem;
4361+ property int totalTests: 6
4362+ property int totalManualTests: 2
4363+ property int totalImplicitTests: 999
4364+
4365+ Item { // puts a space at the top
4366+ id: filler
4367+ height: units.gu(0)
4368+ anchors {
4369+ left: parent.left
4370+ top: parent.top
4371+ }
4372+ }
4373+
4374+ function formatTotalTime(s){
4375+ var estTimeStr = ""
4376+ if (s == 0)
4377+ estTimeStr = "0 min";
4378+ else if (s < 0)
4379+ estTimeStr = "N/A";
4380+ else if (s / 60 < 1)
4381+ estTimeStr = "< 1 min";
4382+ else if (Math.round(s / 60) < 60){
4383+ var durMinutes = Math.round(s / 60);
4384+ estTimeStr = durMinutes.toString() + " min";
4385+ }
4386+ else {
4387+ var hr = Math.round(s / (60 * 60));
4388+ s -= hr * (60 * 60);
4389+ estTimeStr = hr + " h " + Math.round(s / 60) + " min"
4390+ }
4391+ return estTimeStr;
4392+ }
4393+
4394+ function validTotalTime(total_duration){
4395+ return Object.keys(total_duration).map(function (key) {return total_duration[key]}).indexOf(-1)
4396+ }
4397+
4398+ // Test List Header Bar
4399+ Item {
4400+ id: testlistheaders
4401+ width: parent.width - units.gu(4)
4402+ height: units.gu(3)
4403+
4404+ anchors {
4405+ horizontalCenter: parent.horizontalCenter
4406+ top: filler.bottom
4407+ margins: units.gu(2)
4408+ }
4409+
4410+ Text {
4411+ id: complabel
4412+ text: i18n.tr("Components")
4413+ font.bold: true
4414+ anchors.left: parent.left
4415+ anchors.leftMargin: units.gu(6)
4416+ anchors.right: typelabel.left
4417+ anchors.rightMargin: units.gu(2)
4418+ }
4419+
4420+ Text {
4421+ id: typelabel
4422+ text: i18n.tr("Type")
4423+ font.bold: true
4424+ width: units.gu(6)
4425+ anchors.right: esttimelabel.left
4426+ anchors.rightMargin: units.gu(6)
4427+ horizontalAlignment: Text.AlignHCenter
4428+ }
4429+
4430+ Text {
4431+ id: esttimelabel
4432+ text: i18n.tr("Estimated Time")
4433+ font.bold: true
4434+ width: units.gu(6)
4435+ anchors.right: parent.right
4436+ anchors.rightMargin: units.gu(6)
4437+ horizontalAlignment: Text.AlignHCenter
4438+ }
4439+ }
4440+
4441+ // List of actual Tests.
4442+ TestSelectionListView {
4443+ id: testsuitelist
4444+ width: testlistheaders.width
4445+
4446+ anchors{
4447+ horizontalCenter: parent.horizontalCenter
4448+ top: testlistheaders.bottom
4449+ }
4450+
4451+ // At least one test MUST be selected
4452+ function ensure_one_selection() {
4453+ var one_selection = false;
4454+ for (var i = testListModel.count - 1; i >= 0; i--){
4455+ var item = testListModel.get(i);
4456+ if (item.check === "true") {
4457+ one_selection = true;
4458+ }
4459+ }
4460+
4461+ // If nothing is selected, disable the ok button
4462+ startTesting.enabled = one_selection
4463+ }
4464+ }
4465+
4466+ Component {
4467+ id: details_dialog
4468+ // Test Details (Properties)
4469+ TestSelectionDetails {
4470+ id: testdetails
4471+ }
4472+ }
4473+
4474+ // Select All, Deselect All, Start Testing Buttons
4475+ tools: ToolbarItems {
4476+ back: Row {
4477+ anchors {
4478+ verticalCenter: parent.verticalCenter
4479+ }
4480+ spacing: units.gu(1)
4481+ Button {
4482+ id: infoButton
4483+ text: i18n.tr("Info")
4484+ color: UbuntuColors.lightAubergine
4485+ onClicked: {
4486+ PopupUtils.open(actionSelectionPopover, infoButton)
4487+ }
4488+ }
4489+ Button {
4490+ id:selectButton
4491+ text: i18n.tr("Select All")
4492+ color: UbuntuColors.coolGrey
4493+ width: units.gu(18)
4494+ onClicked: {
4495+ testsuitelist.selectAll(true)
4496+ testsuitelist.ensure_one_selection()
4497+ }
4498+ }
4499+ Button {
4500+ id: deselectButton
4501+ text: i18n.tr("Deselect All")
4502+ color: UbuntuColors.coolGrey
4503+ width: units.gu(18)
4504+ onClicked: {
4505+ testsuitelist.selectAll(false)
4506+ testsuitelist.ensure_one_selection()
4507+ }
4508+ }
4509+ }
4510+ Row {
4511+ anchors {
4512+ verticalCenter: parent.verticalCenter
4513+ }
4514+ Button {
4515+ id: startTesting
4516+ text: i18n.tr("Start Testing")
4517+ width: units.gu(18)
4518+ onClicked: {
4519+ mainView.state = "RUNMANAGER"
4520+
4521+ }
4522+ }
4523+ }
4524+ locked: true
4525+ opened: true
4526+ }
4527+
4528+ Component {
4529+ id: actionSelectionPopover
4530+ ActionSelectionPopover {
4531+ callerMargin: units.gu(1)
4532+ contentWidth: units.gu(15)
4533+ actions: ActionList {
4534+ Action {
4535+ text: i18n.tr("Selection Stats")
4536+ onTriggered: {
4537+ PopupUtils.open(stats_dialog)
4538+ }
4539+ }
4540+ Action {
4541+ text: i18n.tr("Test Details")
4542+ onTriggered: PopupUtils.open(details_dialog)
4543+ }
4544+ }
4545+ }
4546+ }
4547+ Component {
4548+ id: stats_dialog
4549+ Dialog{
4550+ id: dialog
4551+ title: i18n.tr("Selection Stats")
4552+ property var total_duration: guiEngine.GetEstimatedDuration();
4553+ Rectangle {
4554+ id: statrect
4555+ color: "transparent"
4556+ height: statrow.height + okButton.height
4557+ Row {
4558+ id: statrow
4559+ anchors.horizontalCenter: parent.horizontalCenter
4560+ spacing: units.gu(4)
4561+ Column {
4562+ id: col1
4563+ Label {text: i18n.tr("Total tests");fontSize: "large"; color: "white"}
4564+ Label {text: i18n.tr("Selected")}
4565+ Label {text: i18n.tr("Manual")}
4566+ Label {text: i18n.tr("Implicit")}
4567+ Label {text: " "; fontSize: "large"}
4568+ Label {text: i18n.tr("Estimated time"); fontSize: "large"; color: "white"}
4569+ Label {text: i18n.tr("Automated")}
4570+ Label {text: i18n.tr("Manual")}
4571+ }
4572+ Column {
4573+ id: col2
4574+ Label {
4575+ text: (parseInt(totalTests) + parseInt(totalImplicitTests));
4576+ anchors.right: col2.right;
4577+ fontSize: "large"; color: "white"
4578+ }
4579+ Label {text: totalTests; anchors.right: col2.right}
4580+ Label {text: totalManualTests; anchors.right: col2.right}
4581+ Label {text: totalImplicitTests; anchors.right: col2.right}
4582+ Label {text: " "; fontSize: "large"}
4583+ Label {
4584+ text: validTotalTime(total_duration)?formatTotalTime(total_duration["automated_duration"] + total_duration["manual_duration"]):"N/A";
4585+ anchors.right: col2.right;
4586+ fontSize: "large"; color: "white"
4587+ }
4588+ Label {text: formatTotalTime(total_duration["automated_duration"]); anchors.right: col2.right}
4589+ Label {text: formatTotalTime(total_duration["manual_duration"]); anchors.right: col2.right}
4590+ }
4591+ }
4592+ }
4593+ Button {
4594+ id: okButton
4595+ text: i18n.tr("Back")
4596+ onClicked: {
4597+ PopupUtils.close(dialog);
4598+ }
4599+ }
4600+ }
4601+ }
4602+}
4603
4604=== added file 'checkbox-gui/checkbox-gui/qml/WarningDialog.qml'
4605--- checkbox-gui/checkbox-gui/qml/WarningDialog.qml 1970-01-01 00:00:00 +0000
4606+++ checkbox-gui/checkbox-gui/qml/WarningDialog.qml 2014-03-20 14:51:45 +0000
4607@@ -0,0 +1,102 @@
4608+/*
4609+ * This file is part of Checkbox
4610+ *
4611+ * Copyright 2013 Canonical Ltd.
4612+ *
4613+ * Authors:
4614+ * - Julia Segal <julia.segal@cellsoftware.co.uk>
4615+ *
4616+ * This program is free software; you can redistribute it and/or modify
4617+ * it under the terms of the GNU General Public License as published by
4618+ * the Free Software Foundation; version 3.
4619+ *
4620+ * This program is distributed in the hope that it will be useful,
4621+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4622+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4623+ * GNU General Public License for more details.
4624+ *
4625+ * You should have received a copy of the GNU General Public License
4626+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
4627+ */
4628+
4629+
4630+import QtQuick 2.0
4631+import Ubuntu.Components 0.1
4632+import Ubuntu.Components.Popups 0.1
4633+
4634+
4635+Dialog {
4636+ id: dialog
4637+ signal ok
4638+ signal cancel
4639+ signal cont
4640+
4641+ property alias title: dialog.title
4642+ property alias text: dialog.text
4643+ property alias showOK: okButton.visible
4644+ property alias showContinue: continueButton.visible
4645+ property alias showCancel: cancelButton.visible
4646+ property alias showCheckbox: checkboxitem.visible
4647+ property alias isChecked: checkbox.checked
4648+
4649+
4650+ title: i18n.tr("Warning!")
4651+ text: i18n.tr("Change me to a real warning.")
4652+
4653+
4654+ Item {
4655+ id: checkboxitem
4656+ width: childrenRect.width
4657+ height: childrenRect.height
4658+
4659+ CheckBox {
4660+ id: checkbox
4661+ }
4662+
4663+ Label {
4664+ id: checkbox_label
4665+ text: i18n.tr("Do not show this warning again.")
4666+ fontSize: "small"
4667+ color: "white"
4668+ anchors.left: checkbox.right
4669+ anchors.leftMargin: 8
4670+ anchors.verticalCenter: checkbox.verticalCenter
4671+
4672+ MouseArea {
4673+ anchors.fill: parent
4674+ onClicked: {
4675+ checkbox.checked = !checkbox.checked
4676+ }
4677+ }
4678+ }
4679+
4680+ }
4681+
4682+ Button {
4683+ id: okButton
4684+ text: i18n.tr("OK")
4685+ color: UbuntuColors.orange
4686+ onClicked: {
4687+ ok();
4688+ PopupUtils.close(dialog);
4689+ }
4690+ }
4691+ Button {
4692+ id: continueButton
4693+ text: i18n.tr("Continue")
4694+ color: UbuntuColors.orange
4695+ onClicked: {
4696+ cont()
4697+ PopupUtils.close(dialog)
4698+ }
4699+ }
4700+ Button {
4701+ id: cancelButton
4702+ text: i18n.tr("Cancel")
4703+ color: UbuntuColors.warmGrey
4704+ onClicked: {
4705+ cancel()
4706+ PopupUtils.close(dialog)
4707+ }
4708+ }
4709+}
4710
4711=== added file 'checkbox-gui/checkbox-gui/qml/WelcomeView.qml'
4712--- checkbox-gui/checkbox-gui/qml/WelcomeView.qml 1970-01-01 00:00:00 +0000
4713+++ checkbox-gui/checkbox-gui/qml/WelcomeView.qml 2014-03-20 14:51:45 +0000
4714@@ -0,0 +1,133 @@
4715+/*
4716+ * This file is part of Checkbox
4717+ *
4718+ * Copyright 2013 Canonical Ltd.
4719+ *
4720+ * Authors:
4721+ * - Julia Segal <julia.segal@cellsoftware.co.uk>
4722+ *
4723+ * This program is free software; you can redistribute it and/or modify
4724+ * it under the terms of the GNU General Public License as published by
4725+ * the Free Software Foundation; version 3.
4726+ *
4727+ * This program is distributed in the hope that it will be useful,
4728+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4729+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4730+ * GNU General Public License for more details.
4731+ *
4732+ * You should have received a copy of the GNU General Public License
4733+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
4734+ */
4735+
4736+
4737+import QtQuick 2.0
4738+import Ubuntu.Components 0.1
4739+
4740+
4741+Page {
4742+ id: welcomePage
4743+ title: settings.value("welcome/title", i18n.tr("System Testing"));
4744+
4745+ tools: ToolbarItems {
4746+ locked: true
4747+ opened: false
4748+ }
4749+
4750+ Image {
4751+ id: logo
4752+ anchors {
4753+ horizontalCenter: parent.horizontalCenter
4754+ margins: units.gu(2)
4755+ }
4756+ source:"artwork/checkbox-qt-head.png"
4757+ }
4758+
4759+ Rectangle {
4760+ id: logo_extend_left
4761+ color: "#3c3b3f" // matches the background colour of the logo
4762+ anchors.top: logo.top
4763+ anchors.bottom: logo.bottom
4764+ anchors.left: parent.left
4765+ anchors.right: logo.left
4766+ anchors.leftMargin: units.gu(2)
4767+ }
4768+
4769+ Rectangle {
4770+ id: logo_extend_right
4771+ color: "#3c3b3f" // matches the background colour of the logo
4772+ anchors.top: logo.top
4773+ anchors.bottom: logo.bottom
4774+ anchors.left: logo.right
4775+ anchors.right: parent.right
4776+ anchors.rightMargin: units.gu(2)
4777+ }
4778+
4779+ Rectangle{
4780+ color: "white"
4781+ clip: true
4782+ anchors {
4783+ left: parent.left
4784+ right: parent.right
4785+ top: logo.bottom
4786+ bottom: continueButton.top
4787+ margins: units.gu(2)
4788+ }
4789+
4790+ Flickable {
4791+ id: welcomeflick
4792+ anchors.fill: parent
4793+ contentHeight: parent.height
4794+ boundsBehavior: Flickable.StopAtBounds
4795+
4796+ TextEdit{
4797+ id: welcometext
4798+
4799+ anchors {
4800+ fill: parent
4801+ margins: units.gu(2)
4802+ }
4803+
4804+ // TRANSLATORS: The <p> tags are HTML - DO NOT translate them.
4805+ text: settings.value("welcome/text", i18n.tr("<p>Welcome to System Testing.</p><p></p><p>This program contains automated and manual tests to help you assess how well your system works with Ubuntu.</p><p></p><p>This application will step the user through these tests in a predetermined order and automatically collect both system information as well as test results. It will also prompt the user for input when manual testing is required.</p><p></p><p>The run time for the tests is determined by which tests you decide to execute. The user will have the opportunity to customize the test run based on the hardware components they are interested in and the amount of time they have available.</p><p></p><p>To begin, simply click the Continue button below and follow the onscreen instructions.</p><p></p>"))
4806+
4807+ height: units.gu(60)
4808+ width: units.gu(30)
4809+ cursorVisible : true
4810+ readOnly: true
4811+ selectByMouse : true
4812+ textFormat: TextEdit.AutoText
4813+ wrapMode: TextEdit.Wrap
4814+ color: "black"
4815+ selectedTextColor: Theme.palette.selected.foregroundText
4816+ selectionColor: Theme.palette.selected.foreground
4817+ font.pixelSize: FontUtils.sizeToPixels("medium")
4818+
4819+ onLinkActivated: {
4820+ Qt.openUrlExternally(link)
4821+ }
4822+ }
4823+ }
4824+
4825+ Scrollbar {
4826+ flickableItem: welcomeflick
4827+ align: Qt.AlignTrailing
4828+ }
4829+ }
4830+
4831+ Button {
4832+ id: continueButton
4833+ anchors{
4834+ left: parent.left
4835+ right: parent.right
4836+ bottom: parent.bottom
4837+ margins: units.gu(2)
4838+ }
4839+
4840+ text: i18n.tr("Continue")
4841+ color: UbuntuColors.lightAubergine
4842+ onClicked: {
4843+ // Move to the whitelist selection screen
4844+ mainView.state = "SUITESELECTION"
4845+ }
4846+ }
4847+}
4848
4849=== added file 'checkbox-gui/checkbox-gui/qml/WideDialog.qml'
4850--- checkbox-gui/checkbox-gui/qml/WideDialog.qml 1970-01-01 00:00:00 +0000
4851+++ checkbox-gui/checkbox-gui/qml/WideDialog.qml 2014-03-20 14:51:45 +0000
4852@@ -0,0 +1,79 @@
4853+/*
4854+ * This file is part of Checkbox
4855+ *
4856+ * Copyright 2012-2013 Canonical Ltd.
4857+ *
4858+ * Authors:
4859+ * - Sylvain Pineau <sylvain.pineau@canonical.com>
4860+ *
4861+ * This program is free software; you can redistribute it and/or modify
4862+ * it under the terms of the GNU Lesser General Public License as published by
4863+ * the Free Software Foundation; version 3.
4864+ *
4865+ * This program is distributed in the hope that it will be useful,
4866+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4867+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4868+ * GNU Lesser General Public License for more details.
4869+ *
4870+ * You should have received a copy of the GNU Lesser General Public License
4871+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
4872+ */
4873+
4874+import QtQuick 2.0
4875+import Ubuntu.Components 0.1
4876+import Ubuntu.Components.Popups 0.1
4877+
4878+PopupBase {
4879+ id: dialog
4880+ // See Dialog.qml
4881+ default property alias contents: contentsColumn.data
4882+ property alias title: foreground.title
4883+ property bool modal: true
4884+ // Cannot override FINAL property, so alias names have to be different
4885+ property alias dialogWidth: foreground.width
4886+ property alias dialogHeight: foreground.height
4887+
4888+ __foreground: foreground
4889+ __eventGrabber.enabled: modal
4890+ __dimBackground: modal
4891+ fadingAnimation: UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration }
4892+
4893+ StyledItem {
4894+ id: foreground
4895+ // Default settings, the Dialog will take the full MainView size
4896+ width: parent.width
4897+ height: parent.height
4898+ anchors.centerIn: parent
4899+
4900+ // used by the style
4901+ property string title
4902+ property real margins: units.gu(2)
4903+ property Item dismissArea: dialog.dismissArea
4904+
4905+ Item {
4906+ id: contentsColumn
4907+ anchors {
4908+ fill: parent
4909+ margins: foreground.margins
4910+ }
4911+ onWidthChanged: updateChildrenWidths();
4912+
4913+ Label {
4914+ horizontalAlignment: Text.AlignHCenter
4915+ text: dialog.title
4916+ fontSize: "large"
4917+ color: Qt.rgba(1, 1, 1, 0.9)
4918+ }
4919+
4920+ onChildrenChanged: updateChildrenWidths()
4921+
4922+ function updateChildrenWidths() {
4923+ for (var i = 0; i < children.length; i++) {
4924+ children[i].width = contentsColumn.width;
4925+ }
4926+ }
4927+ }
4928+
4929+ style: Theme.createStyleComponent("DialogForegroundStyle.qml", foreground)
4930+ }
4931+}
4932
4933=== added directory 'checkbox-gui/checkbox-gui/qml/artwork'
4934=== added file 'checkbox-gui/checkbox-gui/qml/artwork/DownArrow@8.png'
4935Binary files checkbox-gui/checkbox-gui/qml/artwork/DownArrow@8.png 1970-01-01 00:00:00 +0000 and checkbox-gui/checkbox-gui/qml/artwork/DownArrow@8.png 2014-03-20 14:51:45 +0000 differ
4936=== added file 'checkbox-gui/checkbox-gui/qml/artwork/LeftArrow@8.png'
4937Binary files checkbox-gui/checkbox-gui/qml/artwork/LeftArrow@8.png 1970-01-01 00:00:00 +0000 and checkbox-gui/checkbox-gui/qml/artwork/LeftArrow@8.png 2014-03-20 14:51:45 +0000 differ
4938=== added file 'checkbox-gui/checkbox-gui/qml/artwork/ListItemProgressionArrow@8.png'
4939Binary files checkbox-gui/checkbox-gui/qml/artwork/ListItemProgressionArrow@8.png 1970-01-01 00:00:00 +0000 and checkbox-gui/checkbox-gui/qml/artwork/ListItemProgressionArrow@8.png 2014-03-20 14:51:45 +0000 differ
4940=== added file 'checkbox-gui/checkbox-gui/qml/artwork/RightArrow@8.png'
4941Binary files checkbox-gui/checkbox-gui/qml/artwork/RightArrow@8.png 1970-01-01 00:00:00 +0000 and checkbox-gui/checkbox-gui/qml/artwork/RightArrow@8.png 2014-03-20 14:51:45 +0000 differ
4942=== added file 'checkbox-gui/checkbox-gui/qml/artwork/UpArrow@8.png'
4943Binary files checkbox-gui/checkbox-gui/qml/artwork/UpArrow@8.png 1970-01-01 00:00:00 +0000 and checkbox-gui/checkbox-gui/qml/artwork/UpArrow@8.png 2014-03-20 14:51:45 +0000 differ
4944=== added file 'checkbox-gui/checkbox-gui/qml/artwork/checkbox-qt-head.png'
4945Binary files checkbox-gui/checkbox-gui/qml/artwork/checkbox-qt-head.png 1970-01-01 00:00:00 +0000 and checkbox-gui/checkbox-gui/qml/artwork/checkbox-qt-head.png 2014-03-20 14:51:45 +0000 differ
4946=== added file 'checkbox-gui/checkbox-gui/qml/artwork/failed.svg'
4947--- checkbox-gui/checkbox-gui/qml/artwork/failed.svg 1970-01-01 00:00:00 +0000
4948+++ checkbox-gui/checkbox-gui/qml/artwork/failed.svg 2014-03-20 14:51:45 +0000
4949@@ -0,0 +1,61 @@
4950+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
4951+<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
4952+
4953+<svg
4954+ xmlns:dc="http://purl.org/dc/elements/1.1/"
4955+ xmlns:cc="http://creativecommons.org/ns#"
4956+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
4957+ xmlns:svg="http://www.w3.org/2000/svg"
4958+ xmlns="http://www.w3.org/2000/svg"
4959+ xmlns:xlink="http://www.w3.org/1999/xlink"
4960+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
4961+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
4962+ version="1.1"
4963+ id="Layer_1"
4964+ x="0px"
4965+ y="0px"
4966+ width="141.732px"
4967+ height="141.732px"
4968+ viewBox="68.866 69.866 141.732 141.732"
4969+ enable-background="new 68.866 69.866 141.732 141.732"
4970+ xml:space="preserve"
4971+ inkscape:version="0.48.4 r9939"
4972+ sodipodi:docname="failed.svg"><metadata
4973+ id="metadata3190"><rdf:RDF><cc:Work
4974+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
4975+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
4976+ id="defs3188" /><sodipodi:namedview
4977+ pagecolor="#ffffff"
4978+ bordercolor="#666666"
4979+ borderopacity="1"
4980+ objecttolerance="10"
4981+ gridtolerance="10"
4982+ guidetolerance="10"
4983+ inkscape:pageopacity="0"
4984+ inkscape:pageshadow="2"
4985+ inkscape:window-width="1551"
4986+ inkscape:window-height="876"
4987+ id="namedview3186"
4988+ showgrid="false"
4989+ inkscape:zoom="4.709655"
4990+ inkscape:cx="46.129578"
4991+ inkscape:cy="70.865997"
4992+ inkscape:window-x="49"
4993+ inkscape:window-y="24"
4994+ inkscape:window-maximized="1"
4995+ inkscape:current-layer="Layer_1" /><path
4996+ sodipodi:type="arc"
4997+ style="fill:#ff0000;fill-opacity:1;fill-rule:nonzero"
4998+ id="path2984"
4999+ sodipodi:cx="70.705818"
5000+ sodipodi:cy="71.026176"
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches