Unverified Commit b8367add authored by Alex Pott's avatar Alex Pott
Browse files

task: #3067979 Exclude test files from release packages

By: traviscarden
By: danepowell
By: effulgentsia
By: drumm
By: catch
By: webchick
By: Mixologic
By: mile23
By: greggles
By: adamps
By: mglaman
By: alexpott
By: xjm
By: quietone
By: longwave
By: berdir
By: amateescu
By: acbramley
By: pameeela
By: cmlara
By: mstrelan
By: mably
By: spiderman
By: star-szr
parent b0297e3f
Loading
Loading
Loading
Loading
Loading

core/.gitattributes

0 → 100644
+3 −0
Changes for core/.gitattributes: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
# Exclude test code from packaged releases.
tests           export-ignore
.gitattributes  export-ignore
+9 −0
Changes for core/modules/package_manager/tests/src/Build/TemplateProjectTestBase.php: 9 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
use Drupal\Tests\package_manager\Traits\AssertPreconditionsTrait;
use Drupal\Tests\package_manager\Traits\FixtureUtilityTrait;
use Drupal\Tests\RandomGeneratorTrait;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Finder\Finder;
use Symfony\Component\Process\PhpExecutableFinder;
use Symfony\Component\Process\Process;
@@ -334,6 +335,14 @@ protected function createTestProject(string $template): void {
    $this->installQuickStart('minimal');
    $this->formLogin($this->adminUsername, $this->adminPassword);

    // Core's .gitattributes excludes test code from the drupal/core package.
    // The test project therefore has no Package Manager test modules, so copy
    // them in from the code base running the test.
    (new Filesystem())->mirror(
      dirname(__DIR__, 2) . '/modules',
      $this->getWebRoot() . '/modules',
    );

    // When checking for updates, we need to be able to make sub-requests, but
    // the built-in PHP server is single-threaded. Therefore, open a second
    // server instance on another port, which will serve the metadata about