Comment 2 for bug 888435

Revision history for this message
Javier Collado (javier.collado) wrote :

The main problem here is that checkbox-editor assumes that test suites, that is, jobs that use the local plugin make use of the command field as follows:
cat <filename_pattern>

This is needed because checkbox-editor needs to know which file was used to get the test cases for a test suite to write changes back. However, checkbox trunk uses the command field not only to get a list of test cases from a file, but also to do some other things like:

- Generate test cases on the fly:
 cat <<'EOF' | run_templates -t -s 'udev_resource | filter_templates -w "category=DISK"'
 plugin: shell
 name: disk/benchmark_`ls /sys$path/block`
 requires: device.path == "$path" and package.name == 'linux'
 user: root
 command: hdparm -tT /dev/`ls /sys$path/block` | sed 's/:.*= */ = /' | grep -v "^$"
 description: This test runs hdparm timing tests as a benchmark for $path
 EOF

- Installing packages
dpkg -l | grep -iq 'ipmitool' || apt-get install -y ipmitool >/dev/null 2>&1

- Gather bootchar information
process_wait -u root bootchart collector ureadahead; \
 [ `ls /var/log/bootchart/*.tgz 2>/dev/null | wc -l` -lt 2 ] && reboot && sleep 100

While all this is completely fine, I don't think that this should be supported by checkbox-editor since it's beyond the use case it covers, so the best way to handle these commands is just try to display them without trying to extract any filename information from them.