plugin: shell
name: optical/detect
requires: device.category == 'CDROM'
description: Test to detect the optical drives
description-ast.UTF-8: Prueba pa deteutar les unidaes óptiques
description-bn.UTF-8: অপটিক্যাল ড্রাইভারব সনাক্ত করার জন্য পরীক্ষা করুন
description-bs.UTF-8: Test za detekciju optičkih diskova
description-cs.UTF-8: Test detekce optické mechaniky
description-de.UTF-8: Test zur Erkennung der optischen Laufwerke
description-el.utf-8: Δοκιμή για την ανίχνευση οδηγών οπτικών συσκευών
description-en_AU.UTF-8: Test to detect the optical drives
description-en_GB.UTF-8: Test to detect the optical drives
description-es.UTF-8: Prueba para detectar las unidades ópticas
description-fi.UTF-8: Testi optisten asemien havaitsemiseen
description-fr.UTF-8: Test pour détecter les disques optiques
description-gd.UTF-8: Deuchainn a lorg dràibhean lèirsinneach
description-hu.UTF-8: Teszt az optikai meghajtók felismerésére
description-it.UTF-8: Test di rilevamento delle unità ottiche.
description-ja.UTF-8: 光学ドライブの検出テスト
description-km.UTF-8: សាកល្បង ដើម្បី​រកមើល​ដ្រាយ​អុបទិក
description-ms.UTF-8: Uji untuk mengesan pemacu optik
description-nl.UTF-8: Test om optische stations te detecteren
description-pt_BR.UTF-8: Teste para detectar unidades ópticas
description-ro.UTF-8: Test pentru detectarea unităților optice
description-ru.UTF-8: Проверка определения оптических дисководов
description-sl.UTF-8: Preizkus za zaznavanje optičnih pogonov
description-tr.UTF-8: Optik sürücüleri algılama sınaması
description-ug.UTF-8: ئوپتىكىلىق ئۈسكۈنىنى بايقاش سىنىقى
description-uk.UTF-8: Перевірка знаходження оптичних приводів
description-zh_CN.UTF-8: 检测光驱的测试
command:
 cat <<'EOF' | run_templates -t -s 'udev_resource | filter_templates -w "category=CDROM"' | sed '/^$/d'
 $vendor $product
 EOF

plugin: local
name: optical/read
requires:
 device.category == 'CDROM'
description: Optical read test.
command:
 cat <<'EOF' | run_templates -t -s 'udev_resource | filter_templates -w "category=CDROM"'
 plugin: manual
 name: optical/read_`ls /sys$path/block`
 requires: device.path == "$path"
 user: root
 command: optical_read_test /dev/`ls /sys$path/block`
 description:
  PURPOSE:
      This test will check your $product device's ability to read CD media
  STEPS:
      1. Insert appropriate non-blank media into your optical drive(s). Movie and Audio Disks may not work. Self-created data disks have the greatest chance of working.
      2. If a file browser window opens, you can safely close or ignore that window.
      3. Click "Test" to begin the test.
  VERIFICATION:
      This test should automatically select "Yes" if it passes, "No" if it fails.
 EOF

plugin: local
name: optical/read-automated
requires:
 device.category == 'CDROM'
description: Automated optical read test.
command:
 cat <<'EOF' | run_templates -t -s 'udev_resource | filter_templates -w "category=CDROM"'
 plugin: shell
 name: optical/read-automated_`ls /sys$path/block`
 requires: device.path == "$path"
 user: root
 command: optical_read_test /dev/`ls /sys$path/block`
 description:
  This is an automated version of optical/read. It assumes you have already inserted a data CD into your optical drive prior to running Checkbox.
 EOF

plugin: local
name: optical/cdrom-write
requires:
 device.category == 'CDROM'
 optical_drive.cd == 'writable'
description: CD write test.
command:
 cat <<'EOF' | run_templates -t -s 'udev_resource | filter_templates -w "category=CDROM"'
 plugin: manual
 name: optical/cdrom-write_`ls /sys$path/block`
 requires: device.path == "$path"
 user: root
 command: set -o pipefail; optical_write_test /dev/`ls /sys$path/block` | ansi_parser
 description:
  PURPOSE:
      This test will check your system's $product CD writing capabilities. This test requires a blank CD-R or CD+R. If you do not have a blank disk, skip this test.
  STEPS:
      1. Insert a blank CD-R or CD+R into your drive
      2. Click "Test" to begin.
      3. When the CD tray ejects the media after burning, close it (DO NOT remove the disk, it is needed for the second portion of the test). Note, you must close the drive within 5 minutes or the test will time out.
 EOF

plugin: local
name: optical/cdrom-write-automated
requires:
 device.category == 'CDROM'
 optical_drive.cd == 'writable'
description: Automated CD write test
command:
 cat <<'EOF' | run_templates -t -s 'udev_resource | filter_templates -w "category=CDROM"'
 plugin: shell
 name: optical/cdrom-write-automated_`ls /sys$path/block`
 requires: device.path == "$path"
 user: root
 command: set -o pipefail; optical_write_test /dev/`ls /sys$path/block` | ansi_parser
 description:
  This is an automated version of optical/cdrom-write. It assumes you have already inserted a data CD into your optical drive prior to running Checkbox.
 EOF

plugin: manual
name: optical/cdrom-audio-playback
depends: optical/read
description:
 PURPOSE:
     This test will check your CD audio playback capabilities
 STEPS:
     1. Insert an audio CD in your optical drive
     2. When prompted, launch the Music Player
     3. Locate the CD in the display of the Music Player
     4. Select the CD in the Music Player
     5. Click the Play button to listen to the music on the CD
     6. Stop playing after some time
     7. Right click on the CD icon and select "Eject Disc"
     8. The CD should be ejected
     9. Close the Music Player
 VERIFICATION:
     Did all the steps work?

plugin: local
name: optical/dvd-write
requires:
 device.category == 'CDROM'
 optical_drive.dvd == 'writable'
description: DVD write test.
command:
 cat <<'EOF' | run_templates -t -s 'udev_resource | filter_templates -w "category=CDROM"'
 plugin: manual
 name: optical/dvd-write_`ls /sys$path/block`
 requires: device.path == "$path"
 user: root
 command: set -o pipefail; optical_write_test /dev/`ls /sys$path/block` | ansi_parser
 description:
  PURPOSE:
      This test will check your system's $product writing capabilities. This test requires a blank DVD-R or DVD+R. If you do not have a blank DVD disk, skip this test.
  STEPS:
      1. Enter a blank DVD-R or DVD+R into your drive
      2. Click "Test" to begin.
      3. When the CD tray ejects the media after burning, close it (DO NOT remove the disk, it is needed for the second portion of the test). Note, you must close the drive within 5 minutes or the test will time out.
  VERIFICATION:
      This test should automatically select "Yes" if it passes, "No" if it fails.
 EOF

plugin: local
name: optical/dvd-write-automated
requires:
 device.category == 'CDROM'
 optical_drive.dvd == 'writable'
description: Automated DVD write test.
command:
 cat <<'EOF' | run_templates -t -s 'udev_resource | filter_templates -w "category=CDROM"'
 plugin: shell
 name: optical/dvd-write-automated_`ls /sys$path/block`
 requires: device.path == "$path"
 user: root
 command: set -o pipefail; optical_write_test /dev/`ls /sys$path/block` | ansi_parser
 description:
  This is an automated version of optical/dvd-write. It assumes you have already inserted a data DVD into your optical drive prior to running Checkbox.
 EOF

plugin: manual
name: optical/dvd_playback
command: totem /media/cdrom
requires:
 device.category == 'CDROM'
 package.name == 'totem'
description:
 PURPOSE:
     This test will check your DVD  playback capabilities
 STEPS:
     1. Insert a DVD that contains any movie in your optical drive
     2. Click "Test" to play the DVD in Totem
 VERIFICATION:
     Did the file play?
