Commit 12b8af75 authored by Chris Lamb's avatar Chris Lamb 💬

Avoid DRY violation in pkg-js-autotest-test-is-{missing,empty}.

Re. 37a3d3ea

Gbp-Dch: ignore
parent 37a3d3ea
Pipeline #67356 failed with stages
in 74 minutes and 16 seconds
......@@ -502,14 +502,15 @@ sub run {
if (any { $_ eq 'autopkgtest-pkg-nodejs' } @testsuites) {
# Check control file exists in sources
my $path = $info->index_resolved_path('debian/tests/pkg-js/test');
my $filename = 'debian/tests/pkg-js/test';
my $path = $info->index_resolved_path($filename);
# Ensure test file contains something
if ($path and $path->is_open_ok) {
tag 'pkg-js-autopkgtest-test-is-empty', $path
tag 'pkg-js-autopkgtest-test-is-empty', $filename
unless any { s/^\s*//; /^\w/ } $path->file_contents;
} else {
tag 'pkg-js-autopkgtest-test-is-missing';
tag 'pkg-js-autopkgtest-test-is-missing', $filename;
# Ensure all files referenced in debian/tests/pkg-js/files exist
  • @lamby: same change pushed to !255 (merged), thanks!

  • and rebased

  • @lamby Could you please explain the meaning of DRY violation in this context? I googled it as probably meaning "don't repeat yourself" but could not figure out what it meant here.

  • So you aren't specifying debian/tests/pkg-js/test in multiple places which can lead to them getting out of sync and/or is just ugly.

Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment